- Timestamp:
- May 5, 2005, 2:16:53 AM (20 years ago)
- Location:
- orxonox/trunk/src/lib/gui/gui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/gui/gui/gui.cc
r4056 r4058 37 37 38 38 // GUI-modules 39 GuiFlags* flags = NULL;40 GuiVideo* video = NULL;41 GuiAudio* audio = NULL;42 GuiExec* exec = NULL;39 GuiFlags* flags = NULL; 40 GuiVideo* video = NULL; 41 GuiAudio* audio = NULL; 42 GuiExec* exec = NULL; 43 43 GuiBanner* banner = NULL; 44 GuiKeys* keys = NULL;44 GuiKeys* keys = NULL; 45 45 GuiUpdate* update = NULL; 46 46 … … 56 56 initGUI(argc, argv); 57 57 58 orxonoxGUI = new Window( "grafical orxonoxloader, "PACKAGE_VERSION);58 orxonoxGUI = new Window( "grafical " PACKAGE_NAME " loader, "PACKAGE_VERSION); 59 59 { 60 60 Box* windowBox = new Box ('h'); … … 100 100 // Merging changes to the Options from appended flags. 101 101 for (int optCount = 1; optCount < argc; optCount++) 102 orxonoxGUI->walkThrough(Widget::flagCheck, argv[optCount], 0);102 Window::mainWindow->walkThrough(Widget::flagCheck, argv[optCount], 0); 103 103 104 104 flags->setTextFromFlags(Window::mainWindow); 105 orxonoxGUI->showall(); 105 Window::mainWindow->showall(); 106 107 Window::mainWindow->walkThrough(Widget::redrawOptions, 1); 106 108 107 109 //// Handling special Cases. /// -
orxonox/trunk/src/lib/gui/gui/gui_exec.cc
r4056 r4058 67 67 execBox->fill(this->saveSettings); 68 68 verboseMode = new Menu("verbose mode", "nothing", "error", "warning", "info", "lastItem"); 69 verboseMode->setFlagName("verbose", "v", 0);69 verboseMode->setFlagName("verbose", "v", 2); 70 70 verboseMode->saveability(); 71 71 execBox->fill(verboseMode); -
orxonox/trunk/src/lib/gui/gui/gui_gtk.cc
r4056 r4058 395 395 return NULL; 396 396 } 397 398 /** 397 398 /** 399 399 \brief This is for setting the option of "widget" 400 400 \param widget specifies the widget that should be set. 401 401 */ 402 402 void Widget::setOptions(Widget* widget) 403 { 404 if (widget->isOption >= 1) 405 static_cast<Option*>(widget)->redraw(); 406 } 407 408 /** 409 \brief redraws all the Widgets down from widget 410 \param widget The topmost Widget 411 \param data ... 412 */ 413 void Widget::redrawOptions(Widget* widget) 403 414 { 404 415 if (widget->isOption >= 1) … … 916 927 917 928 /** 929 \param defaultValue new defaultValue for this option 930 */ 931 void Option::setDefaultValue(int defaultValue) 932 { 933 this->value = this->defaultValue = defaultValue; 934 } 935 936 /** 918 937 \brief This sets The FlagName of an Option and defines its default Values 919 938 !! Options will be saved if flagname is different from NULL !! … … 928 947 strcpy(this->flagName, flagname); 929 948 930 this-> defaultValue = defaultvalue;949 this->setDefaultValue(defaultvalue); 931 950 932 951 if (this->flagNameShort) … … 956 975 this->flagNameShort = new char [strlen(flagnameshort)+1]; 957 976 strcpy(this->flagNameShort, flagnameshort); 958 this-> defaultValue = defaultvalue;977 this->setDefaultValue(defaultvalue); 959 978 // cout << "Set Flagname of " << this->title << " to " << flagname << endl; 960 979 } -
orxonox/trunk/src/lib/gui/gui/gui_gtk.h
r4054 r4058 71 71 Widget* findGroupByNumber(int* number, unsigned int depth); 72 72 static void setOptions(Widget* widget); 73 static void redrawOptions(Widget* widget); 73 74 static void flagCheck(Widget* widget, void* flagName); 74 75 … … 241 242 242 243 bool isSaveable(void); 244 void setDefaultValue(int defaultValue); 243 245 void setFlagName(const char* flagname, int defaultvalue); 244 246 void setFlagName(const char* flagname, const char* flagnameshort, int defaultvalue); -
orxonox/trunk/src/lib/gui/gui/gui_video.cc
r4056 r4058 46 46 this->getResolutions(this->resolution); 47 47 this->resolution->saveability(); 48 this->resolution->setFlagName("resolution", "r", 0); 48 49 this->videoBox->fill(this->resolution); 49 50 this->wireframe = new CheckButton("WireFrame-mode"); … … 99 100 100 101 this->textureDetail = new Menu("Texture Detail", "low", "medium", "high", "lastItem"); 102 this->textureDetail->setDefaultValue(1); 101 103 this->textureDetail->saveability(); 102 104 this->advancedBox->fill(this->textureDetail); … … 104 106 this->modelDetailLabel = new Label("Model Detail"); 105 107 this->advancedBox->fill(this->modelDetailLabel); 106 this->modelDetail = new Menu("Model Detail", "low", "medium", "high", "lastItem"); 108 this->modelDetail = new Menu("Model Detail", "low", "high", "lastItem"); 109 this->modelDetail->setDefaultValue(1); 107 110 this->modelDetail->saveability(); 108 111 this->advancedBox->fill(this->modelDetail); … … 111 114 this->advancedBox->fill(this->antiAliasingLabel); 112 115 this->antiAliasing = new Menu("Anti Aliasing", "0", "1", "2", "4", "8", "lastItem"); 116 this->antiAliasing->setDefaultValue(2); 113 117 this->antiAliasing->saveability(); 114 118 this->advancedBox->fill(this->antiAliasing); … … 117 121 this->advancedBox->fill(this->filterMethodLabel); 118 122 this->filterMethod = new Menu("Filtering Method", "none", "linear", "bilinear", "trilinear", "anisortopic", "lastItem"); 123 this->filterMethod->setDefaultValue(1); 119 124 this->filterMethod->saveability(); 120 125 this->advancedBox->fill(this->filterMethod);
Note: See TracChangeset
for help on using the changeset viewer.