
-
chriswilson
Ah I see. Good to know. I tried this and it got me a nice transparent background to my widget, but of course setting alpha to zero would do the same thing!
I was basing this on the Swift iOS colours (UIColor class which has a UIColor.clear) rather than CSS. I’m not sure if this is what is going on behind the scenes of the UI module though.
-
chriswilson
Regarding the clear background thing: I’ve just started playing with the Today Widget as well and I used this code to load a standard PYUI file (as might be done for a normal script). It also sets a clear background. I hope it’s helpful!
v = ui.load_view() v.background_color = ui.set_color("clear") appex.set_widget_view(v)
-
-
-
-
-
-
chriswilson
The hitbox you created is just a Rect() object, which is simply coordinates and not actually something rendered on the screen. You could make a Shapenode() or SpriteNode() of the same size which would be visible.
I'm not at my computer just now, but can show some code later if you like.
-
chriswilson
@Webmaster4o I'm starting to learn JS now, so hopefully it won't be a problem!