| 64 | {} |
| 65 | |
| 66 | bool Update(ScreenBase const & screen) |
| 67 | { |
| 68 | RulerHelper & helper = DrapeGui::GetRulerHelper(); |
| 69 | |
| 70 | TBase::SetIsVisible(true); |
| 71 | bool isVisible = RulerHelper::IsVisible(screen); |
| 72 | if (!isVisible) |
| 73 | { |
| 74 | m_animation.HideAnimated(); |
| 75 | m_isVisibleAtEnd = false; |
| 76 | } |
| 77 | else if (helper.IsTextDirty()) |
| 78 | { |
| 79 | m_isAppearing = !m_isAppearing; |
| 80 | if (m_isAppearing) |
| 81 | { |
| 82 | m_animation.ShowAnimated(); |
| 83 | m_isVisibleAtEnd = true; |
| 84 | } |
| 85 | else |
| 86 | { |
| 87 | m_animation.HideAnimated(); |
| 88 | m_isVisibleAtEnd = false; |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | bool const result = TBase::Update(screen); |
| 93 | UpdateImpl(screen, helper); |
| 94 | |
| 95 | if (m_animation.IsFinished()) |
| 96 | TBase::SetIsVisible(m_isVisibleAtEnd); |
| 97 | |
| 98 | return result; |
| 99 | } |
| 100 | |
| 101 | protected: |
| 102 | virtual void UpdateImpl(ScreenBase const & /*screen*/, RulerHelper const & /*helper*/) {} |
nothing calls this directly
no test coverage detected