MCPcopy Create free account
hub / github.com/comaps/comaps / Update

Method Update

libs/drape_frontend/gui/copyright_label.cpp:39–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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
67private:
68 drape_ptr<df::OpacityAnimation> m_animation;

Callers

nothing calls this directly

Calls 5

IsCopyrightActiveMethod · 0.80
DeactivateCopyrightMethod · 0.80
UpdateFunction · 0.50
IsFinishedMethod · 0.45
GetOpacityMethod · 0.45

Tested by

no test coverage detected