Definition at line 53 of file SpinWheel.h. References OglGui::Window::GetState(), mAsInt, OglGui::OglWindow::mOglWnd, mShowAsPercentage, OglGui::Window::mStateFeedbackColor, and mVal. Referenced by DrawWheel(). 00054 { 00055 char buf[25]; 00056 int rX, rY; 00057 int w, h, state = GetState(); 00058 00059 if (mAsInt && mShowAsPercentage) 00060 sprintf(buf, "%.2f", mVal / 100.0f); 00061 else if (mAsInt) 00062 sprintf(buf, "%d", (int) mVal); 00063 else 00064 sprintf(buf, "%.2f", mVal); 00065 00066 oglSys.GetTextExtent(mOglWnd, buf, &w, &h); 00067 oglSys.StartOrtho(mOglWnd); 00068 00069 rX = mOglWnd->width/2 - w/2 + dX; 00070 rY = mOglWnd->height/2 - h/2 + dY; 00071 00072 SetSolidFillColor(oglLIGHTGREY | (state==2 ? mStateFeedbackColor : 0)); 00073 FillRoundRectExt(rX-4, rY-1, w+8, h+1, 6, 6, 6, 6); 00074 DrawBevRoundRectExt(BEV_SUNKEN, rX-4, rY-1, w+8, h+1, 6, 6, 6, 6); 00075 00076 oglSys.ShadowPrintf(mOglWnd, rX, rY+1, state ? oglLIGHTGREY : oglGREY, 00077 state ? oglBLACK : oglLIGHTGREY, buf); 00078 oglSys.EndOrtho(); 00079 }
Here is the call graph for this function:
|