forked from LGDG/ExampleProject
under
35a8fc2f1a
What was happening here is that because we were detecting window clicks inside _input, when you clicked overlapping windows, all of them would receive the click, and all of them would set themselves to active and move to the foreground. The solution to this was to move the click-detection into _gui_input instead, which stops the event from traveling to the back elements. There is, however, a gotcha. Because _gui_input only fires on the topmost element clicked, the window itself doesn't receive the event because its children are covering it up and receive the event instead. To work around this I iterated all the children of the window, connecting to and forwarding their _gui_input events to the window root. Thus, buttons still work when you click on them, but the window also gets to respond as it needs to. |
||
---|---|---|
.. | ||
Images | ||
.DS_Store | ||
Desktop.gd | ||
DesktopWindow.gd | ||
DesktopWindow.tscn | ||
InventoryTheme.tres | ||
ResizeHandle.gd | ||
RetroWindow.gd | ||
RetroWindowsTheme.tres | ||
Window.tscn | ||
me.ogg | ||
me.ogg.import |