Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3379 in orxonox.OLD


Ignore:
Timestamp:
Jan 24, 2005, 2:34:16 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/updater: implemented advanced-Video-Options. Patrick I believe you will need them…
could not resist, during looking StarTreck TNG, after listening to graphical data processing.

Location:
orxonox/branches/updater/src/gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/gui/orxonox_gui.cc

    r3318 r3379  
    6060  initGUI(argc, argv);
    6161
    62   orxonoxGUI = new Window( "Grafical OrxOnoX loader, "PACKAGE_VERSION);
     62  orxonoxGUI = new Window( "grafical orxonox loader, "PACKAGE_VERSION);
    6363 
    6464  Box* windowBox = new Box ('h');
     
    9393 
    9494  orxonoxGUI->fill(windowBox);
    95   flags->setTextFromFlags(orxonoxGUI);
    9695
    9796  // Reading Values from File
     
    102101    orxonoxGUI->walkThrough(Widget::flagCheck, argv[optCount], 0);
    103102
    104 
     103  flags->setTextFromFlags(orxonoxGUI);
    105104  orxonoxGUI->showall();
    106105
  • orxonox/branches/updater/src/gui/orxonox_gui_exec.cc

    r3318 r3379  
    154154  int counter = 0;
    155155  while(counter < depth &&((widget->isOption>0
    156                               &&(static_cast<Option*>(widget)->isSaveable()) )
     156                              &&(static_cast<Option*>(widget)->isSaveable()))
    157157                             ||(widget->isOption<0
    158                                  && static_cast<Packer*>(widget)->getGroupName())))
     158                                && static_cast<Packer*>(widget)->getGroupName())))
    159159    {
    160160      fprintf(this->CONFIG_FILE, "  ", depth);
     
    224224                  groupWidget = widget;
    225225                }
     226              else
     227                PRINT(3)("Group %s located.\n", static_cast<Packer*>(groupWidget)->groupName);
    226228            }
    227229          // option-setting //
     
    245247    }
    246248}
     249
    247250/**
    248251   \brief Maps Confugurations to the Options.
     
    253256{
    254257  VarInfo* info =(VarInfo*)varInfo;
    255 
    256   if(widget->isOption >= 1 && widget->isOption <= 3)
    257     {
    258       if(!strcmp(static_cast<Option*>(widget)->title, info->variableName))
    259         static_cast<Option*>(widget)->value = atoi(info->variableValue);
    260     }
    261   else if(widget->isOption == 5)
    262     {
    263        if(!strcmp(static_cast<Option*>(widget)->title, info->variableName))
     258  if(widget->title && !strcmp(widget->title, info->variableName))
     259    {
     260      PRINT(3)("Located Option %s.\n", widget->title);
     261      if(widget->isOption >= 1 && widget->isOption <= 3)
     262        {
     263          static_cast<Option*>(widget)->value = atoi(info->variableValue);
     264          static_cast<Option*>(widget)->redraw(); //!< \todo change this to setValue.
     265        }
     266      else if(widget->isOption == 5)
    264267        static_cast<OptionLabel*>(widget)->setValue(info->variableValue);
    265268    }
  • orxonox/branches/updater/src/gui/orxonox_gui_video.cc

    r3318 r3379  
    4545  this->videoBox->fill(wireframe);
    4646
     47  this->advancedWindowCreate();
     48  this->videoBox->fill(this->advancedWindowGetButton());
     49
    4750  this->videoFrame->fill(videoBox);
    4851}
     
    6366  return this->videoFrame;
    6467}
     68
     69
     70/**
     71   \brief Creates a window, and all it contains for the Source-update.
     72*/
     73void OrxonoxGuiVideo::advancedWindowCreate(void)
     74{
     75  // the button, that opens this Window.
     76  this->advancedButton = new Button("advanced");
     77
     78  // 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->saveability();
     103  this->advancedBox->fill(this->textureDetail);
     104
     105  this->modelDetailLabel = new Label("Model Detail");
     106  this->advancedBox->fill(this->modelDetailLabel);
     107  this->modelDetail = new Menu("Model Detail", "low", "medium", "high", "lastItem");
     108  this->modelDetail->saveability();
     109  this->advancedBox->fill(this->modelDetail);
     110
     111  this->antiAliasingLabel = new Label("Anti-Aliasing-depth:");
     112  this->advancedBox->fill(this->antiAliasingLabel);
     113  this->antiAliasing = new Menu("Anti Aliasing", "0", "1", "2", "4", "8",  "lastItem");
     114  this->antiAliasing->saveability();
     115  this->advancedBox->fill(this->antiAliasing);
     116
     117  this->filterMethodLabel = new Label("Filtering Method:");
     118  this->advancedBox->fill(this->filterMethodLabel);
     119  this->filterMethod = new Menu("Filtering Method", "none", "linear", "bilinear", "trilinear", "anisortopic", "lastItem");
     120  this->filterMethod->saveability();
     121  this->advancedBox->fill(this->filterMethod);
     122 
     123  this->closeButton = new Button("close");
     124  this->advancedBox->fill(this->closeButton);
     125
     126  this->advancedWindow->fill(advancedBox);
     127#ifdef HAVE_GTK2
     128  this->advancedButton->connectSignal("button_press_event", this->advancedWindow, Window::windowOpen);
     129  this->closeButton->connectSignal("button_press_event", this->advancedWindow, Window::windowClose);
     130  this->advancedWindow->connectSignal("destroy", this->advancedWindow, Window::windowClose);
     131  this->advancedWindow->connectSignal("delete_event", this->advancedWindow, Window::windowClose);
     132#endif /* HAVE_GTK2 */
     133   Window::addWindow(this->advancedWindow);
     134
     135}
     136
     137/**
     138   \returns A Pointer to the Button of the UpdaterSourceWindow
     139*/
     140Button* OrxonoxGuiVideo::advancedWindowGetButton(void)
     141{
     142  return this->advancedButton;
     143}
     144
  • orxonox/branches/updater/src/gui/orxonox_gui_video.h

    r3315 r3379  
    1616  CheckButton* fullscreen;  //!< CheckButton for fullscreen-mode
    1717  CheckButton* wireframe;   //!< CheckButton for wireframe Mode.
     18
     19  // advanced-Performance-Options
     20  Window* advancedWindow;   //!< A Window to display advanced options.
     21  Button* advancedButton;   //!< A Button to open the Advanced Video Performance Window.
     22  Box* advancedBox;         //!< A Box to pack the options into.
     23  CheckButton* shadows;     //!< CheckButton for shadows
     24  CheckButton* fog;         //!< CheckButton for fog.
     25  CheckButton* reflections; //!< CheckButton for reflections
     26  CheckButton* textures;    //!< CheckButton for textures
     27  Menu* textureDetail;      //!< Menu for the Texture-Detail.
     28 
     29  Label* modelDetailLabel;  //!< Label for model-detail.
     30  Menu* modelDetail;        //!< model-detail.
     31 
     32  Label* antiAliasingLabel; //!< Label for the anti-aliasing mode.
     33  Menu* antiAliasing;       //!< Menu for the Antialiasing-mode.
     34
     35  Label* filterMethodLabel; //!< Label for filtering-Method.
     36  Menu* filterMethod;       //!< Menu for filtering Method.
     37
     38  Button* closeButton;      //!< A Button to close the Advanced-settingsWindow.
     39
     40  Button* advancedWindowGetButton(void);
     41  void advancedWindowCreate(void);
     42 
    1843 public:
    1944  OrxonoxGuiVideo(void);
Note: See TracChangeset for help on using the changeset viewer.