Page 1 of 1

.location support for empty-widget

Posted: Sun Aug 11, 2019 7:11 am
by Godmave
Since GUI:screen is any empty-widget and supports .location, would it be possible for other empty-widgets to support it as well?
That way you could have one container that can be placed anywhere on the screen, that contains other elements that are relative to the containers position.

Ideally empty-widget would also support culling as flag, so when set stuff that would get drawn over the borders is not visible.

Use-case:
More complex HUD elements with a lot smaller sprites.

Re: .location support for empty-widget

Posted: Sun Aug 11, 2019 3:58 pm
by Rseding91
gui.screen is an empty widget because I needed something that was technically a widget but had zero associated logic. No layouting, no rendering - just exist.

When you put things into gui.screen they don't actually go in that empty widget - they just get put directly into the top level "screen space" GUI. Additionally since the only widget type which supports dragging is frame that's the only one I added .location support for.

I'm not going to be adding it to empty widget.