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

Method processLoadFlashbackButton

source/Gui/TemporalControlWindow.cpp:194–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194void TemporalControlWindow::processLoadFlashbackButton()
195{
196 ImGui::BeginDisabled(!_snapshot);
197 auto result = AlienImGui::ToolbarButton(AlienImGui::ToolbarButtonParameters().text(ICON_FA_UNDO));
198 AlienImGui::Tooltip("Loading in-memory flashback: It loads the saved world from the memory. Static simulation parameters will not be changed. Non-static parameters "
199 "(such as the position of moving zones) will be restored as well.");
200 if (result) {
201 delayedExecution([this] { applySnapshot(*_snapshot); });
202 _simulationFacade->removeSelection();
203 _history.clear();
204
205 printOverlayMessage("Loading flashback ...", true);
206 }
207 ImGui::EndDisabled();
208}
209
210TemporalControlWindow::Snapshot TemporalControlWindow::createSnapshot()
211{

Callers

nothing calls this directly

Calls 4

delayedExecutionFunction · 0.85
printOverlayMessageFunction · 0.85
removeSelectionMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected