summaryrefslogtreecommitdiff
path: root/editor/plugins/texture_region_editor_plugin.h
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-05-26 03:59:16 +0200
committerkobewi <kobewi4e@gmail.com>2022-05-26 20:54:45 +0200
commite748fc1a11a1fdc2e94872060f5c6f77700bf00b (patch)
treeb48801451eb0c18c021ce6451e239494588ff1e0 /editor/plugins/texture_region_editor_plugin.h
parent2e8862887c07708ea0d4cb015902c3001ea6f495 (diff)
Improve TextureRegionEditor
Diffstat (limited to 'editor/plugins/texture_region_editor_plugin.h')
-rw-r--r--editor/plugins/texture_region_editor_plugin.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index dd92f6e3eb..a18c87f153 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -71,10 +71,10 @@ class TextureRegionEditor : public AcceptDialog {
UndoRedo *undo_redo = nullptr;
Vector2 draw_ofs;
- float draw_zoom;
- bool updating_scroll;
+ float draw_zoom = 0.0;
+ bool updating_scroll = false;
- int snap_mode;
+ int snap_mode = 0;
Vector2 snap_offset;
Vector2 snap_step;
Vector2 snap_separation;
@@ -88,15 +88,16 @@ class TextureRegionEditor : public AcceptDialog {
Rect2 rect;
Rect2 rect_prev;
float prev_margin = 0.0f;
- int edited_margin;
+ int edited_margin = 0;
HashMap<RID, List<Rect2>> cache_map;
List<Rect2> autoslice_cache;
- bool autoslice_is_dirty;
+ bool autoslice_is_dirty = false;
- bool drag;
+ bool drag = false;
bool creating = false;
Vector2 drag_from;
- int drag_index;
+ int drag_index = 0;
+ bool request_center = false;
Ref<ViewPanner> panner;
void _scroll_callback(Vector2 p_scroll_vec, bool p_alt);