summaryrefslogtreecommitdiffstats
path: root/scene/gui/base_button.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-04 21:31:29 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-04 21:31:47 -0300
commit007efb6a20dcaa9230f1cfdc1cda92db24c5510f (patch)
treedb29be67ba32768ba96037d06c82cb8f1ac7f1c2 /scene/gui/base_button.h
parent279b7921e8dc8feb44a7650b983f6b3878a01d14 (diff)
downloadredot-engine-007efb6a20dcaa9230f1cfdc1cda92db24c5510f.tar.gz
-customizable shortcuts in editor
-editor settings now save to .tres instead of .xml -buttons can now hold a shortcut
Diffstat (limited to 'scene/gui/base_button.h')
-rw-r--r--scene/gui/base_button.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index 0247fb2f21..0056b00f33 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -43,6 +43,7 @@ class BaseButton : public Control {
bool toggle_mode;
FocusMode enabled_focus_mode;
+ Ref<ShortCut> shortcut;
struct Status {
@@ -57,6 +58,7 @@ class BaseButton : public Control {
} status;
+
ButtonGroup *group;
@@ -69,6 +71,7 @@ protected:
virtual void toggled(bool p_pressed);
static void _bind_methods();
virtual void _input_event(InputEvent p_event);
+ virtual void _unhandled_input(InputEvent p_event);
void _notification(int p_what);
public:
@@ -101,6 +104,10 @@ public:
void set_enabled_focus_mode(FocusMode p_mode);
FocusMode get_enabled_focus_mode() const;
+ void set_shortcut(const Ref<ShortCut>& p_shortcut);
+ Ref<ShortCut> get_shortcut() const;
+
+ virtual String get_tooltip(const Point2& p_pos) const;
BaseButton();
~BaseButton();