Changeset 7924 in orxonox.OLD for branches/gui
- Timestamp:
- May 28, 2006, 5:04:08 PM (19 years ago)
- Location:
- branches/gui/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl_gui/glgui.h
r7919 r7924 7 7 #define _GLGUI_H 8 8 9 #include "glgui_defs.h" 9 10 #include "glgui_handler.h" 10 11 -
branches/gui/src/lib/gui/gl_gui/glgui_cursor.cc
r7919 r7924 88 88 89 89 90 this->setAbsCoor Soft2D(newPos, 10);90 this->setAbsCoor2D(newPos); 91 91 movement = Vector2D(); 92 92 } -
branches/gui/src/lib/gui/gl_gui/glgui_slider.h
r7919 r7924 26 26 virtual ~GLGuiSlider(); 27 27 28 void init(); 28 /** @returns the Value of the Slider. */ 29 float value() const { return this->_value; } 30 /** @returns the minimum of the sliders range */ 31 float min() const { return this->_minValue; }; 32 /** @returns the maximum of the sliders range */ 33 float max() const { return this->_maxValue; }; 34 /** @returns the step size */ 35 float step() const { return this->_step; }; 36 37 void setValue(float value); 38 39 void setMin(float minimum); 40 void setMax(float maximum); 41 void setRange(float minimum, float maximum); 42 43 void setStep(float step); 44 29 45 30 46 virtual void draw() const; 31 47 32 48 private: 49 void init(); 50 private: 51 33 52 Orientation orientation; 34 53 35 54 float _maxValue; 36 55 float _minValue; 56 float _step; 37 57 38 58 float _value; -
branches/gui/src/lib/gui/gl_gui/glgui_widget.cc
r7919 r7924 28 28 29 29 /** 30 * standard constructor30 * @brief standard constructor 31 31 */ 32 GLGuiWidget::GLGuiWidget ( 32 GLGuiWidget::GLGuiWidget (GLGuiWidget* parent) 33 33 { 34 34 this->init(); 35 } 36 37 38 /** 39 * standard deconstructor 35 36 if (parent != NULL) 37 parent->addChild2D(this); 38 } 39 40 41 /** 42 * @brief standard deconstructor 40 43 */ 41 44 GLGuiWidget::~GLGuiWidget() … … 63 66 this->setVisibility(GLGUI_WIDGET_DEFAULT_VISIBLE); 64 67 65 this-> backMat.setDiffuse(1.0, 1.0, 1.0);66 this-> frontMat.setDiffuse(1.0, 0.0, 0.0);68 this->_backMat.setDiffuse(1.0, 1.0, 1.0); 69 this->_frontMat.setDiffuse(1.0, 0.0, 0.0); 67 70 68 71 this->widgetSignals.resize(SignalCount, SignalConnector()); … … 130 133 void GLGuiWidget::released() 131 134 { 132 this->frontMat .setDiffuse(0,1,0);135 this->frontMaterial().setDiffuse(0,1,0); 133 136 134 137 } … … 194 197 void GLGuiWidget::draw() const 195 198 { 196 this->backMat .select();199 this->backMaterial().select(); 197 200 198 201 glBegin(GL_QUADS); -
branches/gui/src/lib/gui/gl_gui/glgui_widget.h
r7919 r7924 53 53 54 54 public: 55 GLGuiWidget( );55 GLGuiWidget(GLGuiWidget* parent = NULL); 56 56 virtual ~GLGuiWidget(); 57 57 … … 92 92 93 93 /// MATERIAL (looks) 94 Material& backMaterial() { return this->backMat; }; 95 const Material& backMaterial() const { return this->backMat; }; 94 Material& backMaterial() { return this->_backMat; }; 95 const Material& backMaterial() const { return this->_backMat; }; 96 Rect2D& backRect() { return this->_backRect; }; 97 const Rect2D& backRect() const { return this->_backRect; }; 96 98 97 Material& frontMaterial() { return this->frontMat; }; 98 const Material& frontMaterial() const { return this->frontMat; }; 99 Material& frontMaterial() { return this->_frontMat; }; 100 const Material& frontMaterial() const { return this->_frontMat; }; 101 Rect2D& frontRect() { return this->_frontRect; }; 102 const Rect2D& frontRect() const { return this->_frontRect; }; 103 104 inline void drawRect(const Rect2D& rect) { 105 glBegin(GL_QUADS); 106 glTexCoord2i(0,0); glVertex2d(rect.left(), rect.top()); 107 glTexCoord2i(0,1); glVertex2d(rect.left(), rect.bottom()); 108 glTexCoord2i(1,1); glVertex2d(rect.right(), rect.bottom()); 109 glTexCoord2i(1,0); glVertex2d(rect.right(), rect.top()); 110 glEnd(); 111 } 99 112 100 113 /** @param the Event to process. @returns true if the Event has been consumed*/ … … 123 136 private: 124 137 /// LOOKS 125 Material backMat;126 Rect2D backRect;138 Material _backMat; 139 Rect2D _backRect; 127 140 128 Material frontMat;129 Rect2D frontRect;141 Material _frontMat; 142 Rect2D _frontRect; 130 143 131 144 -
branches/gui/src/story_entities/simple_game_menu.cc
r7919 r7924 66 66 /// GUI 67 67 ///(this is as modular as it is possible). 68 /* 68 69 OrxGui::GLGuiPushButton* pb = new OrxGui::GLGuiPushButton("PUSH ME"); 69 70 pb->connectSignal(OrxGui::Signal_release, this, createExecutor<SimpleGameMenu>(&SimpleGameMenu::enterGui)); … … 73 74 OrxGui::GLGuiHandler::getInstance()->activateCursor(); 74 75 OrxGui::GLGuiHandler::getInstance()->activate(); 76 */ 75 77 ///// 76 78 -
branches/gui/src/story_entities/simple_game_menu.h
r7919 r7924 31 31 32 32 public: 33 std::vector<TextElement*> 33 std::vector<TextElement*> menuList; //!< the list of the menu items 34 34 std::vector<StoryEntity*> storyList; //!< the list of the StoryEntities for the menu 35 35 std::vector<ImageEntity*> screenshootList; //!< list of the screen shoots FIXME: make a better structure for this stuff
Note: See TracChangeset
for help on using the changeset viewer.