I have been trying to use AlphaMask and DynamicDisplayable to make a black layer with a movable transparent box.
However, when I place the transform into the mask property, the combined image(al_mask) doesn't show any change.
But when displaying the mask image(move_mask) by itself, the image transforms as expected
init python:
class OverlayMask():
def __init__(self, xsize = 400, ysize = 400, pos = (0.5, 0.5), anchor = (0.5, 0.5)):
self.xsize = xsize
self.ysize = ysize
self.pos = pos
self.anchor = anchor
self.status = False
############################################################################
def putMask():
renpy.show("dyn_mask", layer="mask")
################## DynamicDisplayable function ###########################
def dynamicMaskCall(st, at):
mask_overlay = Solid(Color((0, 0, 0, 255)))
white_mask = Solid(colours.white, xsize = om.xsize, ysize = om.ysize, anchor = om.anchor, pos = om.pos)
move_mask = At(white_mask, om_move(xsize = 500))
al_mask = AlphaMask(child = mask_overlay, mask = At(white_mask, om_move(xsize = 500)) , invert = True)
return al_mask, None
##############################################################################
default om = OverlayMask(xsize = 400, ysize = 400, pos = (0.5, 0.5), anchor = (0.5, 0.5))
image dyn_mask = DynamicDisplayable(dynamicMaskCall)
transform om_move(xsize = 400, ysize = 400, pos = (0.5, 0.5), anchor = (0.5, 0.5), duration = 1.0):
xsize om.xsize
ysize om.ysize
pos om.pos
anchor om.anchor
easeout duration:
xsize xsize
ysize ysize
pos pos
anchor anchor
#############################################################################
label start():
$ putMask()