This commit is contained in:
2025-06-29 00:53:26 -04:00
parent 9083a25a2b
commit e4f6da650e
6 changed files with 19 additions and 14 deletions

View File

@@ -1842,7 +1842,7 @@ imgui_init
Preview* preview,
Settings* settings,
Tool* tool,
UndoStack* undoStack,
Snapshots* snapshots,
SDL_Window* window,
SDL_GLContext* glContext
)
@@ -1860,7 +1860,7 @@ imgui_init
self->preview = preview;
self->settings = settings;
self->tool = tool;
self->undoStack = undoStack;
self->snapshots = snapshots;
self->window = window;
self->glContext = glContext;
@@ -1926,8 +1926,10 @@ imgui_tick(Imgui* self)
_imgui_taskbar(self);
_imgui_dock(self);
/*
if (key_press(&self->input->keyboard, INPUT_KEYS[INPUT_UNDO]))
undo_stack_pop(self->undoStack, self->anm2);
undo_stack_pop(self->snapshots, self->anm2);
*/
}
void

View File

@@ -7,8 +7,8 @@
#include "window.h"
#include "input.h"
#include "settings.h"
#include "snapshots.h"
#include "tool.h"
#include "undo_stack.h"
#define IMGUI_IMPL_OPENGL_LOADER_CUSTOM
#define IMGUI_ENABLE_DOCKING
@@ -101,7 +101,7 @@ struct Imgui
Preview* preview = NULL;
Settings* settings = NULL;
Tool* tool = NULL;
UndoStack* undoStack = NULL;
Snapshots* snapshots = NULL;
SDL_Window* window = NULL;
SDL_GLContext* glContext = NULL;
bool isSwap = false;
@@ -123,7 +123,7 @@ imgui_init
Preview* preview,
Settings* settings,
Tool* tool,
UndoStack* undoStack,
Snapshots* snapshots,
SDL_Window* window,
SDL_GLContext* glContext
);

View File

@@ -1,5 +1,7 @@
#include "undo_stack.h"
#include "snapshots.h"
/* TODO */
/*
void
undo_stack_push(Snapshots* self, Anm2* anm2)
{
@@ -22,3 +24,4 @@ undo_stack_pop(Snapshots* self, Anm2* anm2)
return true;
}
*/

View File

@@ -14,9 +14,9 @@ struct Snapshots
{
SnapshotStack undoStack;
SnapshotStack redoStack;
}
};
/*
void undo_stack_push(UndoStack* self, Anm2* anm2);
bool undo_stack_pop(UndoStack* self, Anm2* anm2);
*/

View File

@@ -143,7 +143,7 @@ init(State* state)
&state->preview,
&state->settings,
&state->tool,
&state->undoStack,
&state->snapshots,
state->window,
&state->glContext
);

View File

@@ -22,7 +22,7 @@ struct State
Resources resources;
Settings settings;
Tool tool;
UndoStack undoStack;
Snapshots snapshots;
bool isArgument = false;
bool isRunning = true;
char argument[PATH_MAX] = STRING_EMPTY;