diff options
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r-- | src/main_gui.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 5343e2ed1..5877fb938 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -31,6 +31,8 @@ #include "tilehighlight_func.h" #include "hotkeys.h" #include "guitimer_func.h" +#include "error.h" +#include "news_gui.h" #include "saveload/saveload.h" @@ -235,6 +237,8 @@ enum { GHK_CHAT_ALL, GHK_CHAT_COMPANY, GHK_CHAT_SERVER, + GHK_CLOSE_NEWS, + GHK_CLOSE_ERROR, }; struct MainWindow : Window @@ -427,6 +431,14 @@ struct MainWindow : Window } break; + case GHK_CLOSE_NEWS: // close active news window + if (!HideActiveNewsMessage()) return ES_NOT_HANDLED; + break; + + case GHK_CLOSE_ERROR: // close active error window + if (!HideActiveErrorMessage()) return ES_NOT_HANDLED; + break; + default: return ES_NOT_HANDLED; } return ES_HANDLED; @@ -520,6 +532,8 @@ static Hotkey global_hotkeys[] = { Hotkey(_ghk_chat_all_keys, "chat_all", GHK_CHAT_ALL), Hotkey(_ghk_chat_company_keys, "chat_company", GHK_CHAT_COMPANY), Hotkey(_ghk_chat_server_keys, "chat_server", GHK_CHAT_SERVER), + Hotkey(WKC_SPACE, "close_news", GHK_CLOSE_NEWS), + Hotkey(WKC_SPACE, "close_error", GHK_CLOSE_ERROR), HOTKEY_LIST_END }; HotkeyList MainWindow::hotkeys("global", global_hotkeys); |