LazyGui icon indicating copy to clipboard operation
LazyGui copied to clipboard

fade window alpha when mouse is not over them

Open KrabCode opened this issue 1 year ago • 2 comments

this can be tricky due to overlaid effects inside a single window, like rectangles and text on top of each other or it would require a major rewrite for each window to use its own PGraphics so that it can be faded as a whole

KrabCode avatar Nov 20 '24 20:11 KrabCode

naively drawing separate PGraphics at an alpha that is a constrained function of time since last mouseover would still make the GUI have dark spots wherever windows overlap - maybe the approach with the separate PGraphics is useful, but we could draw all of them except the ones that are fading out on the "background canvas" at full alpha and only fade them out together as the whole canvas, while drawing the "active" windows on top of that separately, which should limit the dark spots to only whenever "active" or "recently active" windows overlap

KrabCode avatar Nov 20 '24 20:11 KrabCode

the benefit would be being able to use small canvases that are half-full of gui elements and still see the artwork

KrabCode avatar Nov 20 '24 20:11 KrabCode