diff options
author | rubidium <rubidium@openttd.org> | 2008-05-23 22:55:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-05-23 22:55:32 +0000 |
commit | 95c230759505dbaeaec1e56922bb8eb57e92bd4a (patch) | |
tree | 7617b6d82cdee126d4387087b7f196ea0056e047 /src | |
parent | 3866effe71bcd5e6dfc65c72fca74fa8ff019b29 (diff) | |
download | openttd-95c230759505dbaeaec1e56922bb8eb57e92bd4a.tar.xz |
(svn r13224) -Fix (r13107): set the location of the old SelectPlayerFaceWindow when switching from simple to advanced or vice versa instead of letting the new window popup somewhere 'randomly'.
Diffstat (limited to 'src')
-rw-r--r-- | src/player_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/player_gui.cpp b/src/player_gui.cpp index dd9a1b8d7..3c611b005 100644 --- a/src/player_gui.cpp +++ b/src/player_gui.cpp @@ -755,7 +755,7 @@ class SelectPlayerFaceWindow : public Window } public: - SelectPlayerFaceWindow(const WindowDesc *desc, Window *parent, bool advanced) : Window(desc, parent->window_number) + SelectPlayerFaceWindow(const WindowDesc *desc, Window *parent, bool advanced, int top, int left) : Window(desc, parent->window_number) { this->parent = parent; this->FindWindowPlacementAndResize(desc); @@ -1032,7 +1032,7 @@ static void DoSelectPlayerFace(Window *parent, bool adv, int top, int left) if (!IsValidPlayer((PlayerID)parent->window_number)) return; if (BringWindowToFrontById(WC_PLAYER_FACE, parent->window_number)) return; - new SelectPlayerFaceWindow(adv ? &_select_player_face_adv_desc : &_select_player_face_desc, parent, adv); // simple or advanced window + new SelectPlayerFaceWindow(adv ? &_select_player_face_adv_desc : &_select_player_face_desc, parent, adv, top, left); // simple or advanced window } |