32 #include "scene/2d/node_2d.h" 33 #include "scene/main/viewport.h" 42 ANCHOR_MODE_FIXED_TOP_LEFT,
43 ANCHOR_MODE_DRAG_CENTER
48 Point2 smoothed_camera_pos;
58 AnchorMode anchor_mode;
62 bool smoothing_enabled;
72 Point2 camera_screen_center;
73 void _update_scroll();
75 void _make_current(
Object *p_which);
76 void _set_current(
bool p_current);
78 void _set_old_smoothing(
float p_enable);
81 virtual Matrix32 get_camera_transform();
82 void _notification(
int p_what);
83 static void _bind_methods();
86 void set_offset(
const Vector2& p_offset);
89 void set_anchor_mode(AnchorMode p_anchor_mode);
90 AnchorMode get_anchor_mode()
const;
92 void set_rotating(
bool p_rotating);
93 bool is_rotating()
const;
95 void set_limit(Margin p_margin,
int p_limit);
96 int get_limit(Margin p_margin)
const;
99 void set_h_drag_enabled(
bool p_enabled);
100 bool is_h_drag_enabled()
const;
102 void set_v_drag_enabled(
bool p_enabled);
103 bool is_v_drag_enabled()
const;
105 void set_drag_margin(Margin p_margin,
float p_drag_margin);
106 float get_drag_margin(Margin p_margin)
const;
108 void set_v_offset(
float p_offset);
109 float get_v_offset()
const;
111 void set_h_offset(
float p_offset);
112 float get_h_offset()
const;
114 void set_enable_follow_smoothing(
bool p_enabled);
115 bool is_follow_smoothing_enabled()
const;
117 void set_follow_smoothing(
float p_speed);
118 float get_follow_smoothing()
const;
121 void clear_current();
122 bool is_current()
const;
124 void set_zoom(
const Vector2& p_zoom);
127 Point2 get_camera_screen_center()
const;
129 Vector2 get_camera_pos()
const;
130 void force_update_scroll();
135 VARIANT_ENUM_CAST(Camera2D::AnchorMode);
137 #endif // CAMERA_2D_H Definition: viewport.h:75
Definition: string_db.h:48
Definition: math_2d.h:554
Definition: camera_2d.h:36