Definition at line 46 of file OpenClose.h. References OglGui::OglWindow::GetDimensions(), OglGui::OglWindow::H(), mClosing, mDurationMs, mEndH, mEndW, mEndX, mEndY, mFancy, mOpening, mParent, mPerc, mStartH, mStartTime, mStartW, mStartX, mStartY, mTarget, OglGui::OglWindow::SetDimensions(), OglGui::OglWindow::SetVisible(), and OglGui::OglWindow::W(). Referenced by OglGui::IPhoneApp::DisplayFunc(). 00047 { 00048 if (!mTarget) 00049 return; 00050 00051 if ((mPerc = ((OglClock()*1000 - mStartTime) * 100) / mDurationMs) > 100) 00052 { 00053 mTarget->SetDimensions(0,0,mParent->W(), mParent->H()); 00054 if (mClosing) 00055 mTarget->SetVisible(false); 00056 mClosing = mOpening = false; 00057 } 00058 else 00059 { 00060 int x,y,w,h; 00061 mTarget->GetDimensions(x,y,w,h); 00062 double p = mFancy ? sin(DEG2RAD(mPerc*0.9))*mPerc : mPerc; 00063 if (mOpening) 00064 { 00065 x = mStartX - (p * mStartX)/100; 00066 y = mStartY - (p * mStartY)/100; 00067 w = mStartW + (mPerc * (mParent->W() - mStartW))/100; 00068 h = mStartH + (mPerc * (mParent->H() - mStartH))/100; 00069 } 00070 else 00071 { 00072 x = mEndX - (p * (mEndX-mStartX))/100; 00073 y = mEndY - (p * (mEndY-mStartY))/100; 00074 w = mEndW - (mPerc * (mEndW-mStartW))/100; 00075 h = mEndH - (mPerc * (mEndH-mStartH))/100; 00076 } 00077 mTarget->SetDimensions(x,y,w,h); 00078 } 00079 }
Here is the call graph for this function:
|