diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-03-05 16:44:50 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-03-05 16:44:50 +0100 |
commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /scene/2d/screen_button.h | |
parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) |
A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?
I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon
A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format
A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
Diffstat (limited to 'scene/2d/screen_button.h')
-rw-r--r-- | scene/2d/screen_button.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/scene/2d/screen_button.h b/scene/2d/screen_button.h index 8ce378c660..d648920b21 100644 --- a/scene/2d/screen_button.h +++ b/scene/2d/screen_button.h @@ -30,15 +30,15 @@ #define SCREEN_BUTTON_H #include "scene/2d/node_2d.h" -#include "scene/resources/texture.h" #include "scene/resources/bit_mask.h" #include "scene/resources/rectangle_shape_2d.h" +#include "scene/resources/texture.h" class TouchScreenButton : public Node2D { - GDCLASS(TouchScreenButton,Node2D); -public: + GDCLASS(TouchScreenButton, Node2D); +public: enum VisibilityMode { VISIBILITY_ALWAYS, VISIBILITY_TOUCHSCREEN_ONLY @@ -61,34 +61,32 @@ private: VisibilityMode visibility; - void _input(const InputEvent& p_Event); + void _input(const InputEvent &p_Event); void _press(int p_finger_pressed); - void _release(bool p_exiting_tree=false); + void _release(bool p_exiting_tree = false); protected: - void _notification(int p_what); static void _bind_methods(); -public: - - void set_texture(const Ref<Texture>& p_texture); +public: + void set_texture(const Ref<Texture> &p_texture); Ref<Texture> get_texture() const; - void set_texture_pressed(const Ref<Texture>& p_texture_pressed); + void set_texture_pressed(const Ref<Texture> &p_texture_pressed); Ref<Texture> get_texture_pressed() const; - void set_bitmask(const Ref<BitMap>& p_bitmask); + void set_bitmask(const Ref<BitMap> &p_bitmask); Ref<BitMap> get_bitmask() const; - void set_shape(const Ref<Shape2D>& p_shape); + void set_shape(const Ref<Shape2D> &p_shape); Ref<Shape2D> get_shape() const; void set_shape_centered(bool p_shape_centered); bool is_shape_centered() const; - void set_action(const String& p_action); + void set_action(const String &p_action); String get_action() const; void set_passby_press(bool p_enable); @@ -101,7 +99,6 @@ public: Rect2 get_item_rect() const; - TouchScreenButton(); }; |