Changeset 5955 in orxonox.OLD for branches/powerups/src/lib/gui/gtk_gui
- Timestamp:
- Dec 7, 2005, 1:05:10 PM (19 years ago)
- Location:
- branches/powerups/src/lib/gui/gtk_gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/powerups/src/lib/gui/gtk_gui/gui_audio.cc
r5298 r5955 42 42 { 43 43 CheckButton* enableSound; //!< A Ckeckbutton for enabling Sound. 44 Slider* audioChannels; //!< A Slider for the count of audio-channels. 44 45 Slider* musicVolume; //!< A Slider for music volume. 45 46 Slider* effectsVolume; //!< A Slider for effects volume. … … 51 52 enableSound->saveability(); 52 53 audioBox->fill(enableSound); 54 55 Label* audioChannelsLabel = new Label(CONFIG_NAME_AUDIO_CHANNELS); 56 audioBox->fill(audioChannelsLabel); 57 audioChannels = new Slider(CONFIG_NAME_AUDIO_CHANNELS, 0, 32); 58 audioChannels->setFlagName("channels", "c", 32); 59 audioChannels->setDescription("Sets the count of channels in the game"); 60 audioChannels->saveability(); 61 audioBox->fill (audioChannels); 62 63 53 64 Label* musicVolumeLabel = new Label(CONFIG_NAME_MUSIC_VOLUME); 54 65 audioBox->fill(musicVolumeLabel); … … 58 69 musicVolume->saveability(); 59 70 audioBox->fill (musicVolume); 71 60 72 Label* effectsVolumeLabel = new Label (CONFIG_NAME_EFFECTS_VOLUME); 61 73 audioBox->fill (effectsVolumeLabel); -
branches/powerups/src/lib/gui/gtk_gui/gui_exec.cc
r5241 r5955 27 27 28 28 #include "resource_manager.h" 29 #include " ini_parser.h"29 #include "parser/ini_parser/ini_parser.h" 30 30 31 31 #include <string.h> … … 254 254 255 255 /** 256 * Reads in Configuration Data.256 * @brief Reads in Configuration Data. 257 257 * @param widget from which Widget on should be saved. 258 258 */ … … 265 265 return; 266 266 267 iniParser. getFirstSection();267 iniParser.firstSection(); 268 268 Widget* groupWidget = widget; 269 269 const char* groupName; … … 272 272 while (groupName = iniParser.getCurrentSection()) 273 273 { 274 printf("GROUP:::%s\n", groupName); 274 275 if((groupWidget = locateGroup(widget, groupName, 1))==NULL) 275 {276 277 278 279 }276 { 277 PRINTF(2)("!!There is no group called %s in this GUI.\n First best Widget will get the Infos assigned.\n Config-File will be updated in next Save\n", groupName); 278 groupWidget = widget; 279 continue; 280 } 280 281 else 281 PRINT(0)("Group %s located.\n", static_cast<Packer*>(groupWidget)->groupName); 282 283 iniParser.getFirstVar(); 284 while(iniParser.getCurrentName()) 285 { 286 varInfo.variableName = iniParser.getCurrentName(); 282 PRINT(4)("Group %s located.\n", static_cast<Packer*>(groupWidget)->groupName); 283 284 const char* entryName; 285 iniParser.firstVar(); 286 while(entryName = iniParser.getCurrentName()) 287 { 288 PRINTF(4)("ENTRY:::%s = %s\n", entryName, iniParser.getCurrentValue()); 289 varInfo.variableName = entryName; 287 290 varInfo.variableValue = iniParser.getCurrentValue(); 288 291 groupWidget->walkThrough(this->readFileText, &varInfo, 0); … … 303 306 { 304 307 VarInfo* info =(VarInfo*)varInfo; 308 if (info == NULL || info->variableName == NULL) 309 return; 310 305 311 if(widget->title && !strcmp(widget->title, info->variableName)) 306 312 { 307 313 PRINT(5)("Located Option %s.\n", widget->title); 308 314 if(widget->optionType > GUI_NOTHING) 309 static_cast<Option*>(widget)->load(info->variableValue); 315 if (info->variableValue != NULL) 316 static_cast<Option*>(widget)->load(info->variableValue); 310 317 } 311 318 } … … 323 330 { 324 331 Widget* tmp; 332 if (widget == NULL || groupName == NULL) 333 return NULL; 325 334 326 335 if(widget->optionType < GUI_NOTHING) 327 336 { 328 if(static_cast<Packer*>(widget)->getGroupName() &&337 if(static_cast<Packer*>(widget)->getGroupName() != NULL && 329 338 !strcmp(groupName, static_cast<Packer*>(widget)->getGroupName())) 330 { 331 return widget; 332 } 339 return widget; 333 340 else 334 341 { 335 if((tmp = locateGroup(static_cast<Packer*>(widget)->down, groupName, depth+1)) != NULL) 342 if((tmp = locateGroup(static_cast<Packer*>(widget)->down, 343 groupName, depth+1)) != NULL) 336 344 return tmp; 337 345 } -
branches/powerups/src/lib/gui/gtk_gui/gui_keys.cc
r5766 r5955 119 119 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_LEFT, "LEFT")); 120 120 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_RIGHT, "RIGHT")); 121 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_FIRE, " MOUSE_LEFT"));121 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_FIRE, "BUTTON_LEFT")); 122 122 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_NEXT_WEAPON, "m")); 123 123 pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_PREV_WEAPON, "n"));
Note: See TracChangeset
for help on using the changeset viewer.