void CGalacticMapSession::OnUpdate (bool bTopMost) // OnUpdate // // Update { if (m_pPainter == NULL) return; if (m_Scale.Update()) { m_pPainter->SetScale(m_Scale.GetScale()); HIInvalidate(); } if (m_xCenter != m_xTargetCenter || m_yCenter != m_yTargetCenter) { int xDiff = m_xTargetCenter - m_xCenter; int yDiff = m_yTargetCenter - m_yCenter; m_xCenter = (Absolute(xDiff) > 1 ? m_xCenter + (xDiff / 2) : m_xTargetCenter); m_yCenter = (Absolute(yDiff) > 1 ? m_yCenter + (yDiff / 2) : m_yTargetCenter); m_pPainter->SetPos(m_xCenter, m_yCenter); HIInvalidate(); } }
void CLoadingSession::OnUpdate (bool bTopMost) // OnUpdate // // Update { m_iTick++; HIInvalidate(m_rcStargate); }
void IHISession::DefaultOnAnimate (CG16bitImage &Screen) // DefaultOnAnimate // // Only if session does not override OnAnimate { bool bHasAnimation = false; // Let the session paint the screen m_HI.BeginSessionPaint(Screen); // Session itself paints HIPaint(Screen); // Paint animations on top if (m_Reanimator.PaintFrame(m_HI.GetScreen())) bHasAnimation = true; // Done m_HI.EndSessionPaint(Screen); // Update m_HI.BeginSessionUpdate(); HIUpdate(); m_HI.EndSessionUpdate(); // If we've got animations, then we need to invalidate // the whole screen. if (bHasAnimation) HIInvalidate(); }
void CTransmuterSession::OnRButtonUp(int x, int y, DWORD dwFlags) { m_IsRButtonDown = 0; HIInvalidate(); }