Changeset 7929 in orxonox.OLD for branches/gui/src
- Timestamp:
- May 28, 2006, 7:15:24 PM (19 years ago)
- Location:
- branches/gui/src/lib/gui/gl_gui
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl_gui/glgui_checkbutton.cc
r7928 r7929 68 68 69 69 70 void GLGuiCheckButton::released( )70 void GLGuiCheckButton::released(const Vector2D& pos) 71 71 { 72 72 printf("%s released\n", this->getLabel().c_str()); 73 GLGuiWidget::released( );73 GLGuiWidget::released(pos); 74 74 this->toggleActiveState(); 75 75 } -
branches/gui/src/lib/gui/gl_gui/glgui_checkbutton.h
r7925 r7929 26 26 virtual ~GLGuiCheckButton(); 27 27 28 virtual void released( );28 virtual void released(const Vector2D& pos); 29 29 30 30 bool isActive() { return this->bActive; }; -
branches/gui/src/lib/gui/gl_gui/glgui_handler.cc
r7919 r7929 107 107 { 108 108 if (GLGuiWidget::focused()->clickable()) 109 GLGuiWidget::focused()->click(); 109 { 110 GLGuiWidget::focused()->click(Vector2D(event.x, event.y) - GLGuiWidget::focused()->getAbsCoor2D()); 111 } 110 112 } 111 113 else 112 114 { 113 115 if (GLGuiWidget::focused()->clickable()) 114 GLGuiWidget::focused()->release( );116 GLGuiWidget::focused()->release(Vector2D(event.x, event.y) - GLGuiWidget::focused()->getAbsCoor2D()); 115 117 } 116 118 } -
branches/gui/src/lib/gui/gl_gui/glgui_pushbutton.cc
r7928 r7929 74 74 } 75 75 76 void GLGuiPushButton::clicked( )76 void GLGuiPushButton::clicked(const Vector2D& pos) 77 77 { 78 78 printf("%s clicked\n", this->getLabel().c_str()); 79 GLGuiWidget::clicked( );79 GLGuiWidget::clicked(pos); 80 80 } 81 81 82 82 83 void GLGuiPushButton::released( )83 void GLGuiPushButton::released(const Vector2D& pos) 84 84 { 85 85 printf("%s released\n", this->getLabel().c_str()); 86 GLGuiWidget::released( );86 GLGuiWidget::released(pos); 87 87 } 88 88 -
branches/gui/src/lib/gui/gl_gui/glgui_pushbutton.h
r7925 r7929 29 29 virtual void receivedFocus(); 30 30 virtual void removedFocus(); 31 virtual void clicked( );32 virtual void released( );31 virtual void clicked(const Vector2D& pos); 32 virtual void released(const Vector2D& pos); 33 33 34 34 -
branches/gui/src/lib/gui/gl_gui/glgui_slider.cc
r7928 r7929 43 43 void GLGuiSlider::init() 44 44 { 45 45 46 this->setClassID(CL_GLGUI_SLIDER, "GLGuiSlider"); 47 48 this->setClickable( ); 49 this->setFocusable( ); 50 46 51 this->_value = 0.0; 47 52 this->_minValue = 0.0; -
branches/gui/src/lib/gui/gl_gui/glgui_slider.h
r7928 r7929 17 17 //! This is part of the openglGUI class 18 18 /** 19 * 19 * The Slider is a Widget, with a Range and a Value. 20 20 */ 21 21 class GLGuiSlider : public GLGuiWidget … … 43 43 void setStep(float step); 44 44 45 virtual void draw() const; 45 46 46 virtual void draw() const;47 47 protected: 48 48 void resize(); -
branches/gui/src/lib/gui/gl_gui/glgui_widget.cc
r7925 r7929 111 111 112 112 113 void GLGuiWidget::click( )113 void GLGuiWidget::click(const Vector2D& pos) 114 114 { 115 115 assert (!this->_pushed); … … 117 117 this->_pushed = true; 118 118 119 this->clicked( );120 } 121 122 void GLGuiWidget::release( )119 this->clicked(pos); 120 } 121 122 void GLGuiWidget::release(const Vector2D& pos) 123 123 { 124 124 if (this->_pushed) … … 126 126 this->widgetSignals[Signal_release]("none"); 127 127 128 this->released( );128 this->released(pos); 129 129 this->_pushed = false; 130 130 } … … 132 132 133 133 134 void GLGuiWidget::clicked( )134 void GLGuiWidget::clicked(const Vector2D& pos) 135 135 { 136 136 this->frontMaterial().setDiffuse(0, 0, 1); … … 138 138 } 139 139 140 void GLGuiWidget::released( )140 void GLGuiWidget::released(const Vector2D& pos) 141 141 { 142 142 this->frontMaterial().setDiffuse(0,1,0); -
branches/gui/src/lib/gui/gl_gui/glgui_widget.h
r7928 r7929 83 83 84 84 /// CLICK 85 void click( );86 void release( );85 void click(const Vector2D& pos); 86 void release(const Vector2D& pos); 87 87 bool clickable() const { return this->_clickable; }; 88 88 void setClickable(bool clickable = true) { this->_clickable = clickable; }; … … 127 127 128 128 // if something was clickt on the GUI-widget. 129 virtual void clicked( );130 virtual void released( );129 virtual void clicked(const Vector2D& pos); 130 virtual void released(const Vector2D& pos); 131 131 virtual void receivedFocus(); 132 132 virtual void removedFocus();
Note: See TracChangeset
for help on using the changeset viewer.