[ImGui] User interface for Snapshot feature#289
Open
Lucas-TJ wants to merge 63 commits into
Open
Conversation
# Conflicts: # SofaImGui/src/SofaImGui/ImGuiGUIEngine.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR SofaImGui - Snapshot
Snapshot (in SofaImGui)
Related to sofa-framework/sofa#6168 (Do not merge before)
Overview
This Pull Request adds a graphical user interface for the Snapshot feature in SofaImGui. It allows users to:
Demonstration
Setup
The Snapshot window is available from the "Windows" menu
Save/Load in Memory or File
In the Snapshot window, users can choose whether to save/load snapshots in memory or from a file. It is also possible to save/load a set of snapshots in a single file.
API
The implementation relies on ImGui widgets. A new
WindowState,winManagerSnapshot, has been added toImGuiGUIEngine, along with theshowSnapshot()function responsible for displaying the Snapshot window.showSnapshot()use uses several ImGui widgets, mainlyImGui::Button(), to build the interface. Each button is associated with a corresponding function fromSnapshotManager:doMemorySave(). The "Memory (recent)" button in the "Load" section callsdoMemoryLoad(), which restores the most recently saved snapshotdoFileSave()with the parameterisSetset to false. The corresponding "File" button in the "Load" section callsdoFileLoad()with the parameterisSetset to falsedoFileSave()with the parameterisSetset to true. The corresponding "Set of Snapshots" button in the "Load" section callsdoFileLoad()with the parameterisSetset to trueBy submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).
Reviewers will merge this pull-request only if