From a39c86d9aec7af463b6f19afbc4990236c4c1f92 Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Sun, 28 Apr 2024 00:51:53 -0400 Subject: [PATCH] Added undoable to commandds and made pause button purple --- Editor/src/Commands/ICommand.h | 5 +++++ Editor/src/Windows/EditorInterface.cpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Editor/src/Commands/ICommand.h b/Editor/src/Commands/ICommand.h index 36e9e2dc..2d0c163b 100644 --- a/Editor/src/Commands/ICommand.h +++ b/Editor/src/Commands/ICommand.h @@ -4,6 +4,9 @@ namespace NuakeEditor { class ICommand { + protected: + bool mIsUndoable = false; + public: ICommand() = default; @@ -16,5 +19,7 @@ namespace NuakeEditor { return false; } + + bool IsUndoable() const { return mIsUndoable; } }; } \ No newline at end of file diff --git a/Editor/src/Windows/EditorInterface.cpp b/Editor/src/Windows/EditorInterface.cpp index c33df101..b7a09b9e 100644 --- a/Editor/src/Windows/EditorInterface.cpp +++ b/Editor/src/Windows/EditorInterface.cpp @@ -329,12 +329,14 @@ namespace Nuake { if (Engine::IsPlayMode() && Engine::GetTimeScale() != 0.0f) { + ImGui::PushStyleColor(ImGuiCol_Text, { 97.0 / 255.0, 0, 1, 1 }); if (ImGui::Button(ICON_FA_PAUSE, ImVec2(30, 30)) || (Input::IsKeyPressed(Key::F6))) { Engine::SetGameState(GameState::Paused); SetStatusMessage("Paused"); } + ImGui::PopStyleColor(); } else {