Page 1 of 1

[0.10.3] Custom GUI limits interaction area

Posted: Wed Jul 23, 2014 11:11 pm
by Dark
This bug (or not) is kinda annoying and difficult to explain.
Custom GUI limits interaction area where no GUI elements actually present.

Code: Select all

-- in console
game.player.gui["left"].direction = 'vertical'
game.player.gui["left"].add{type="frame", caption="1"}
game.player.gui["left"].add{type="frame", caption="1111111111111111111111111111"}
game.player.gui["left"].add{type="frame", caption="1111111111111111111111111111111111111111111111111111111111111111111"}
game.player.gui["left"].add{type="frame", caption="1111111111111111111111111111111111111111111111111111111111111111111111111111111111111"}
game.player.gui["left"].add{type="frame", caption="1111111111111111111111111111111111111111111111111111111111111111111"}
game.player.gui["left"].add{type="frame", caption="1111111111111111111111111111"}
game.player.gui["left"].add{type="frame", caption="1"}
No we have something like this:
Image

Blue and red areas are both non-interactable (i.e. player can't build using mouse in this area).
But blue area is expected to be interactable as there are no explicit GUI elements.

Well, actually there is element in blue area, the game.player.gui.left itself, as I understand it was made for simplification, but it still feels weird.

Perhaps there can be made a special flag for the root gui elements, to make them transparent for player interaction.

P.S. it would also be nice to have such flag exported to the API, useful for transparent informational frames.

Re: [0.10.3] Custom GUI limits interaction area

Posted: Tue Jul 29, 2014 5:20 pm
by kovarex
Thank you for the notice.

It is fixed now for 0.10.5

Transparent elements, will not obstruct the interaction under it.

The transparency of individual elements is quite easy to check, as it is specified in style, and the style can have type="none" for no graphics = transparency.

Re: [0.10.3] Custom GUI limits interaction area

Posted: Wed Jul 30, 2014 9:53 pm
by SHiRKiT
So this is why I wasn't able to click on the top of the screen! Thanks for the fix.