Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void CheckBox3D::Draw ( int  fontBase,
bool  drawText = true,
bool  hitDetect = false 
) [inline]

Definition at line 112 of file CxCheckBoxDrum.h.

References mChecked, mCheckedBorderType, mCheckedBoxType, mHeight, mOglWnd, mShadow2D, mText, mUnCheckedBorderType, mUnCheckedBoxType, mWidth, and ShadeRect().

Referenced by CxCheckBoxDrum::DisplayFunc().

00113     {
00114         int     brdType;
00115         float   hW = mWidth/2.0f;
00116         float   hH = mHeight/2.0f;
00117         float   tX = -mWidth/2 + 0.65f * mHeight;
00118         float   tY = -0.12f;
00119         float   tZ = 0;
00120 
00121         if( hitDetect ){
00122             glLoadName( (int) this );
00123             SetSolidFillColor( oglGREEN );
00124             FillRectangle(-hW, -hH, mWidth, mHeight );
00125             return;
00126         }
00127 
00128         brdType = mChecked ? mCheckedBorderType : mUnCheckedBorderType;
00129         ShadeRect( brdType, -hW, -hH, mWidth, mHeight );
00130         if (mChecked)
00131         {
00132             SetFillColors( oglWHITE, 0xff60a060, 0xff004000, 0xff60a060, 0 );
00133             FillRectangle(-hW + 0.14f, -0.18f*mHeight, 0.36f*mHeight, 0.36f*mHeight );
00134         }
00135         brdType = mChecked ? mCheckedBoxType : mUnCheckedBoxType;
00136         ShadeRect( brdType, -hW + 0.12f, -0.2f*mHeight, 0.4f*mHeight, 0.4f*mHeight );
00137 
00138         glColor3f( 0.0f, 0.0f, 0.0f );
00139         if( !drawText )
00140             return;
00141 
00142         if (fontBase)
00143                 oglSys.Printf3D( fontBase, tX, tY, 0.01f, 0.4f, 0.4f, 0.02f, mText.c_str() );
00144         else
00145         {
00146             oglSys.Transform1Coord( 1, &tX, &tY, &tZ );
00147             oglSys.TopWndToVP(mOglWnd, &tX, &tY );
00148             if( mShadow2D )
00149                 oglSys.ShadowPrintf(mOglWnd, (int) tX, (int) tY, oglBLACK, oglWHITE,
00150                         "%s", mText.c_str() );
00151             else
00152                 oglSys.PosColPrintf(mOglWnd, (int) tX, (int) tY, oglBLACK,
00153                         "%s", mText.c_str() );
00154         }
00155 
00156     }

Here is the call graph for this function:


Generated on Fri Mar 19 10:31:59 2010 for ImpalaSrc by  doxygen 1.5.1