aboutsummaryrefslogtreecommitdiff
path: root/scene/2d/camera_2d.h
diff options
context:
space:
mode:
authorRémi Verschelde2017-03-05 16:44:50 +0100
committerRémi Verschelde2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /scene/2d/camera_2d.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
downloadgodot-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 '')
-rw-r--r--scene/2d/camera_2d.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/scene/2d/camera_2d.h b/scene/2d/camera_2d.h
index 85d90b225..44cdb5cd9 100644
--- a/scene/2d/camera_2d.h
+++ b/scene/2d/camera_2d.h
@@ -32,12 +32,11 @@
#include "scene/2d/node_2d.h"
#include "scene/main/viewport.h"
-
class Camera2D : public Node2D {
- GDCLASS( Camera2D, Node2D );
-public:
+ GDCLASS(Camera2D, Node2D);
+public:
enum AnchorMode {
ANCHOR_MODE_FIXED_TOP_LEFT,
ANCHOR_MODE_DRAG_CENTER
@@ -78,14 +77,14 @@ protected:
void _set_current(bool p_current);
void _set_old_smoothing(float p_enable);
-protected:
+protected:
virtual Transform2D get_camera_transform();
void _notification(int p_what);
static void _bind_methods();
-public:
- void set_offset(const Vector2& p_offset);
+public:
+ void set_offset(const Vector2 &p_offset);
Vector2 get_offset() const;
void set_anchor_mode(AnchorMode p_anchor_mode);
@@ -94,7 +93,7 @@ public:
void set_rotating(bool p_rotating);
bool is_rotating() const;
- void set_limit(Margin p_margin,int p_limit);
+ void set_limit(Margin p_margin, int p_limit);
int get_limit(Margin p_margin) const;
void set_limit_smoothing_enabled(bool enable);
@@ -106,7 +105,7 @@ public:
void set_v_drag_enabled(bool p_enabled);
bool is_v_drag_enabled() const;
- void set_drag_margin(Margin p_margin,float p_drag_margin);
+ void set_drag_margin(Margin p_margin, float p_drag_margin);
float get_drag_margin(Margin p_margin) const;
void set_v_offset(float p_offset);
@@ -125,13 +124,13 @@ public:
void clear_current();
bool is_current() const;
- void set_zoom(const Vector2& p_zoom);
+ void set_zoom(const Vector2 &p_zoom);
Vector2 get_zoom() const;
Point2 get_camera_screen_center() const;
void set_custom_viewport(Node *p_viewport);
- Node* get_custom_viewport() const;
+ Node *get_custom_viewport() const;
Vector2 get_camera_pos() const;
void force_update_scroll();