Skip to content

Commit

Permalink
ENGINES: Move sub gui before gui when hideSelf is false when subbing
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius committed Dec 29, 2018
1 parent ac8d499 commit 8788bc1
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/engines/aurora/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,12 @@ uint32 GUI::sub(GUI &gui, uint32 startCode, bool showSelf, bool hideSelf) {
if (hideSelf)
hide();

// Move the gui a bit behind the sub gui
float x, y, z;
getPosition(x, y, z);
setPosition(x, y, z + 100.0f);
// Move the gui a bit before the root gui
if (!hideSelf) {
float x, y, z;
getPosition(x, y, z);
gui.setPosition(x, y, z - 100.0f);
}

GfxMan.unlockFrame();

Expand All @@ -372,9 +374,6 @@ uint32 GUI::sub(GUI &gui, uint32 startCode, bool showSelf, bool hideSelf) {

GfxMan.lockFrame();

// Reset the position
setPosition(x, y, z);

// Hide the sub GUI
if (hideSelf && showSelf)
show();
Expand Down

0 comments on commit 8788bc1

Please sign in to comment.