diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/ui.cc | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/src/ui/ui.cc b/src/ui/ui.cc index f96f692..55702c3 100644 --- a/src/ui/ui.cc +++ b/src/ui/ui.cc @@ -102,6 +102,8 @@ UI::~UI() void UI::load_menus() { + ui_active_menu = 0; + Menus::iterator it; for (it = ui_menus.begin(); it != ui_menus.end(); it++) { Window *menu = (*it); @@ -234,7 +236,6 @@ void UI::load_settings() { ui_mouse_focus = this; - ui_active_menu = 0; std::string filename("ui"); filesystem::IniFile ini; @@ -349,33 +350,6 @@ void UI::load_settings() } ini.close(); - - // fallback main menu - if (!find_menu("main")) { - con_warn << "menu 'main' not found, using default" << std::endl; - Menu *menu = new Menu(this, "main"); - menu->add_label("Main Menu"); - menu->add_button("Connect", "connect"); - menu->add_button("Quit", "quit"); - } - - // fallback game menu - if (!find_menu("game")) { - con_warn << "menu 'game' not found, using default" << std::endl; - Menu *menu = new Menu(this, "game"); - menu->add_label("Game Menu"); - menu->add_button("Disconnect", "disconnect"); - menu->add_button("Quit", "quit"); - } - - // fallback join menu - if (!find_menu("join")) { - con_warn << "menu 'join' not found, using default" << std::endl; - Menu *menu = new Menu(this, "join"); - menu->add_label("Join Menu"); - menu->add_button("Join", "join; menu hide"); - menu->add_button("Game menu", "menu game"); - } } void UI::apply_render_options() |