diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-05-13 11:05:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-13 11:05:16 +0200 |
commit | 9b8ca3a746cdb9478a46939d36c30484a97255e1 (patch) | |
tree | c754605c7c955440a1d66d413a80f994d6b83006 /src/client/clientlauncher.cpp | |
parent | 5cb7f6a9b7268ee6bfa5eae4f8af9613403f9965 (diff) | |
download | minetest-9b8ca3a746cdb9478a46939d36c30484a97255e1.tar.gz minetest-9b8ca3a746cdb9478a46939d36c30484a97255e1.tar.bz2 minetest-9b8ca3a746cdb9478a46939d36c30484a97255e1.zip |
Move KeyList & InputHandler from game.h to client/inputhandler.h (#5752)
* Move KeyList & InputHandler from game.h to client/inputhandler.h
We have a header for inputs, move inputhandler class & related keylist object to it
Also introduce a cpp file for MyEventReceiver::OnEvent function in inputhandler.h because a so huge function doesn't needs to be inlined
* Pass clang-format on inputhandler.{cpp,h} (compatible)
Diffstat (limited to 'src/client/clientlauncher.cpp')
-rw-r--r-- | src/client/clientlauncher.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index be4e82134..289d1537b 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -42,9 +42,9 @@ gui::IGUIEnvironment *guienv = NULL; gui::IGUIStaticText *guiroot = NULL; MainMenuManager g_menumgr; -bool noMenuActive() +bool isMenuActive() { - return g_menumgr.menuCount() == 0; + return g_menumgr.menuCount() != 0; } // Passed to menus to allow disconnecting and exiting @@ -496,7 +496,7 @@ void ClientLauncher::main_menu(MainMenuData *menudata) infostream << "Waiting for other menus" << std::endl; while (device->run() && *kill == false) { - if (noMenuActive()) + if (!isMenuActive()) break; driver->beginScene(true, true, video::SColor(255, 128, 128, 128)); guienv->drawAll(); |