[Widelands-cvs] SF.net SVN: widelands:[3215] trunk/src/ui/ui_fs_menus/ fullscreen_menu_options.cc
Status: Beta
Brought to you by:
sirver
From: <nas...@us...> - 2008-07-24 15:50:52
|
Revision: 3215 http://widelands.svn.sourceforge.net/widelands/?rev=3215&view=rev Author: nasenbaer_peter Date: 2008-07-24 15:50:49 +0000 (Thu, 24 Jul 2008) Log Message: ----------- Some improvements to maxfps set up interface Modified Paths: -------------- trunk/src/ui/ui_fs_menus/fullscreen_menu_options.cc Modified: trunk/src/ui/ui_fs_menus/fullscreen_menu_options.cc =================================================================== --- trunk/src/ui/ui_fs_menus/fullscreen_menu_options.cc 2008-07-23 21:52:35 UTC (rev 3214) +++ trunk/src/ui/ui_fs_menus/fullscreen_menu_options.cc 2008-07-24 15:50:49 UTC (rev 3215) @@ -75,7 +75,7 @@ m_fx (this, Point(285, 190)), m_label_fx(this, 315, 200, _("Enable Sound"), Align_VCenter), m_label_maxfps(this, 285, 240, _("Maximum FPS:"), Align_VCenter), -m_value_maxfps(this, MENU_XRES / 2 + 68, 240, "25", Align_VCenter), +m_value_maxfps(this, MENU_XRES / 2 + 85, 228, "25", Align_Right), m_reslist(this, 80, 100, 190, 170, Align_Left, true), m_label_resolution(this, 85, 85, _("In-game resolution"), Align_VCenter), m_label_language(this, MENU_XRES / 2 + 135, 85, _("Language"), Align_VCenter), @@ -120,6 +120,10 @@ sprintf(textmaxfps, "%i", opt.maxfps); m_value_maxfps .set_text(textmaxfps); maxfpstemp = opt.maxfps; + if(maxfpstemp==99) + m_fps_plus.set_enabled(false); + if(maxfpstemp==5) + m_fps_minus.set_enabled(false); char buffer[255]; snprintf @@ -190,19 +194,23 @@ } void Fullscreen_Menu_Options::maxFpsPlus() { - if(maxfpstemp<99){ - char textmaxfps[2]; - sprintf(textmaxfps, "%i", ++maxfpstemp); - m_value_maxfps.set_text(textmaxfps); - } + if(maxfpstemp==5) + m_fps_minus.set_enabled(true); + char textmaxfps[2]; + sprintf(textmaxfps, "%i", ++maxfpstemp); + m_value_maxfps.set_text(textmaxfps); + if(maxfpstemp==99) + m_fps_plus.set_enabled(false); } void Fullscreen_Menu_Options::maxFpsMinus() { - if(maxfpstemp>5){ - char textmaxfps[2]; - sprintf(textmaxfps, "%i", --maxfpstemp); - m_value_maxfps.set_text(textmaxfps); - } + if(maxfpstemp==99) + m_fps_plus.set_enabled(true); + char textmaxfps[2]; + sprintf(textmaxfps, "%i", --maxfpstemp); + m_value_maxfps.set_text(textmaxfps); + if(maxfpstemp==5) + m_fps_minus.set_enabled(false); } Options_Ctrl::Options_Struct Fullscreen_Menu_Options::get_values() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |