Merge remote-tracking branch 'origin/master' into HEAD
This commit is contained in:
@@ -33,6 +33,8 @@
|
||||
#include "tilehighlight_func.h"
|
||||
#include "hotkeys.h"
|
||||
#include "guitimer_func.h"
|
||||
#include "tutorial_gui.h"
|
||||
#include "gui.h"
|
||||
|
||||
#include "saveload/saveload.h"
|
||||
|
||||
@@ -343,7 +345,7 @@ struct MainWindow : Window
|
||||
break;
|
||||
}
|
||||
|
||||
case GHK_RESET_OBJECT_TO_PLACE: ResetObjectToPlace(); break;
|
||||
case GHK_RESET_OBJECT_TO_PLACE: ResetObjectToPlace(); ToolbarSelectLastTool(); break;
|
||||
case GHK_DELETE_WINDOWS: DeleteNonVitalWindows(); break;
|
||||
case GHK_DELETE_NONVITAL_WINDOWS: DeleteAllNonVitalWindows(); break;
|
||||
case GHK_DELETE_ALL_MESSAGES: DeleteAllMessages(); break;
|
||||
@@ -467,6 +469,7 @@ struct MainWindow : Window
|
||||
if (!gui_scope) return;
|
||||
/* Forward the message to the appropriate toolbar (ingame or scenario editor) */
|
||||
InvalidateWindowData(WC_MAIN_TOOLBAR, 0, data, true);
|
||||
InvalidateWindowData(WC_MAIN_TOOLBAR_RIGHT, 0, data, true);
|
||||
}
|
||||
|
||||
static HotkeyList hotkeys;
|
||||
@@ -567,6 +570,15 @@ void SetupColoursAndInitialWindow()
|
||||
default: NOT_REACHED();
|
||||
case GM_MENU:
|
||||
ShowSelectGameWindow();
|
||||
ShowTutorialWindowOnceAfterInstall();
|
||||
if (getenv("SDL_RESTART_PARAMS") != NULL) {
|
||||
static int counter = 5; // This part of code is called several times during startup, which closes all windows, so we need to put random hacks here
|
||||
counter--;
|
||||
ShowGameOptions();
|
||||
#ifndef WIN32
|
||||
if (counter == 0) unsetenv("SDL_RESTART_PARAMS");
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
case GM_NORMAL:
|
||||
|
||||
Reference in New Issue
Block a user