Moved tile mode drawing logic from Canvas to a new script

I mostly did it so I could move tile mode logic into a new node, so I could have control over the drawing order. TileMode.gd also always draws 8 blank rectangles, which are being drawn on top of the grid, in order to hide it if it gets out of boundaries. We are now very close to implementing an isometric grid, #305.

This shouldn't have much of a performance impact, but some more testing is most likely needed.
This commit is contained in:
OverloadedOrama 2020-08-18 17:03:49 +03:00
parent f2136236b1
commit 14d958e55f
6 changed files with 45 additions and 18 deletions

View file

@ -28,9 +28,7 @@ var key_move_press_time := [0.0, 0.0, 0.0, 0.0]
# Canvas related stuff
var layers_changed_skip := false
var can_draw := false
var has_focus := false
var cursor_image = preload("res://assets/graphics/cursor_icons/cursor.png")
var left_cursor_tool_texture := ImageTexture.new()
@ -40,6 +38,7 @@ var image_clipboard : Image
var play_only_tags := true
var show_x_symmetry_axis := false
var show_y_symmetry_axis := false
var default_clear_color := Color.gray
# Preferences
var pressure_sensitivity_mode = Pressure_Sensitivity.NONE