Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-01-28 21:01:32 +0000
committerStijn Buys <ingar@osirion.org>2009-01-28 21:01:32 +0000
commitf681fc3c38348a0af49e09022948a6b87c801ab0 (patch)
tree852384fa820d589c94de644ffb1f6917a7e9c970 /src/ui
parentb32ad8cea04c3f9387fc7401d93a836c35c5ae8c (diff)
removed duplicate code block
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui.cc30
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()