- Timestamp:
- May 5, 2005, 3:18:39 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/gui/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/gui/gui/gui_gtk.h
r4058 r4064 358 358 }; 359 359 360 //! A EntryField is a TextEntry field, for putting some text into. 361 class EntryField : public Option 362 { 363 public: 364 EntryField(const char* name = NULL); 365 virtual ~EntryField(void); 366 367 void setValue(const char* newValue); 368 virtual char* save(void); 369 virtual void load(char* loadString); 370 371 virtual void redraw(void); 372 virtual void changeOption(void); 373 }; 374 360 375 //! A label is a Widget, that displays a text 361 376 class Label : public Widget -
orxonox/trunk/src/lib/gui/gui/gui_update.cc
r4062 r4064 284 284 CURL* GuiUpdate::curlHandle = NULL; 285 285 286 /** 287 \brief A bool parameter that shows if we are downloading. 288 */ 286 //! A bool parameter that shows if we are downloading. 289 287 bool GuiUpdate::isDownloading = false; 290 288 289 //! A parameter to see, if downloading has been canceled 290 bool GuiUpdate::downloadCanceled = false; 291 291 292 292 /** -
orxonox/trunk/src/lib/gui/gui/gui_video.cc
r4058 r4064 27 27 #include "gui_video.h" 28 28 29 #include "gui_gtk.h" 29 30 #include "glincl.h" 30 31 #include <stdlib.h> … … 35 36 GuiVideo::GuiVideo(void) 36 37 { 37 this->videoFrame = new Frame("Video-Options:"); 38 this->videoBox = new Box('v'); 39 this->videoFrame->setGroupName("video"); 40 41 this->fullscreen = new CheckButton("Fullscreen-mode"); 42 this->fullscreen->setFlagName("windowed", "q", 1); 43 this->fullscreen->saveability(); 44 this->videoBox->fill(this->fullscreen); 45 this->resolution = new Menu("Resolution"); 46 this->getResolutions(this->resolution); 47 this->resolution->saveability(); 48 this->resolution->setFlagName("resolution", "r", 0); 49 this->videoBox->fill(this->resolution); 50 this->wireframe = new CheckButton("WireFrame-mode"); 51 this->wireframe->setFlagName("wireframe", "w", 0); 52 this->wireframe->saveability(); 53 this->videoBox->fill(this->wireframe); 54 55 this->advancedWindowCreate(); 56 this->videoBox->fill(this->advancedWindowGetButton()); 57 58 this->videoFrame->fill(videoBox); 59 this->setMainWidget(this->videoFrame); 38 Frame* videoFrame; //!< The Frame that holds the video options. 39 40 videoFrame = new Frame("Video-Options:"); 41 videoFrame->setGroupName("video"); 42 { 43 Box* videoBox; //!< The Box that holds the video options. 44 45 videoBox = new Box('v'); 46 { 47 CheckButton* fullscreen; //!< CheckButton for fullscreen-mode 48 Menu* resolution; //!< Menu for the resolution 49 CheckButton* wireframe; //!< CheckButton for wireframe Mode. 50 51 fullscreen = new CheckButton("Fullscreen-mode"); 52 fullscreen->setFlagName("windowed", "q", 1); 53 fullscreen->saveability(); 54 videoBox->fill(fullscreen); 55 resolution = new Menu("Resolution"); 56 getResolutions(resolution); 57 resolution->saveability(); 58 resolution->setFlagName("resolution", "r", 0); 59 videoBox->fill(resolution); 60 wireframe = new CheckButton("WireFrame-mode"); 61 wireframe->setFlagName("wireframe", "w", 0); 62 wireframe->saveability(); 63 videoBox->fill(wireframe); 64 65 videoBox->fill(advancedWindowCreate()); 66 } 67 videoFrame->fill(videoBox); 68 } 69 setMainWidget(videoFrame); 60 70 } 61 71 … … 71 81 \brief Creates a window, and all it contains for the Source-update. 72 82 */ 73 void GuiVideo::advancedWindowCreate(void) 74 { 83 Widget* GuiVideo::advancedWindowCreate(void) 84 { 85 // advanced-Performance-Options 86 Window* advancedWindow; //!< A Window to display advanced options. 87 Button* advancedButton; //!< A Button to open the Advanced Video Performance Window. 75 88 // the button, that opens this Window. 76 this->advancedButton = new Button("advanced");89 advancedButton = new Button("advanced"); 77 90 78 91 // the Window itself 79 this->advancedWindow = new Window("Advanced Video Options"); 80 this->advancedWindow->setGroupName("advancedVideoOptions"); 81 82 this->advancedBox = new Box('v'); 83 84 // Advanced Performance Options 85 this->shadows = new CheckButton("Shadows"); 86 this->shadows->saveability(); 87 this->advancedBox->fill(this->shadows); 88 89 this->fog = new CheckButton("Fog"); 90 this->fog->saveability(); 91 this->advancedBox->fill(this->fog); 92 93 this->reflections = new CheckButton("Reflections"); 94 this->reflections->saveability(); 95 this->advancedBox->fill(this->reflections); 96 97 this->textures = new CheckButton("Textures"); 98 this->textures->saveability(); 99 this->advancedBox->fill(this->textures); 100 101 this->textureDetail = new Menu("Texture Detail", "low", "medium", "high", "lastItem"); 102 this->textureDetail->setDefaultValue(1); 103 this->textureDetail->saveability(); 104 this->advancedBox->fill(this->textureDetail); 105 106 this->modelDetailLabel = new Label("Model Detail"); 107 this->advancedBox->fill(this->modelDetailLabel); 108 this->modelDetail = new Menu("Model Detail", "low", "high", "lastItem"); 109 this->modelDetail->setDefaultValue(1); 110 this->modelDetail->saveability(); 111 this->advancedBox->fill(this->modelDetail); 112 113 this->antiAliasingLabel = new Label("Anti-Aliasing-depth:"); 114 this->advancedBox->fill(this->antiAliasingLabel); 115 this->antiAliasing = new Menu("Anti Aliasing", "0", "1", "2", "4", "8", "lastItem"); 116 this->antiAliasing->setDefaultValue(2); 117 this->antiAliasing->saveability(); 118 this->advancedBox->fill(this->antiAliasing); 119 120 this->filterMethodLabel = new Label("Filtering Method:"); 121 this->advancedBox->fill(this->filterMethodLabel); 122 this->filterMethod = new Menu("Filtering Method", "none", "linear", "bilinear", "trilinear", "anisortopic", "lastItem"); 123 this->filterMethod->setDefaultValue(1); 124 this->filterMethod->saveability(); 125 this->advancedBox->fill(this->filterMethod); 126 127 this->closeButton = new Button("close"); 128 this->advancedBox->fill(this->closeButton); 129 130 this->advancedWindow->fill(advancedBox); 131 #ifdef HAVE_GTK2 132 this->advancedButton->connectSignal("button_press_event", this->advancedWindow, Window::windowOpen); 133 this->closeButton->connectSignal("button_press_event", this->advancedWindow, Window::windowClose); 134 this->advancedWindow->connectSignal("destroy", this->advancedWindow, Window::windowClose); 135 this->advancedWindow->connectSignal("delete_event", this->advancedWindow, Window::windowClose); 92 advancedWindow = new Window("Advanced Video Options"); 93 advancedWindow->setGroupName("advancedVideoOptions"); 94 { 95 Box* advancedBox; //!< A Box to pack the options into. 96 97 advancedBox = new Box('v'); 98 { 99 CheckButton* shadows; //!< CheckButton for shadows 100 CheckButton* fog; //!< CheckButton for fog. 101 CheckButton* reflections; //!< CheckButton for reflections 102 CheckButton* textures; //!< CheckButton for textures 103 Menu* textureDetail; //!< Menu for the Texture-Detail. 104 Label* modelDetailLabel; //!< Label for model-detail. 105 Menu* modelDetail; //!< model-detail. 106 Label* antiAliasingLabel; //!< Label for the anti-aliasing mode. 107 Menu* antiAliasing; //!< Menu for the Antialiasing-mode. 108 Label* filterMethodLabel; //!< Label for filtering-Method. 109 Menu* filterMethod; //!< Menu for filtering Method. 110 Button* closeButton; //!< A Button to close the Advanced-settingsWindow. 111 112 // Advanced Performance Options 113 shadows = new CheckButton("Shadows"); 114 shadows->saveability(); 115 advancedBox->fill(shadows); 116 117 fog = new CheckButton("Fog"); 118 fog->saveability(); 119 advancedBox->fill(fog); 120 121 reflections = new CheckButton("Reflections"); 122 reflections->saveability(); 123 advancedBox->fill(reflections); 124 125 textures = new CheckButton("Textures"); 126 textures->saveability(); 127 advancedBox->fill(textures); 128 129 textureDetail = new Menu("Texture Detail", "low", "medium", "high", "lastItem"); 130 textureDetail->setDefaultValue(1); 131 textureDetail->saveability(); 132 advancedBox->fill(textureDetail); 133 134 modelDetailLabel = new Label("Model Detail"); 135 advancedBox->fill(modelDetailLabel); 136 modelDetail = new Menu("Model Detail", "low", "high", "lastItem"); 137 modelDetail->setDefaultValue(1); 138 modelDetail->saveability(); 139 advancedBox->fill(modelDetail); 140 141 antiAliasingLabel = new Label("Anti-Aliasing-depth:"); 142 advancedBox->fill(antiAliasingLabel); 143 antiAliasing = new Menu("Anti Aliasing", "0", "1", "2", "4", "8", "lastItem"); 144 antiAliasing->setDefaultValue(2); 145 antiAliasing->saveability(); 146 advancedBox->fill(antiAliasing); 147 148 filterMethodLabel = new Label("Filtering Method:"); 149 advancedBox->fill(filterMethodLabel); 150 filterMethod = new Menu("Filtering Method", "none", "linear", "bilinear", "trilinear", "anisortopic", "lastItem"); 151 filterMethod->setDefaultValue(1); 152 filterMethod->saveability(); 153 advancedBox->fill(filterMethod); 154 155 closeButton = new Button("close"); 156 closeButton->connectSignal("button_press_event", advancedWindow, Window::windowClose); 157 158 advancedBox->fill(closeButton); 159 } 160 advancedWindow->fill(advancedBox); 161 } 162 #ifdef HAVE_GTK2 163 advancedButton->connectSignal("button_press_event", advancedWindow, Window::windowOpen); 164 advancedWindow->connectSignal("destroy", advancedWindow, Window::windowClose); 165 advancedWindow->connectSignal("delete_event", advancedWindow, Window::windowClose); 136 166 #endif /* HAVE_GTK2 */ 137 Window::addWindow(this->advancedWindow); 138 139 } 140 141 /** 142 \returns A Pointer to the Button of the UpdaterSourceWindow 143 */ 144 Button* GuiVideo::advancedWindowGetButton(void) 145 { 146 return this->advancedButton; 147 } 148 167 Window::addWindow(advancedWindow); 168 169 return advancedButton; 170 } 171 172 /** 173 \brief sets all resolutions to the menu 174 \param menu the Menu to set The resolutions to. 175 */ 149 176 void GuiVideo::getResolutions(Menu* menu) 150 177 { -
orxonox/trunk/src/lib/gui/gui/gui_video.h
r4056 r4064 8 8 #include "gui.h" 9 9 #include "gui_element.h" 10 #include "gui_gtk.h" 10 11 // FORWARD DECLARATIONS 12 class Widget; 13 class Menu; 11 14 12 15 //! Class that creates the Video-Options. … … 14 17 { 15 18 private: 16 Frame* videoFrame; //!< The Frame that holds the video options. 17 Box* videoBox; //!< The Box that holds the video options. 18 CheckButton* fullscreen; //!< CheckButton for fullscreen-mode 19 Menu* resolution; //!< Menu for the resolution 20 CheckButton* wireframe; //!< CheckButton for wireframe Mode. 21 22 // advanced-Performance-Options 23 Window* advancedWindow; //!< A Window to display advanced options. 24 Button* advancedButton; //!< A Button to open the Advanced Video Performance Window. 25 Box* advancedBox; //!< A Box to pack the options into. 26 CheckButton* shadows; //!< CheckButton for shadows 27 CheckButton* fog; //!< CheckButton for fog. 28 CheckButton* reflections; //!< CheckButton for reflections 29 CheckButton* textures; //!< CheckButton for textures 30 Menu* textureDetail; //!< Menu for the Texture-Detail. 31 32 Label* modelDetailLabel; //!< Label for model-detail. 33 Menu* modelDetail; //!< model-detail. 34 35 Label* antiAliasingLabel; //!< Label for the anti-aliasing mode. 36 Menu* antiAliasing; //!< Menu for the Antialiasing-mode. 37 38 Label* filterMethodLabel; //!< Label for filtering-Method. 39 Menu* filterMethod; //!< Menu for filtering Method. 40 41 Button* closeButton; //!< A Button to close the Advanced-settingsWindow. 42 43 Button* advancedWindowGetButton(void); 44 void advancedWindowCreate(void); 19 // Button* advancedWindowGetButton(void); 45 20 46 21 public: … … 48 23 ~GuiVideo(void); 49 24 25 private: 50 26 void getResolutions(Menu* menu); 51 52 27 Widget* advancedWindowCreate(void); 53 28 }; 54 29 #endif /* _GUI_VIDEO_H */
Note: See TracChangeset
for help on using the changeset viewer.