diff options
Diffstat (limited to 'scene/gui/menu_button.h')
-rw-r--r-- | scene/gui/menu_button.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scene/gui/menu_button.h b/scene/gui/menu_button.h index 0636accfee..5448ff13f2 100644 --- a/scene/gui/menu_button.h +++ b/scene/gui/menu_button.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -33,14 +33,13 @@ #include "scene/gui/button.h" #include "scene/gui/popup_menu.h" -/** - @author Juan Linietsky <reduzio@gmail.com> -*/ + class MenuButton : public Button { GDCLASS(MenuButton, Button); bool clicked; + bool switch_on_hover; bool disable_shortcuts; PopupMenu *popup; @@ -51,12 +50,15 @@ class MenuButton : public Button { void _gui_input(Ref<InputEvent> p_event); protected: + void _notification(int p_what); static void _bind_methods(); public: virtual void pressed(); PopupMenu *get_popup() const; + void set_switch_on_hover(bool p_enabled); + bool is_switch_on_hover(); void set_disable_shortcuts(bool p_disabled); MenuButton(); |