mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(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'.
This commit is contained in:
parent
8841f3be40
commit
7ba02ef2b0
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user