Changeset 5395 in orxonox.OLD for trunk/src/lib/gui/gl_gui
- Timestamp:
- Oct 17, 2005, 10:14:14 PM (19 years ago)
- Location:
- trunk/src/lib/gui/gl_gui
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/glgui_button.cc
r5363 r5395 18 18 #include "glgui_button.h" 19 19 20 #include "text.h" 21 20 22 using namespace std; 21 23 … … 35 37 GLGuiButton::~GLGuiButton() 36 38 { 37 39 /* this does not have to be done, since the Label is a child, 40 * and will be deleted by Element2D's deletion Process 41 * delete this->label; 42 */ 38 43 } 39 44 … … 45 50 this->setClassID(CL_GLGUI_BUTTON, "GLGuiButton"); 46 51 52 this->label = new Text(); 53 this->label->setParent2D(this); 47 54 } 55 56 void GLGuiButton::setLabel(const char* label) 57 { 58 this->label->setText(label); 59 } 60 48 61 49 62 /** -
trunk/src/lib/gui/gl_gui/glgui_button.h
r5371 r5395 31 31 32 32 public: 33 GLGuiButton();34 virtual ~GLGuiButton();33 GLGuiButton(); 34 virtual ~GLGuiButton(); 35 35 36 void init(); 36 void init(); 37 void setLabel(const char* label); 37 38 38 virtual void draw();39 virtual void draw(); 39 40 40 private: 41 protected: 42 Text* label; 41 43 42 char* text; 43 GLGui_ButtonState state; 44 private: 44 45 46 GLGui_ButtonState state; 45 47 }; 46 48 -
trunk/src/lib/gui/gl_gui/glgui_checkbutton.cc
r5366 r5395 17 17 18 18 #include "glgui_checkbutton.h" 19 20 #include "text.h" 19 21 20 22 using namespace std; -
trunk/src/lib/gui/gl_gui/glgui_checkbutton.h
r5391 r5395 27 27 void setActivity(bool bActive); 28 28 29 virtual void draw(); 29 virtual void draw() const {}; 30 virtual void update() {}; 30 31 31 32 private: -
trunk/src/lib/gui/gl_gui/glgui_pushbutton.cc
r5364 r5395 17 17 18 18 #include "glgui_pushbutton.h" 19 20 #include "text.h" 19 21 20 22 using namespace std; … … 50 52 * draws the GLGuiPushButton 51 53 */ 52 void GLGuiPushButton::draw() 54 void GLGuiPushButton::draw() const 55 { 56 this->label->draw(); 57 58 } 59 60 /** 61 * updates the GLGuiPushButton 62 */ 63 void GLGuiPushButton::update() 53 64 { 54 65 -
trunk/src/lib/gui/gl_gui/glgui_pushbutton.h
r5364 r5395 24 24 void init(); 25 25 26 virtual void draw() ;27 26 virtual void draw() const; 27 virtual void update(); 28 28 private: 29 29 -
trunk/src/lib/gui/gl_gui/glgui_widget.cc
r5392 r5395 34 34 /** 35 35 * standard deconstructor 36 */36 */ 37 37 GLGuiWidget::~GLGuiWidget() 38 38 { … … 98 98 } 99 99 100 101 void GLGuiWidget::show() 102 { 103 this->setVisibility(true); 104 } -
trunk/src/lib/gui/gl_gui/glgui_widget.h
r5392 r5395 61 61 62 62 virtual void update() = 0; 63 virtual void draw() const = 0; 63 64 64 65 protected: … … 69 70 GLuint frontModel; 70 71 72 private: 71 73 Signal* widgetSignals[GLGuiSignalCount]; 72 74 73 private:74 75 bool focusable; //!< If this widget can receive focus. 75 76 bool clickable; //!< if this widget can be clicked upon.
Note: See TracChangeset
for help on using the changeset viewer.