diff options
| author | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
| commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
| tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /scene/2d/node_2d.h | |
| parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) | |
| download | godot-5dbf180.tar.gz godot-5dbf180.tar.zst godot-5dbf180.zip | |
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/node_2d.h')
| -rw-r--r-- | scene/2d/node_2d.h | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/scene/2d/node_2d.h b/scene/2d/node_2d.h index 2cceef0f0..b9c689433 100644 --- a/scene/2d/node_2d.h +++ b/scene/2d/node_2d.h @@ -33,7 +33,7 @@ class Node2D : public CanvasItem { - GDCLASS(Node2D, CanvasItem ); + GDCLASS(Node2D, CanvasItem); Point2 pos; float angle; @@ -54,32 +54,30 @@ class Node2D : public CanvasItem { void _update_xform_values(); protected: - - void _notification(int p_what); static void _bind_methods(); -public: +public: virtual Variant edit_get_state() const; - virtual void edit_set_state(const Variant& p_state); - virtual void edit_set_rect(const Rect2& p_edit_rect); + virtual void edit_set_state(const Variant &p_state); + virtual void edit_set_rect(const Rect2 &p_edit_rect); virtual void edit_rotate(float p_rot); - virtual void edit_set_pivot(const Point2& p_pivot); + virtual void edit_set_pivot(const Point2 &p_pivot); virtual Point2 edit_get_pivot() const; virtual bool edit_has_pivot() const; - void set_position(const Point2& p_pos); + void set_position(const Point2 &p_pos); void set_rotation(float p_radians); void set_rotation_in_degrees(float p_degrees); - void set_scale(const Size2& p_scale); + void set_scale(const Size2 &p_scale); void rotate(float p_radians); - void move_x(float p_delta,bool p_scaled=false); - void move_y(float p_delta,bool p_scaled=false); - void translate(const Vector2& p_amount); - void global_translate(const Vector2& p_amount); - void scale(const Size2& p_amount); + void move_x(float p_delta, bool p_scaled = false); + void move_y(float p_delta, bool p_scaled = false); + void translate(const Vector2 &p_amount); + void global_translate(const Vector2 &p_amount); + void scale(const Size2 &p_amount); Point2 get_position() const; float get_rotation() const; @@ -92,18 +90,18 @@ public: Size2 get_global_scale() const; virtual Rect2 get_item_rect() const; - void set_transform(const Transform2D& p_transform); - void set_global_transform(const Transform2D& p_transform); - void set_global_position(const Point2& p_pos); + void set_transform(const Transform2D &p_transform); + void set_global_transform(const Transform2D &p_transform); + void set_global_position(const Point2 &p_pos); void set_global_rotation(float p_radians); void set_global_rotation_in_degrees(float p_degrees); - void set_global_scale(const Size2& p_scale); + void set_global_scale(const Size2 &p_scale); void set_z(int p_z); int get_z() const; - void look_at(const Vector2& p_pos); - float get_angle_to(const Vector2& p_pos) const; + void look_at(const Vector2 &p_pos); + float get_angle_to(const Vector2 &p_pos) const; void set_z_as_relative(bool p_enabled); bool is_z_relative() const; |
