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

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

Definition at line 117 of file CheckBoxDrum.h.

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

Referenced by OglGui::CheckBoxDrum::DisplayFunc().

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

Here is the call graph for this function:


Generated on Thu Jan 13 09:26:16 2011 for ImpalaSrc by  doxygen 1.5.1