| 256 | } |
| 257 | |
| 258 | void StatisticsWindow::processSettings() |
| 259 | { |
| 260 | ImGui::Spacing(); |
| 261 | ImGui::Spacing(); |
| 262 | if (_settingsOpen) { |
| 263 | AlienImGui::MovableSeparator(AlienImGui::MovableSeparatorParameters().additive(false), _settingsHeight); |
| 264 | } |
| 265 | |
| 266 | _settingsOpen = |
| 267 | AlienImGui::BeginTreeNode(AlienImGui::TreeNodeParameters().name("Settings").rank(AlienImGui::TreeNodeRank::High).defaultOpen(_settingsOpen)); |
| 268 | if (_settingsOpen) { |
| 269 | if (ImGui::BeginChild("##addons", {scale(0), 0})) { |
| 270 | ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x - scale(RightColumnWidth)); |
| 271 | if (_plotMode == 0) { |
| 272 | AlienImGui::SliderFloat( |
| 273 | AlienImGui::SliderFloatParameters() |
| 274 | .name("Time horizon") |
| 275 | .min(1.0f) |
| 276 | .max(TimelineLiveStatistics::MaxLiveHistory) |
| 277 | .format("%.1f s") |
| 278 | .textWidth(RightColumnWidth), |
| 279 | &_timeHorizonForLiveStatistics); |
| 280 | } |
| 281 | if (_plotMode == 1) { |
| 282 | AlienImGui::SliderFloat( |
| 283 | AlienImGui::SliderFloatParameters().name("Time horizon").min(1.0f).max(100.0f).format("%.0f percent").textWidth(RightColumnWidth), |
| 284 | &_timeHorizonForLongtermStatistics); |
| 285 | } |
| 286 | |
| 287 | AlienImGui::SliderFloat( |
| 288 | AlienImGui::SliderFloatParameters().name("Plot height").min(MinPlotHeight).max(1000.0f).format("%.0f").textWidth(RightColumnWidth), |
| 289 | &_plotHeight); |
| 290 | AlienImGui::Switcher(AlienImGui::SwitcherParameters().name("Scale").textWidth(RightColumnWidth).values({"Linear", "Logarithmic"}), _plotScale); |
| 291 | } |
| 292 | ImGui::EndChild(); |
| 293 | } |
| 294 | AlienImGui::EndTreeNode(); |
| 295 | } |
| 296 | |
| 297 | void StatisticsWindow::processTimelineStatistics() |
| 298 | { |
nothing calls this directly
no test coverage detected