42 m_bImageButton =
false;
45 togglePersistent(M_FALSE);
46 toggleRepetitive(M_FALSE);
48 m_bImageButton =
false;
51 uiButton::~uiButton(
void)
58 texbtn_n = _pSkin->parameter(
"TX_BUTTON").texture();
59 texbtn_p = _pSkin->parameter(
"TX_BUTTONP").texture();
74 laRenderer* r = ::laSystemIntegrator::getRenderer();
75 double dEdgeWidth = (texbtn.w)*0.25;
82 _ptPos + laPoint3(dEdgeWidth, 0),
_ptSize - laPoint3(2*dEdgeWidth, 0),
95 laRenderer* r = ::laSystemIntegrator::getRenderer();
99 r->transTranslate( laPoint3(3,3) );
100 r->styleSet( _pSkin->parameter(
"CL_SHADOW").color() );
105 laColor col = _pSkin->parameter(
"CL_BUTTON").color();
106 if(!isEnabled()) { col[0]*= 0.8; col[1]*= 0.8; col[2]*= 0.8; }
109 if(texbtn.id() == texbtn_p.id())
113 r->transTranslate( laPoint3(1,1) );
129 _ptPos + laPoint3(16, 7 ),
_ptSize + laPoint3( -2*16, -2*7 ),
132 r->styleSet(laColor(255));
142 if( _bRepetitiveInformer && (texbtn.id() == texbtn_p.id()))
144 if(pReceiver!=NULL) pReceiver->
onCommand(getID(), 0);
152 void uiButton::onDown(
unsigned nButton)
155 if(texbtn.id() == texbtn_p.id())
168 if(pReceiver!=NULL) pReceiver->
onCommand(getID(), 0);
174 void uiButton::onUp(
unsigned nButton)
183 if(pReceiver!=NULL) pReceiver->
onCommand(getID(), 0);
188 void uiButton::onMouseOut()
void kill()
Discard window and all children.
laPoint3 _ptPos
Windos position (relative to parent)
virtual void vquadsDrawSingle(laPoint2 *ar_uv=NULL)=0
Draw a single VQ (Note this is slower than drawing an array of VQ and should be avoided) ...
void vquadsMakeXYRect(unsigned nIndex, const laPoint3 &pos, const laPoint3 &sz, const laPoint2 &uv, const laPoint2 &uv_sz)
Makes a quad aligned to the XY plane; (handy for GUI rendering )
virtual void create(laPoint3 pos, laPoint3 size)
Create new empty window.
laPoint3 _ptSize
Window size.
uiWindow * _pParent
Pointer to parent window, if any.
virtual void vquadsDraw(unsigned nQuads, laPoint2 *ar_uv=NULL, laColor *ar_color=NULL, M_BOOL bBillboards=M_FALSE, M_BOOL bUseColorArrays=M_FALSE)=0
Draw an array of VQ, starting with the psecified pointers (or the first VQ if null) ...
virtual void draw()
Draw event.
Virtual interface for the Engine graphics renderer.
virtual void reply()
Handle input message.
virtual void onCommand(unsigned long uID, unsigned long nCmd)
Command event handler.