Skip to content

Commit

Permalink
Fix compilation issues related to open_doc_*()
Browse files Browse the repository at this point in the history
  • Loading branch information
limbonaut committed Jan 14, 2024
1 parent 34e763c commit 3686831
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions util/limbo_utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ Variant LimboUtility::perform_operation(Operation p_operation, const Variant &le
return ret;
}

#ifdef TOOLS_ENABLED

Ref<Shortcut> LimboUtility::add_shortcut(const String &p_path, const String &p_name, Key p_keycode) {
Ref<Shortcut> sc = memnew(Shortcut);
sc->set_name(p_name);
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions util/limbo_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ class LimboUtility : public Object {
GDCLASS(LimboUtility, Object);

private:
#ifdef TOOLS_ENABLED
HashMap<String, Ref<Shortcut>> shortcuts;
#endif // TOOLS_ENABLED

public:
enum CheckType : unsigned int {
Expand Down Expand Up @@ -86,13 +88,15 @@ 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<Shortcut> 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<InputEvent> &p_event) const;
Ref<Shortcut> get_shortcut(const String &p_path) const;

void open_doc_introduction();
void open_doc_online();
void open_doc_class(const String &p_class_name);
#endif // TOOLS_ENABLED

LimboUtility();
~LimboUtility();
Expand Down

0 comments on commit 3686831

Please sign in to comment.