Skip to content

Commit

Permalink
TouchScreenGUI dehardcoding refactor (#14472)
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Apr 17, 2024
1 parent b2057a5 commit f2b5c35
Show file tree
Hide file tree
Showing 4 changed files with 491 additions and 699 deletions.
4 changes: 0 additions & 4 deletions src/client/clientlauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/client/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading

0 comments on commit f2b5c35

Please sign in to comment.