Changeset 2739 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Nov 6, 2004, 4:51:59 AM (20 years ago)
- Location:
- orxonox/trunk/gui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/gui/orxonox_gui.cc
r2737 r2739 552 552 flag_name = ""; 553 553 flag_name_short = ""; 554 saveable = false; 554 555 default_value = 0; 555 556 -
orxonox/trunk/gui/orxonox_gui.h
r2737 r2739 188 188 char* flag_name_short; //!< like flag_name but shorter 189 189 int default_value; //!< A default value is good, for hiding a option if it is not needed. (hidden if value == default_value) 190 bool saveable; 190 191 191 192 void setFlagName (char* flagname, int defaultvalue); -
orxonox/trunk/gui/orxonox_gui_audio.cc
r2614 r2739 37 37 enableSound = new CheckButton ("Disable Sound"); 38 38 enableSound->setFlagName ("no-sound", 0); 39 enableSound->saveable = true; 39 40 audioBox->fill (enableSound); 40 41 Label* musicVolumeLabel = new Label ("Music Volume"); … … 42 43 musicVolume = new Slider ("Music Volume", 0, 100); 43 44 musicVolume->setFlagName ("music-volume", "m", 80); 45 musicVolume->saveable = true; 44 46 audioBox->fill (musicVolume); 45 47 Label* effectsVolumeLabel = new Label ("Effects Volume"); … … 47 49 effectsVolume = new Slider ("Effects Volume", 0, 100); 48 50 effectsVolume->setFlagName ("effects-volume", "e", 80); 51 effectsVolume->saveable = true; 49 52 audioBox->fill (effectsVolume); 50 53 -
orxonox/trunk/gui/orxonox_gui_exec.cc
r2635 r2739 45 45 saveSettings = new CheckButton ("Save Settings"); 46 46 saveSettings->value = 1; 47 saveSettings->saveable = true; 47 48 execBox->fill (saveSettings); 48 49 verboseMode = new Menu ("verbose mode", "no output", "verbose", "debug", "lastItem"); 49 50 verboseMode->setFlagName ("verbose", "v", 0); 51 verboseMode->saveable = true; 50 52 execBox->fill (verboseMode); 51 53 alwaysShow = new CheckButton ("Always Show this Menu"); 52 54 alwaysShow->setFlagName ("gui", "g", 0); 55 alwaysShow->saveable = true; 53 56 execBox->fill (alwaysShow); 54 57 quit = new Button ("Quit"); … … 98 101 int OrxonoxGuiExec::shouldsave () 99 102 { 100 return ( 103 return (static_cast<Option*>(saveSettings)->value); 101 104 } 102 105 … … 123 126 int counter = 0; 124 127 while (counter < depth && ((widget->is_option>0 125 && (strcmp (static_cast<Option*>(widget)->flag_name, "") 126 || strcmp (static_cast<Option*>(widget)->flag_name_short, "")) ) 128 && (static_cast<Option*>(widget)->saveable) ) 127 129 || (widget->is_option<0 128 130 && strcmp (static_cast<Packer*>(widget)->getGroupName(), "")))) … … 148 150 149 151 if (widget->is_option >= 1) 150 if (st rcmp (static_cast<Option*>(widget)->flag_name, "") || strcmp (static_cast<Option*>(widget)->flag_name_short, ""))152 if (static_cast<Option*>(widget)->saveable) 151 153 { 152 154 char Buffer[256]; -
orxonox/trunk/gui/orxonox_gui_video.cc
r2614 r2739 36 36 fullscreen = new CheckButton ("Fullscreen-mode"); 37 37 fullscreen->setFlagName ("windowed", "q", 1); 38 fullscreen->saveable = true; 38 39 videoBox->fill (fullscreen); 39 40 wireframe = new CheckButton ("WireFrame-mode"); 40 41 wireframe->setFlagName ("wireframe", "w", 0); 42 wireframe->saveable = true; 41 43 videoBox->fill (wireframe); 42 44
Note: See TracChangeset
for help on using the changeset viewer.