MCPcopy Create free account
hub / github.com/chrxh/alien / processStepBackwardButton

Method processStepBackwardButton

source/Gui/TemporalControlWindow.cpp:156–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156void TemporalControlWindow::processStepBackwardButton()
157{
158 ImGui::BeginDisabled(_history.empty() || _simulationFacade->isSimulationRunning());
159 auto result = AlienImGui::ToolbarButton(AlienImGui::ToolbarButtonParameters().text(ICON_FA_CHEVRON_LEFT));
160 AlienImGui::Tooltip("Load previous time step");
161 if (result) {
162 auto const& snapshot = _history.back();
163 delayedExecution([this, snapshot] { applySnapshot(snapshot); });
164 printOverlayMessage("Loading previous time step ...");
165
166 _history.pop_back();
167 }
168 ImGui::EndDisabled();
169}
170
171void TemporalControlWindow::processStepForwardButton()
172{

Callers

nothing calls this directly

Calls 3

delayedExecutionFunction · 0.85
printOverlayMessageFunction · 0.85
isSimulationRunningMethod · 0.45

Tested by

no test coverage detected