#include <TAPsOpenGLCtrlButton.hpp>


Public Member Functions | |
| virtual void | Default () |
| virtual void | Draw () |
| OpenGLCtrlButton () | |
| virtual | ~OpenGLCtrlButton () |
Definition at line 21 of file TAPsOpenGLCtrlButton.hpp.
| BEGIN_NAMESPACE_TAPs__OpenGL OpenGLCtrlButton::OpenGLCtrlButton | ( | ) |
Definition at line 19 of file TAPsOpenGLCtrlButton.cpp.
00020 : OpenGLCtrl() 00021 { 00022 Default(); 00023 }
| OpenGLCtrlButton::~OpenGLCtrlButton | ( | ) | [virtual] |
| void OpenGLCtrlButton::Default | ( | ) | [virtual] |
Reimplemented from OpenGLCtrl.
Definition at line 33 of file TAPsOpenGLCtrlButton.cpp.
00034 { 00035 SetSize( 50, 20 ); 00036 SetText( "Push" ); 00037 m_BorderSize = 4; 00038 // 00039 m_ForegroundColor[0] = 1.0; 00040 m_ForegroundColor[1] = 1.0; 00041 m_ForegroundColor[2] = 1.0; 00042 m_ForegroundColor[3] = 0.90; 00043 // 00044 m_BackgroundColor[0] = 0.25; 00045 m_BackgroundColor[1] = 0.25; 00046 m_BackgroundColor[2] = 0.25; 00047 m_BackgroundColor[3] = 0.90; 00048 }
| void OpenGLCtrlButton::Draw | ( | ) | [virtual] |
The start (x,y) is the left-bottom point of a bounding box. A subclass that overrides this method should use start (x,y) as drawing w/o border. Another words, the border is extended from the start (x,y).
Hence, in order to use border as the starting point for drawing, the code below can be used.
SetStartPos( GetBorder() + x, GetBorder() + y );
Where (x,y) is the starting position.
Implements OpenGLCtrl.
Definition at line 55 of file TAPsOpenGLCtrlButton.cpp.
00056 { 00057 DrawBackgroundAndBorder(); 00058 DrawText(); 00059 }
1.5.6