From 0037afa8ea8bd4ecd76d26bf563e0b36bb1e3862 Mon Sep 17 00:00:00 2001 From: cosmosninja Date: Fri, 14 Dec 2007 02:36:32 +0000 Subject: [PATCH] Removed a function that is now useless, and made some minor style changes. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1353 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/gui/config_display.cpp | 4 ++-- src/gui/menu_manager.cpp | 16 +++------------- src/gui/menu_manager.hpp | 1 - 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/gui/config_display.cpp b/src/gui/config_display.cpp index 5a21e9b8a..7fa06bbb4 100644 --- a/src/gui/config_display.cpp +++ b/src/gui/config_display.cpp @@ -142,7 +142,7 @@ void ConfigDisplay::select() { widget_manager->set_wgt_text( WTOK_FULLSCREEN, _("Fullscreen mode")); } - menu_manager->refreshMenu(); + widget_manager->layout(); break; case WTOK_INCR_RES: m_sizes_index = std::min(m_sizes_size-1,m_sizes_index+1); @@ -176,7 +176,7 @@ void ConfigDisplay::changeResolution(int width, int height) setVideoMode(); - menu_manager->refreshMenu(); + widget_manager->layout(); glViewport(0,0,user_config->m_width, user_config->m_height); glScissor(0,0,user_config->m_width, user_config->m_height); diff --git a/src/gui/menu_manager.cpp b/src/gui/menu_manager.cpp index e3f0754fb..3473dac50 100644 --- a/src/gui/menu_manager.cpp +++ b/src/gui/menu_manager.cpp @@ -125,7 +125,7 @@ void MenuManager::update() delete m_current_menu; m_current_menu= NULL; - m_handled_size= (unsigned int)m_menu_stack.size(); + m_handled_size = (unsigned int)m_menu_stack.size(); if (m_handled_size > 0) { pair saved = m_menu_stack.back(); @@ -244,16 +244,6 @@ void MenuManager::update() } } // update -//----------------------------------------------------------------------------- -//Used to create a new instance of the present menu, which updates the widgets -//text and/or location, if they have been changed by selecting an entry in the menu. -//eg: after a change of screen resolution - -void MenuManager::refreshMenu() -{ - widget_manager->layout(); -} - //----------------------------------------------------------------------------- void MenuManager::switchToGrandPrixEnding() { @@ -263,7 +253,7 @@ void MenuManager::switchToGrandPrixEnding() delete m_current_menu; m_current_menu= NULL; } - m_handled_size= 0; + m_handled_size = 0; m_menu_stack.clear(); pushMenu(MENUID_GRANDPRIXEND); @@ -299,7 +289,7 @@ void MenuManager::switchToMainMenu() delete m_current_menu; m_current_menu= NULL; } - m_handled_size= 0; + m_handled_size = 0; m_menu_stack.clear(); pushMenu(MENUID_MAINMENU); diff --git a/src/gui/menu_manager.hpp b/src/gui/menu_manager.hpp index 2f8c38f16..1232b2baf 100644 --- a/src/gui/menu_manager.hpp +++ b/src/gui/menu_manager.hpp @@ -71,7 +71,6 @@ public: void switchToGrandPrixEnding(); void switchToRace(); void switchToMainMenu(); - void refreshMenu(); // use this function within menu classes void pushMenu(MenuManagerIDs);