![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Main animation editor window. More...
#include <AnimationEditorWindow.h>
Collaboration diagram for Olympe::AnimationEditorWindow:Public Member Functions | |
| AnimationEditorWindow () | |
| ~AnimationEditorWindow () | |
| void | Toggle () |
| Toggle window visibility. | |
| bool | IsOpen () const |
| Check if window is open. | |
| void | Update (float deltaTime) |
| Update and render the editor window (separate window) | |
| void | ProcessEvent (SDL_Event *event) |
| Process SDL events for the separate window. | |
| void | UpdatePreview (float deltaTime) |
| Update preview animation (call every frame with deltaTime) | |
| void | Render () |
| Render the editor window. | |
Private Member Functions | |
| void | RenderMainMenu () |
| void | RenderBankListPanel () |
| void | RenderSpritesheetPanel () |
| void | RenderSequencePanel () |
| void | RenderPreviewPanel () |
| void | RenderPropertiesPanel () |
| void | NewBank () |
| void | OpenBank (const std::string &filepath) |
| void | SaveBank () |
| void | SaveBankAs () |
| void | ImportBankJSON (const std::string &filepath) |
| void | ExportBankJSON (const std::string &filepath) |
| std::vector< std::string > | ScanBankDirectory (const std::string &dirPath) |
| void | AddSpritesheet () |
| void | RemoveSpritesheet (int index) |
| void | AutoDetectGrid (SpritesheetInfo &sheet) |
| SDL_Texture * | LoadSpritesheetTexture (const std::string &path) |
| void | AddSequence () |
| void | RemoveSequence (int index) |
| void | StartPreview () |
| void | StopPreview () |
| void | PausePreview () |
| void | ResetPreview () |
| void | RenderPreviewFrame () |
| void | MarkDirty () |
| void | ClearDirty () |
| bool | PromptUnsavedChanges () |
| void | UpdateWindowTitle () |
| void | CreateSeparateWindow () |
| void | DestroySeparateWindow () |
| void | RenderSeparateWindow () |
Private Attributes | |
| bool | m_isOpen = false |
| bool | m_isDirty = false |
| AnimationBank | m_currentBank |
| std::string | m_currentBankPath |
| bool | m_hasBankLoaded = false |
| int | m_selectedSpritesheetIndex = -1 |
| int | m_selectedSequenceIndex = -1 |
| int | m_activeTab = 0 |
| bool | m_isPreviewPlaying = false |
| bool | m_isPreviewPaused = false |
| float | m_previewSpeed = 1.0f |
| int | m_previewCurrentFrame = 0 |
| float | m_previewFrameTimer = 0.0f |
| float | m_spritesheetZoom = 1.0f |
| float | m_spritesheetPanX = 0.0f |
| float | m_spritesheetPanY = 0.0f |
| bool | m_showGrid = true |
| bool | m_showNewBankDialog = false |
| bool | m_showOpenBankDialog = false |
| bool | m_showAddSpritesheetDialog = false |
| bool | m_showAddSequenceDialog = false |
| char | m_inputBankId [256] = "" |
| char | m_inputDescription [1024] = "" |
| char | m_inputAuthor [256] = "" |
| char | m_inputSpritesheetId [256] = "" |
| char | m_inputSpritesheetPath [512] = "" |
| char | m_inputSequenceName [256] = "" |
| SDL_Window * | m_separateWindow = nullptr |
| SDL_Renderer * | m_separateRenderer = nullptr |
| ImGuiContext * | m_separateImGuiContext = nullptr |
Main animation editor window.
Provides UI for creating and editing animation banks with multi-spritesheet support. Opens with F9 hotkey. Renders in standalone SDL3 window (like BT Debugger).
Definition at line 40 of file AnimationEditorWindow.h.
| Olympe::AnimationEditorWindow::AnimationEditorWindow | ( | ) |
Definition at line 36 of file AnimationEditorWindow.cpp.
References SYSTEM_LOG.
| Olympe::AnimationEditorWindow::~AnimationEditorWindow | ( | ) |
Definition at line 41 of file AnimationEditorWindow.cpp.
References DestroySeparateWindow(), and SYSTEM_LOG.
Here is the call graph for this function:
|
private |
Definition at line 1232 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::animations, GetComponentTypeID_Static(), m_currentBank, m_selectedSequenceIndex, MarkDirty(), Olympe::AnimationSequence::name, Olympe::AnimationBank::spritesheets, and SYSTEM_LOG.
Referenced by RenderMainMenu(), and RenderSequencePanel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1153 of file AnimationEditorWindow.cpp.
References GetComponentTypeID_Static(), Olympe::SpritesheetInfo::id, m_currentBank, m_selectedSpritesheetIndex, MarkDirty(), Olympe::AnimationBank::spritesheets, and SYSTEM_LOG.
Referenced by RenderMainMenu(), and RenderSpritesheetPanel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1189 of file AnimationEditorWindow.cpp.
References GetComponentTypeID_Static(), LoadSpritesheetTexture(), MarkDirty(), and SYSTEM_LOG.
Referenced by RenderSpritesheetPanel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1327 of file AnimationEditorWindow.cpp.
References m_isDirty.
Referenced by ImportBankJSON(), SaveBank(), and SaveBankAs().
Here is the caller graph for this function:
|
private |
Definition at line 1349 of file AnimationEditorWindow.cpp.
References GetComponentTypeID_Static(), m_separateImGuiContext, m_separateRenderer, m_separateWindow, and SYSTEM_LOG.
Referenced by Toggle().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1390 of file AnimationEditorWindow.cpp.
References GetComponentTypeID_Static(), m_separateImGuiContext, m_separateRenderer, m_separateWindow, and SYSTEM_LOG.
Referenced by ~AnimationEditorWindow().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1015 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::animations, Olympe::AnimationBank::author, Olympe::AnimationBank::bankId, Olympe::AnimationBank::createdDate, Olympe::AnimationBank::description, GetComponentTypeID_Static(), Olympe::AnimationBank::lastModifiedDate, m_currentBank, JsonHelper::SaveJsonToFile(), Olympe::AnimationBank::spritesheets, SYSTEM_LOG, and Olympe::AnimationBank::tags.
Referenced by SaveBank(), and SaveBankAs().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 912 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::bankId, ClearDirty(), JsonHelper::GetBool(), GetComponentTypeID_Static(), JsonHelper::GetFloat(), JsonHelper::GetInt(), JsonHelper::GetString(), Olympe::SpritesheetInfo::id, JsonHelper::LoadJsonFromFile(), m_currentBank, m_currentBankPath, m_hasBankLoaded, m_selectedSequenceIndex, m_selectedSpritesheetIndex, Olympe::AnimationSequence::name, and SYSTEM_LOG.
Referenced by OpenBank().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Check if window is open.
Definition at line 54 of file AnimationEditorWindow.h.
References m_isOpen.
Referenced by SDL_AppEvent().
Here is the caller graph for this function:
|
private |
Definition at line 1218 of file AnimationEditorWindow.cpp.
References DataManager::Get(), and DataManager::GetSprite().
Referenced by AutoDetectGrid(), RenderPreviewFrame(), and RenderSpritesheetPanel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1322 of file AnimationEditorWindow.cpp.
References m_isDirty.
Referenced by AddSequence(), AddSpritesheet(), AutoDetectGrid(), NewBank(), RemoveSequence(), RemoveSpritesheet(), RenderPropertiesPanel(), RenderSequencePanel(), and RenderSpritesheetPanel().
Here is the caller graph for this function:
|
private |
Definition at line 854 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::author, Olympe::AnimationBank::bankId, Olympe::AnimationBank::createdDate, GetComponentTypeID_Static(), Olympe::AnimationBank::lastModifiedDate, m_currentBank, m_currentBankPath, m_hasBankLoaded, m_isDirty, m_selectedSequenceIndex, m_selectedSpritesheetIndex, MarkDirty(), PromptUnsavedChanges(), and SYSTEM_LOG.
Referenced by RenderBankListPanel(), and RenderMainMenu().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 885 of file AnimationEditorWindow.cpp.
References ImportBankJSON().
Referenced by RenderBankListPanel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1297 of file AnimationEditorWindow.cpp.
References m_isPreviewPaused.
Referenced by RenderPreviewPanel().
Here is the caller graph for this function:Process SDL events for the separate window.
| event | SDL event to process |
Definition at line 1455 of file AnimationEditorWindow.cpp.
References GetComponentTypeID_Static(), m_isOpen, m_separateImGuiContext, m_separateWindow, and Toggle().
Referenced by SDL_AppEvent().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1332 of file AnimationEditorWindow.cpp.
References SYSTEM_LOG.
Referenced by NewBank(), RenderBankListPanel(), and Toggle().
Here is the caller graph for this function:Definition at line 1252 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::animations, GetComponentTypeID_Static(), m_currentBank, m_selectedSequenceIndex, MarkDirty(), and SYSTEM_LOG.
Referenced by RenderMainMenu().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1176 of file AnimationEditorWindow.cpp.
References GetComponentTypeID_Static(), m_currentBank, m_selectedSpritesheetIndex, MarkDirty(), Olympe::AnimationBank::spritesheets, and SYSTEM_LOG.
Referenced by RenderMainMenu().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::AnimationEditorWindow::Render | ( | ) |
Render the editor window.
Definition at line 138 of file AnimationEditorWindow.cpp.
References GetComponentTypeID_Static(), m_activeTab, m_isDirty, m_isOpen, RenderBankListPanel(), RenderMainMenu(), RenderPreviewPanel(), RenderPropertiesPanel(), RenderSequencePanel(), and RenderSpritesheetPanel().
Referenced by RenderSeparateWindow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 296 of file AnimationEditorWindow.cpp.
References GetComponentTypeID_Static(), m_currentBankPath, m_isDirty, NewBank(), OpenBank(), PromptUnsavedChanges(), and ScanBankDirectory().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 218 of file AnimationEditorWindow.cpp.
References AddSequence(), AddSpritesheet(), m_activeTab, m_hasBankLoaded, m_isOpen, m_selectedSequenceIndex, m_selectedSpritesheetIndex, m_showGrid, m_showOpenBankDialog, NewBank(), RemoveSequence(), RemoveSpritesheet(), SaveBank(), and SaveBankAs().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 742 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::animations, GetComponentTypeID_Static(), Olympe::AnimationBank::GetSpritesheet(), LoadSpritesheetTexture(), m_currentBank, m_previewCurrentFrame, and m_selectedSequenceIndex.
Referenced by RenderPreviewPanel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 680 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::animations, GetComponentTypeID_Static(), m_currentBank, m_hasBankLoaded, m_isPreviewPaused, m_isPreviewPlaying, m_previewCurrentFrame, m_previewFrameTimer, m_previewSpeed, m_selectedSequenceIndex, PausePreview(), RenderPreviewFrame(), StartPreview(), and StopPreview().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 804 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::author, Olympe::AnimationBank::bankId, Olympe::AnimationBank::createdDate, Olympe::AnimationBank::description, GetComponentTypeID_Static(), Olympe::AnimationBank::lastModifiedDate, m_currentBank, m_hasBankLoaded, and MarkDirty().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1425 of file AnimationEditorWindow.cpp.
References GetComponentTypeID_Static(), m_separateImGuiContext, m_separateRenderer, m_separateWindow, and Render().
Referenced by Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 528 of file AnimationEditorWindow.cpp.
References AddSequence(), Olympe::AnimationBank::animations, GetComponentTypeID_Static(), m_currentBank, m_hasBankLoaded, m_selectedSequenceIndex, MarkDirty(), ResetPreview(), and Olympe::AnimationBank::spritesheets.
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 338 of file AnimationEditorWindow.cpp.
References AddSpritesheet(), AutoDetectGrid(), GetComponentTypeID_Static(), LoadSpritesheetTexture(), m_currentBank, m_hasBankLoaded, m_selectedSpritesheetIndex, m_showGrid, m_spritesheetZoom, MarkDirty(), and Olympe::AnimationBank::spritesheets.
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1302 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::animations, GetComponentTypeID_Static(), m_currentBank, m_previewCurrentFrame, m_previewFrameTimer, m_selectedSequenceIndex, and Olympe::AnimationSequence::startFrame.
Referenced by RenderSequencePanel(), and StopPreview().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 890 of file AnimationEditorWindow.cpp.
References ClearDirty(), ExportBankJSON(), m_currentBankPath, and SaveBankAs().
Referenced by RenderMainMenu().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 902 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::bankId, ClearDirty(), ExportBankJSON(), m_currentBank, and m_currentBankPath.
Referenced by RenderMainMenu(), and SaveBank().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1108 of file AnimationEditorWindow.cpp.
References GetComponentTypeID_Static().
Referenced by RenderBankListPanel(), and Toggle().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1271 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::animations, GetComponentTypeID_Static(), m_currentBank, m_isPreviewPaused, m_isPreviewPlaying, m_previewCurrentFrame, m_previewFrameTimer, m_selectedSequenceIndex, and Olympe::AnimationSequence::startFrame.
Referenced by RenderPreviewPanel().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1290 of file AnimationEditorWindow.cpp.
References m_isPreviewPaused, m_isPreviewPlaying, and ResetPreview().
Referenced by RenderPreviewPanel().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::AnimationEditorWindow::Toggle | ( | ) |
Toggle window visibility.
Definition at line 51 of file AnimationEditorWindow.cpp.
References CreateSeparateWindow(), GetComponentTypeID_Static(), m_hasBankLoaded, m_isDirty, m_isOpen, m_separateWindow, PromptUnsavedChanges(), ScanBankDirectory(), and SYSTEM_LOG.
Referenced by ProcessEvent(), and SDL_AppEvent().
Here is the call graph for this function:
Here is the caller graph for this function:Update and render the editor window (separate window)
| deltaTime | Time elapsed since last frame in seconds |
Definition at line 1478 of file AnimationEditorWindow.cpp.
References m_isOpen, RenderSeparateWindow(), and UpdatePreview().
Referenced by SDL_AppIterate().
Here is the call graph for this function:
Here is the caller graph for this function:Update preview animation (call every frame with deltaTime)
| deltaTime | Time elapsed since last frame in seconds |
Definition at line 100 of file AnimationEditorWindow.cpp.
References Olympe::AnimationBank::animations, GetComponentTypeID_Static(), m_currentBank, m_isPreviewPaused, m_isPreviewPlaying, m_previewCurrentFrame, m_previewFrameTimer, m_previewSpeed, m_selectedSequenceIndex, and Olympe::AnimationSequence::startFrame.
Referenced by Update().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1340 of file AnimationEditorWindow.cpp.
|
private |
Definition at line 134 of file AnimationEditorWindow.h.
Referenced by Render(), and RenderMainMenu().
|
private |
Definition at line 125 of file AnimationEditorWindow.h.
Referenced by AddSequence(), AddSpritesheet(), ExportBankJSON(), ImportBankJSON(), NewBank(), RemoveSequence(), RemoveSpritesheet(), RenderPreviewFrame(), RenderPreviewPanel(), RenderPropertiesPanel(), RenderSequencePanel(), RenderSpritesheetPanel(), ResetPreview(), SaveBankAs(), StartPreview(), and UpdatePreview().
|
private |
Definition at line 126 of file AnimationEditorWindow.h.
Referenced by ImportBankJSON(), NewBank(), RenderBankListPanel(), SaveBank(), and SaveBankAs().
Definition at line 127 of file AnimationEditorWindow.h.
Referenced by ImportBankJSON(), NewBank(), RenderMainMenu(), RenderPreviewPanel(), RenderPropertiesPanel(), RenderSequencePanel(), RenderSpritesheetPanel(), and Toggle().
|
private |
Definition at line 161 of file AnimationEditorWindow.h.
|
private |
Definition at line 159 of file AnimationEditorWindow.h.
|
private |
Definition at line 160 of file AnimationEditorWindow.h.
|
private |
Definition at line 164 of file AnimationEditorWindow.h.
|
private |
Definition at line 162 of file AnimationEditorWindow.h.
|
private |
Definition at line 163 of file AnimationEditorWindow.h.
Definition at line 122 of file AnimationEditorWindow.h.
Referenced by ClearDirty(), MarkDirty(), NewBank(), Render(), RenderBankListPanel(), and Toggle().
Definition at line 121 of file AnimationEditorWindow.h.
Referenced by IsOpen(), ProcessEvent(), Render(), RenderMainMenu(), Toggle(), and Update().
Definition at line 138 of file AnimationEditorWindow.h.
Referenced by PausePreview(), RenderPreviewPanel(), StartPreview(), StopPreview(), and UpdatePreview().
Definition at line 137 of file AnimationEditorWindow.h.
Referenced by RenderPreviewPanel(), StartPreview(), StopPreview(), and UpdatePreview().
|
private |
Definition at line 140 of file AnimationEditorWindow.h.
Referenced by RenderPreviewFrame(), RenderPreviewPanel(), ResetPreview(), StartPreview(), and UpdatePreview().
|
private |
Definition at line 141 of file AnimationEditorWindow.h.
Referenced by RenderPreviewPanel(), ResetPreview(), StartPreview(), and UpdatePreview().
|
private |
Definition at line 139 of file AnimationEditorWindow.h.
Referenced by RenderPreviewPanel(), and UpdatePreview().
|
private |
Definition at line 131 of file AnimationEditorWindow.h.
Referenced by AddSequence(), ImportBankJSON(), NewBank(), RemoveSequence(), RenderMainMenu(), RenderPreviewFrame(), RenderPreviewPanel(), RenderSequencePanel(), ResetPreview(), StartPreview(), and UpdatePreview().
|
private |
Definition at line 130 of file AnimationEditorWindow.h.
Referenced by AddSpritesheet(), ImportBankJSON(), NewBank(), RemoveSpritesheet(), RenderMainMenu(), and RenderSpritesheetPanel().
|
private |
Definition at line 169 of file AnimationEditorWindow.h.
Referenced by CreateSeparateWindow(), DestroySeparateWindow(), ProcessEvent(), and RenderSeparateWindow().
|
private |
Definition at line 168 of file AnimationEditorWindow.h.
Referenced by CreateSeparateWindow(), DestroySeparateWindow(), and RenderSeparateWindow().
|
private |
Definition at line 167 of file AnimationEditorWindow.h.
Referenced by CreateSeparateWindow(), DestroySeparateWindow(), ProcessEvent(), RenderSeparateWindow(), and Toggle().
Definition at line 156 of file AnimationEditorWindow.h.
Definition at line 155 of file AnimationEditorWindow.h.
Definition at line 147 of file AnimationEditorWindow.h.
Referenced by RenderMainMenu(), and RenderSpritesheetPanel().
Definition at line 153 of file AnimationEditorWindow.h.
Definition at line 154 of file AnimationEditorWindow.h.
Referenced by RenderMainMenu().
|
private |
Definition at line 145 of file AnimationEditorWindow.h.
|
private |
Definition at line 146 of file AnimationEditorWindow.h.
|
private |
Definition at line 144 of file AnimationEditorWindow.h.
Referenced by RenderSpritesheetPanel().