diff options
author | Bastiaan Olij <mux213@gmail.com> | 2022-11-12 01:59:22 +1100 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2022-11-25 20:26:30 +1100 |
commit | 96bbdf72490971d886f6ce57476f11bb14523f15 (patch) | |
tree | 61519b914686c23f0d996bb10c2af00cb8e3c30a /modules/openxr/editor/openxr_action_editor.h | |
parent | 7580565c28e7e10db7f551287e1f91cfd614b195 (diff) |
Various fixes for OpenXR action map meta data and editing
Diffstat (limited to 'modules/openxr/editor/openxr_action_editor.h')
-rw-r--r-- | modules/openxr/editor/openxr_action_editor.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/openxr/editor/openxr_action_editor.h b/modules/openxr/editor/openxr_action_editor.h index 6cf098cf08..66b7eebaeb 100644 --- a/modules/openxr/editor/openxr_action_editor.h +++ b/modules/openxr/editor/openxr_action_editor.h @@ -32,6 +32,7 @@ #define OPENXR_ACTION_EDITOR_H #include "../action_map/openxr_action.h" +#include "editor/editor_undo_redo_manager.h" #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/line_edit.h" @@ -42,11 +43,12 @@ class OpenXRActionEditor : public HBoxContainer { GDCLASS(OpenXRActionEditor, HBoxContainer); private: + Ref<EditorUndoRedoManager> undo_redo; Ref<OpenXRAction> action; LineEdit *action_name = nullptr; LineEdit *action_localized_name = nullptr; - OptionButton *action_type = nullptr; + OptionButton *action_type_button = nullptr; Button *rem_action = nullptr; void _theme_changed(); @@ -59,6 +61,11 @@ protected: static void _bind_methods(); void _notification(int p_what); + // used for undo/redo + void _do_set_name(const String p_new_text); + void _do_set_localized_name(const String p_new_text); + void _do_set_action_type(OpenXRAction::ActionType p_action_type); + public: Ref<OpenXRAction> get_action() { return action; }; OpenXRActionEditor(Ref<OpenXRAction> p_action); |