From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/client/entitymenu.cc | 50 ++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'src/client/entitymenu.cc') diff --git a/src/client/entitymenu.cc b/src/client/entitymenu.cc index 59c922c..d0fccef 100644 --- a/src/client/entitymenu.cc +++ b/src/client/entitymenu.cc @@ -15,7 +15,7 @@ namespace client EntityMenu::EntityMenu(ui::Widget *parent, const char * label) : ui::Window(parent) { set_border(false); - set_background(false); + set_background(false); if (label) set_label(label); else @@ -58,9 +58,9 @@ void EntityMenu::generate(core::Entity *entity, const char *menulabel) menu_generated_menu.assign(menulabel); if (!menu_generated_menu.size()) return; - + //con_debug << "generating menu " << entity->label() << " " << menulabel << std::endl; - + clear(); menu_container = new Container(this); @@ -70,7 +70,7 @@ void EntityMenu::generate(core::Entity *entity, const char *menulabel) menudescr = (*it); } } - + if (!menudescr) { menu_container->event_resize(); resize(); @@ -100,36 +100,36 @@ void EntityMenu::generate(core::Entity *entity, const char *menulabel) if (c == '"') { quote = !quote; result += c; - + } else if (c == ';') { if (quote) { current += c; - + } else if (current.size()) { if (buttondescr->command_type() == core::ButtonDescription::CommandGame) { if (result.size()) { result += ';'; } - + result.append("remote "); result.append(current); - + } else if (buttondescr->command_type() == core::ButtonDescription::CommandMenu) { if (result.size()) { result += ';'; } - + result.append("view "); result.append(current); } current.clear(); } - + } else { current += c; } - + i++; } @@ -174,21 +174,21 @@ void EntityMenu::generate(core::Entity *entity, const char *menulabel) bool EntityMenu::on_keypress(const int key, const unsigned int modifier) { - switch( key ) { - - case SDLK_ESCAPE: - if (visible()) { - if (menu_generated_menu.compare("main") != 0) { - generate(menu_generated_entity, "main"); - } else { - this->hide(); - ui::root()->show_menu("game"); + switch (key) { + + case SDLK_ESCAPE: + if (visible()) { + if (menu_generated_menu.compare("main") != 0) { + generate(menu_generated_entity, "main"); + } else { + this->hide(); + ui::root()->show_menu("game"); + } + return true; } - return true; - } - break; - default: - break; + break; + default: + break; } return Window::on_keypress(key, modifier); -- cgit v1.2.3