summaryrefslogtreecommitdiff
path: root/editor/plugins/canvas_item_editor_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.h')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h116
1 files changed, 58 insertions, 58 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 1a9d49a4a8..1b61cdc675 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -183,16 +183,16 @@ private:
bool selection_menu_additive_selection;
Tool tool = TOOL_SELECT;
- Control *viewport;
- Control *viewport_scrollable;
+ Control *viewport = nullptr;
+ Control *viewport_scrollable = nullptr;
- HScrollBar *h_scroll;
- VScrollBar *v_scroll;
- HBoxContainer *hb;
+ HScrollBar *h_scroll = nullptr;
+ VScrollBar *v_scroll = nullptr;
+ HBoxContainer *hb = nullptr;
// Used for secondary menu items which are displayed depending on the currently selected node
// (such as MeshInstance's "Mesh" menu).
- PanelContainer *context_menu_container;
- HBoxContainer *hbc_context_menu;
+ PanelContainer *context_menu_container = nullptr;
+ HBoxContainer *hbc_context_menu = nullptr;
Transform2D transform;
GridVisibility grid_visibility = GRID_VISIBILITY_SHOW_WHEN_SNAPPING;
@@ -293,47 +293,47 @@ private:
};
List<PoseClipboard> pose_clipboard;
- Button *select_button;
+ Button *select_button = nullptr;
- Button *move_button;
- Button *scale_button;
- Button *rotate_button;
+ Button *move_button = nullptr;
+ Button *scale_button = nullptr;
+ Button *rotate_button = nullptr;
- Button *list_select_button;
- Button *pivot_button;
- Button *pan_button;
+ Button *list_select_button = nullptr;
+ Button *pivot_button = nullptr;
+ Button *pan_button = nullptr;
- Button *ruler_button;
+ Button *ruler_button = nullptr;
- Button *smart_snap_button;
- Button *grid_snap_button;
- MenuButton *snap_config_menu;
- PopupMenu *smartsnap_config_popup;
+ Button *smart_snap_button = nullptr;
+ Button *grid_snap_button = nullptr;
+ MenuButton *snap_config_menu = nullptr;
+ PopupMenu *smartsnap_config_popup = nullptr;
- Button *lock_button;
- Button *unlock_button;
+ Button *lock_button = nullptr;
+ Button *unlock_button = nullptr;
- Button *group_button;
- Button *ungroup_button;
+ Button *group_button = nullptr;
+ Button *ungroup_button = nullptr;
- MenuButton *skeleton_menu;
- Button *override_camera_button;
- MenuButton *view_menu;
- PopupMenu *grid_menu;
- HBoxContainer *animation_hb;
- MenuButton *animation_menu;
+ MenuButton *skeleton_menu = nullptr;
+ Button *override_camera_button = nullptr;
+ MenuButton *view_menu = nullptr;
+ PopupMenu *grid_menu = nullptr;
+ HBoxContainer *animation_hb = nullptr;
+ MenuButton *animation_menu = nullptr;
- Button *key_loc_button;
- Button *key_rot_button;
- Button *key_scale_button;
- Button *key_insert_button;
- Button *key_auto_insert_button;
+ Button *key_loc_button = nullptr;
+ Button *key_rot_button = nullptr;
+ Button *key_scale_button = nullptr;
+ Button *key_insert_button = nullptr;
+ Button *key_auto_insert_button = nullptr;
- PopupMenu *selection_menu;
- PopupMenu *add_node_menu;
+ PopupMenu *selection_menu = nullptr;
+ PopupMenu *add_node_menu = nullptr;
- Control *top_ruler;
- Control *left_ruler;
+ Control *top_ruler = nullptr;
+ Control *left_ruler = nullptr;
Point2 drag_start_origin;
DragType drag_type = DRAG_NONE;
@@ -374,9 +374,9 @@ private:
void _find_canvas_items_in_rect(const Rect2 &p_rect, Node *p_node, List<CanvasItem *> *r_items, const Transform2D &p_parent_xform = Transform2D(), const Transform2D &p_canvas_xform = Transform2D());
bool _select_click_on_item(CanvasItem *item, Point2 p_click_pos, bool p_append);
- ConfirmationDialog *snap_dialog;
+ ConfirmationDialog *snap_dialog = nullptr;
- CanvasItem *ref_item;
+ CanvasItem *ref_item = nullptr;
void _save_canvas_item_state(List<CanvasItem *> p_canvas_items, bool save_bones = false);
void _restore_canvas_item_state(List<CanvasItem *> p_canvas_items, bool restore_bones = false);
@@ -400,7 +400,7 @@ private:
void _prepare_grid_menu();
void _on_grid_menu_id_pressed(int p_id);
- UndoRedo *undo_redo;
+ UndoRedo *undo_redo = nullptr;
List<CanvasItem *> _get_edited_canvas_items(bool retrieve_locked = false, bool remove_canvas_item_if_parent_in_selection = true);
Rect2 _get_encompassing_rect_from_list(List<CanvasItem *> p_list);
@@ -476,8 +476,8 @@ private:
const SnapTarget p_snap_target, List<const CanvasItem *> p_exceptions,
const Node *p_current);
- VBoxContainer *controls_vb;
- EditorZoomWidget *zoom_widget;
+ VBoxContainer *controls_vb = nullptr;
+ EditorZoomWidget *zoom_widget = nullptr;
void _update_zoom(real_t p_zoom);
void _shortcut_zoom_set(real_t p_zoom);
void _zoom_on_position(real_t p_zoom, Point2 p_position = Point2());
@@ -488,9 +488,9 @@ private:
void _update_override_camera_button(bool p_game_running);
- HSplitContainer *left_panel_split;
- HSplitContainer *right_panel_split;
- VSplitContainer *bottom_split;
+ HSplitContainer *left_panel_split = nullptr;
+ HSplitContainer *right_panel_split = nullptr;
+ VSplitContainer *bottom_split = nullptr;
void _update_context_menu_stylebox();
@@ -555,7 +555,7 @@ public:
void focus_selection();
- EditorSelection *editor_selection;
+ EditorSelection *editor_selection = nullptr;
CanvasItemEditor();
};
@@ -563,7 +563,7 @@ public:
class CanvasItemEditorPlugin : public EditorPlugin {
GDCLASS(CanvasItemEditorPlugin, EditorPlugin);
- CanvasItemEditor *canvas_item_editor;
+ CanvasItemEditor *canvas_item_editor = nullptr;
public:
virtual String get_name() const override { return "2D"; }
@@ -589,18 +589,18 @@ class CanvasItemEditorViewport : public Control {
Vector<String> texture_node_types;
Vector<String> selected_files;
- Node *target_node;
+ Node *target_node = nullptr;
Point2 drop_pos;
- EditorData *editor_data;
- CanvasItemEditor *canvas_item_editor;
- Control *preview_node;
- AcceptDialog *accept;
- AcceptDialog *selector;
- Label *selector_label;
- Label *label;
- Label *label_desc;
- VBoxContainer *btn_group;
+ EditorData *editor_data = nullptr;
+ CanvasItemEditor *canvas_item_editor = nullptr;
+ Control *preview_node = nullptr;
+ AcceptDialog *accept = nullptr;
+ AcceptDialog *selector = nullptr;
+ Label *selector_label = nullptr;
+ Label *label = nullptr;
+ Label *label_desc = nullptr;
+ VBoxContainer *btn_group = nullptr;
Ref<ButtonGroup> button_group;
void _on_mouse_exit();