39 uiEdit* uiEdit::pactive = NULL;
52 caret = _pSkin->parameter(
"TX_CARET").texture();
53 texbtn = _pSkin->parameter(
"TX_EDIT").texture();
65 _ttBlink.parameters(0.5, 0.5, M_TRUE);
66 _ttBlink.enable(M_TRUE);
72 _ttType.parameters(0.1, 0.1, M_FALSE);
73 _ttType.enable(M_FALSE);
84 laRenderer* pr = ::laSystemIntegrator::getRenderer();
86 double dLWidth = (texbtn.w)/4.0;
95 _ptPos + laPoint3(dLWidth, 0),
96 _ptSize - laPoint3(2*dLWidth, 0),
103 pr->styleSet( _pSkin->parameter(
"CL_CONTAINER").color() );
110 pr->transTranslate( laPoint3( dLWidth, 0) );
111 _rgbCustom = _pSkin->parameter(
"CL_EDIT_TXT").color();
113 if( (pactive ==
this) && (_ttBlink.isElapsed()) )
126 laTimer* t = laSystemIntegrator::getEnvironment()->
getTimer();
127 _ttBlink.animate(*t);
138 if( _ttType.isEnabled())
140 if(_ttType.isElapsed())
144 _ttType.enable(M_FALSE);
155 char c = in::ascii();
157 if(in::key(KEY_BACK))
165 laFont *f = _pSkin->parameter(
"FN_DEFAULT").font();
166 if( f->lenght(
_strText) >= getSize().x()-2*16)
179 _ttType.enable(M_TRUE);
185 void uiEdit::onClick(
unsigned nButton)
void kill()
Discard window and all children.
laPoint3 _ptPos
Windos position (relative to parent)
virtual void kill()
Discard window and all children.
laTimer * getTimer()
Get inegrated timer.
virtual void create(laPoint3 pos, laPoint3 size)
Create new empty window.
char _strText[256]
Text string.
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.
#define M_AM
Text align middle.
#define M_AL
Text align left.
laPoint3 _ptSize
Window size.
M_BOOL _bCustomColor
Custom color, or use skin color if not set.
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) ...
void reply()
Handle input message.
virtual void draw()
Draw event.
Virtual interface for the Engine graphics renderer.
virtual void reply()
Handle input message.