| 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 | |
| 201 | private: |
| 202 | std::string const m_apiLabel; |