From 3686831648bdfcf1d0d138a4e889218d955d4692 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sun, 14 Jan 2024 16:35:19 +0100 Subject: [PATCH] Fix compilation issues related to open_doc_*() --- util/limbo_utility.cpp | 4 ++++ util/limbo_utility.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/util/limbo_utility.cpp b/util/limbo_utility.cpp index bd7f8a43..9e49f189 100644 --- a/util/limbo_utility.cpp +++ b/util/limbo_utility.cpp @@ -288,6 +288,8 @@ Variant LimboUtility::perform_operation(Operation p_operation, const Variant &le return ret; } +#ifdef TOOLS_ENABLED + Ref LimboUtility::add_shortcut(const String &p_path, const String &p_name, Key p_keycode) { Ref sc = memnew(Shortcut); sc->set_name(p_name); @@ -341,6 +343,8 @@ void LimboUtility::open_doc_class(const String &p_class_name) { #endif } +#endif // ! TOOLS_ENABLED + void LimboUtility::_bind_methods() { ClassDB::bind_method(D_METHOD("decorate_var", "p_variable"), &LimboUtility::decorate_var); ClassDB::bind_method(D_METHOD("get_status_name", "p_status"), &LimboUtility::get_status_name); diff --git a/util/limbo_utility.h b/util/limbo_utility.h index 84b4ad49..10c10e13 100644 --- a/util/limbo_utility.h +++ b/util/limbo_utility.h @@ -42,7 +42,9 @@ class LimboUtility : public Object { GDCLASS(LimboUtility, Object); private: +#ifdef TOOLS_ENABLED HashMap> shortcuts; +#endif // TOOLS_ENABLED public: enum CheckType : unsigned int { @@ -86,6 +88,7 @@ class LimboUtility : public Object { String get_operation_string(Operation p_operation) const; Variant perform_operation(Operation p_operation, const Variant &left_value, const Variant &right_value); +#ifdef TOOLS_ENABLED Ref add_shortcut(const String &p_path, const String &p_name, Key p_keycode = LW_KEY(NONE)); bool is_shortcut(const String &p_path, const Ref &p_event) const; Ref get_shortcut(const String &p_path) const; @@ -93,6 +96,7 @@ class LimboUtility : public Object { void open_doc_introduction(); void open_doc_online(); void open_doc_class(const String &p_class_name); +#endif // TOOLS_ENABLED LimboUtility(); ~LimboUtility();