diff options
author | Liangdi <wu@liangdi.me> | 2018-10-21 21:56:05 +0800 |
---|---|---|
committer | Liangdi <wu@liangdi.me> | 2018-10-26 23:58:58 +0800 |
commit | aaa7f625df9fbe921be992fa849dd859a9c0a867 (patch) | |
tree | 8569cb11e275ac7546d7cf581a7c986c6ad567ce /editor/plugins/tile_set_editor_plugin.h | |
parent | 3ac0e8d0dfbccb6535b8380ff82ff35c534fe062 (diff) |
support New TileSet Editor zooming use CTRL/CMD + MouseWheel
fixed code style for clang-format
apply clang-format
Diffstat (limited to 'editor/plugins/tile_set_editor_plugin.h')
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h index 23bf68b90f..bd8a2ddb98 100644 --- a/editor/plugins/tile_set_editor_plugin.h +++ b/editor/plugins/tile_set_editor_plugin.h @@ -141,6 +141,10 @@ class TileSetEditor : public Control { EditMode edit_mode; int current_tile; + float max_scale; + float min_scale; + float scale_ratio; + void update_texture_list(); void update_texture_list_icon(); @@ -178,6 +182,10 @@ private: void _set_snap_off(Vector2 p_val); void _set_snap_sep(Vector2 p_val); + void _zoom_in(); + void _zoom_out(); + void _reset_zoom(); + void draw_highlight_current_tile(); void draw_highlight_subtile(Vector2 coord, const Vector<Vector2> &other_highlighted = Vector<Vector2>()); void draw_tile_subdivision(int p_id, Color p_color) const; |