Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/gui/orxonox_gui_video.cc @ 3423

Last change on this file since 3423 was 3423, checked in by bensch, 19 years ago

orxonox/trunk: merged branches/updater back into the trunk
merged with command: svn merge branches/updater trunk -r 3241:HEAD
resolved conflicts in debug.h in favor of the trunk.

File size: 4.5 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   This program is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with this program; if not, write to the Free Software Foundation,
18   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
19
20
21   ### File Specific:
22   main-programmer: Benjamin Grauer
23
24*/
25
26
27#include "orxonox_gui_video.h"
28
29/**
30   \brief Creates the Video-Option-Frame
31*/
32OrxonoxGuiVideo::OrxonoxGuiVideo(void)
33{
34  this->videoFrame = new Frame("Video-Options:");
35  this->videoBox = new Box('v');
36  this->videoFrame->setGroupName("video");
37 
38  this->fullscreen = new CheckButton("Fullscreen-mode");
39  this->fullscreen->setFlagName("windowed", "q", 1);
40  this->fullscreen->saveability();
41  this->videoBox->fill(fullscreen);
42  this->wireframe = new CheckButton("WireFrame-mode");
43  this->wireframe->setFlagName("wireframe", "w", 0);
44  this->wireframe->saveability();
45  this->videoBox->fill(wireframe);
46
47  this->advancedWindowCreate();
48  this->videoBox->fill(this->advancedWindowGetButton());
49
50  this->videoFrame->fill(videoBox);
51}
52
53/**
54   \brief Destructs the Video-stuff
55*/
56OrxonoxGuiVideo::~OrxonoxGuiVideo(void)
57{
58  // nothing to do here.
59}
60
61/**
62   \return Returns the Video-frame
63*/
64Widget* OrxonoxGuiVideo::getWidget(void)
65{
66  return this->videoFrame;
67}
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
Note: See TracBrowser for help on using the repository browser.