From 70556bf6eb0af5a29f1b1330b5da072423ca58d1 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Fri, 14 Jun 2024 12:21:16 +0200 Subject: [PATCH] - [NEW] editor::getCurrentTemplate - [NEW] editor::setCurrentTemplate() --- source/editor.cpp | 12 ++++++++++++ source/editor.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/source/editor.cpp b/source/editor.cpp index 9b3d838..92bf446 100644 --- a/source/editor.cpp +++ b/source/editor.cpp @@ -3,6 +3,7 @@ namespace editor { static bool editing = true; + static int current_template = 0; void setEditing(const bool value) { @@ -13,4 +14,15 @@ namespace editor { return editing; } + + const int getCurrentTemplate() + { + return current_template; + } + + void setCurrentTemplate(const int value) + { + current_template = value; + } + } diff --git a/source/editor.h b/source/editor.h index ea5d49b..d9d70f0 100644 --- a/source/editor.h +++ b/source/editor.h @@ -4,4 +4,7 @@ namespace editor { void setEditing(const bool value); const bool isEditing(); + + const int getCurrentTemplate(); + void setCurrentTemplate(const int value); }