| 37 | } |
| 38 | |
| 39 | bool Update(ScreenBase const & screen) override |
| 40 | { |
| 41 | if (!IsVisible()) |
| 42 | return false; |
| 43 | |
| 44 | if (!TBase::Update(screen)) |
| 45 | return false; |
| 46 | |
| 47 | if (!DrapeGui::Instance().IsCopyrightActive()) |
| 48 | { |
| 49 | SetIsVisible(false); |
| 50 | return false; |
| 51 | } |
| 52 | |
| 53 | if (m_animation == nullptr) |
| 54 | { |
| 55 | m_animation = make_unique_dp<df::OpacityAnimation>(kCopyrightHideTime, kCopyrightVisibleTime, 1.0f, 0.0f); |
| 56 | } |
| 57 | else if (m_animation->IsFinished()) |
| 58 | { |
| 59 | DrapeGui::Instance().DeactivateCopyright(); |
| 60 | SetIsVisible(false); |
| 61 | } |
| 62 | |
| 63 | m_params.m_opacity = static_cast<float>(m_animation->GetOpacity()); |
| 64 | return true; |
| 65 | } |
| 66 | |
| 67 | private: |
| 68 | drape_ptr<df::OpacityAnimation> m_animation; |
nothing calls this directly
no test coverage detected