Closed Rahuum closed 2 years ago
The issue was the set_state and unset_state are only or pyglet groups, not Widgets.
Glad you found the mistake. This seems like a generally useful primitive, so if you're interested in making a PR, I'd be happy to merge it.
I'm trying to create a transparent/overlay widget that is a primitive gradient. The idea is that it can be used with Stack() and Background() to create an adjustable size background with a gradient effect overlayed on it, that replaces Background().
An example of what a UI might look like with/without:

It's a tiny thing, but there's no way to 'pre build' it with arbitrary size frames/dialogs/buttons/etc.
Right now I'm focusing on making the class Gradient, and then later I'll make GradientBackground() that stacks a Gradient() on top of a Background()
Right now, the gradient is being properly made/applied, but there's no transparency at all, let alone an opportunity to do an overlay-style operation.
Right now the transparency is hardcoded to 50%
Right now it's rendering the gradient just fine:
It's just not seeming to respect the blend mode.
Are there any immediately obvious mistakes, or gotchas you can think of in glooey, that would prevent a transparent/blend mode primitive widget from being rendered properly?
Thanks!