1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00

TouchScreenGUI dehardcoding refactor (#14472)

This commit is contained in:
grorp 2024-04-17 15:59:52 +02:00 committed by GitHub
parent b2057a5da7
commit f2b5c35fa2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 491 additions and 699 deletions

View file

@ -206,10 +206,6 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
if (!m_rendering_engine->run() || *kill)
break;
if (g_settings->getBool("enable_touch")) {
g_touchscreengui = new TouchScreenGUI(m_rendering_engine->get_raw_device(), receiver);
}
the_game(
kill,
input,

View file

@ -1555,8 +1555,8 @@ bool Game::initGui()
gui_chat_console = new GUIChatConsole(guienv, guienv->getRootGUIElement(),
-1, chat_backend, client, &g_menumgr);
if (g_touchscreengui)
g_touchscreengui->init(texture_src);
if (g_settings->getBool("enable_touch"))
g_touchscreengui = new TouchScreenGUI(device, texture_src);
return true;
}