mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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)
This commit is contained in:
parent
5cb7f6a9b7
commit
9b8ca3a746
9 changed files with 284 additions and 365 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue