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

Method Update

libs/drape_frontend/gui/layer_render.cpp:180–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178 }
179
180 bool Update(ScreenBase const & screen) override
181 {
182 auto & helper = gui::DrapeGui::Instance().GetScaleFpsHelper();
183 if (!helper.IsVisible())
184 return false;
185
186 if (m_scale != helper.GetScale() || m_fps != helper.GetFps() || m_isPaused != helper.IsPaused())
187 {
188 m_scale = helper.GetScale();
189 m_fps = helper.GetFps();
190 m_isPaused = helper.IsPaused();
191 std::stringstream ss;
192 ss << m_apiLabel << ": Scale: " << m_scale << " / FPS: " << m_fps;
193 if (m_isPaused)
194 ss << " (PAUSED)";
195 SetContent(ss.str());
196 }
197
198 return TBase::Update(screen);
199 }
200
201private:
202 std::string const m_apiLabel;

Callers 1

RenderMethod · 0.45

Calls 5

GetFpsMethod · 0.80
IsPausedMethod · 0.80
UpdateFunction · 0.50
IsVisibleMethod · 0.45
GetScaleMethod · 0.45

Tested by

no test coverage detected