seems that although the idea had merit, no dice
Code: Select all
Exception: Expression u"im.MatrixColor(img,im.matrix.brightness(0.3))" is not an ATL transform, and so cannot be included in an ATL interpolation.
so then I thought okay, why not brute a linear myself?
Code: Select all
transform hoverglow(img1):
img1
pause(0.1)
im.MatrixColor(img1,im.matrix.brightness(.15))
pause(0.1)
im.MatrixColor(img1,im.matrix.brightness(.2))
pause(0.1)
im.MatrixColor(img1,im.matrix.brightness(.25))
pause(0.1)
im.MatrixColor(img1,im.matrix.brightness(.3))
this *does* work, but only once. I restart my game, place my mouse over my button and I see the gradual change (especially at high pause values etc).
however, after that every time I hover it goes back to instantly highest brightness.
no really sure why that is. it seems a transform is only done once and after that the transform is just finished. a new event doesn't restart it.
I then tried something a little different
Code: Select all
transform hoverglow(img1):
on idle:
im.MatrixColor(img1,im.matrix.brightness(.08))
on hover:
im.MatrixColor(img1,im.matrix.brightness(.08))
pause 0.3
im.MatrixColor(img1,im.matrix.brightness(.10))
pause 0.3
im.MatrixColor(img1,im.matrix.brightness(.12))
pause 0.3
im.MatrixColor(img1,im.matrix.brightness(.14))
pause 0.3
im.MatrixColor(img1,im.matrix.brightness(.16))
pause 0.3
im.MatrixColor(img1,im.matrix.brightness(.18))
pause 0.3
im.MatrixColor(img1,im.matrix.brightness(.20))
this really gives strange results. when I move my mouse over the image it starts blinking! when I stop moving sometimes the image will be gone. move again a pixel and it might be back and so on.
this might be a ren'py bug? naw, it was still tied to the hover attribute of the imagebutton. it was being recalled every time I moved I think, so no wonder it flipped out.
in the end I settled on
Code: Select all
transform hoverglow(img1):
im.MatrixColor(img1,im.matrix.brightness(.10))
pause 0.1
im.MatrixColor(img1,im.matrix.brightness(.11))
pause 0.1
im.MatrixColor(img1,im.matrix.brightness(.12))
pause 0.1
im.MatrixColor(img1,im.matrix.brightness(.13))
pause 0.1
im.MatrixColor(img1,im.matrix.brightness(.14))
pause 0.1
im.MatrixColor(img1,im.matrix.brightness(.15))
pause 0.1
im.MatrixColor(img1,im.matrix.brightness(.16))
pause 0.1
im.MatrixColor(img1,im.matrix.brightness(.15))
pause 0.1
im.MatrixColor(img1,im.matrix.brightness(.14))
pause 0.1
im.MatrixColor(img1,im.matrix.brightness(.13))
pause 0.1
im.MatrixColor(img1,im.matrix.brightness(.12))
pause 0.1
im.MatrixColor(img1,im.matrix.brightness(.11))
repeat
it gives it a fairly neat soft flashing effect while it's moused over and it also consistently works, so that's nice
leaving the mouse-over state is still fairly abrupt though.