Made TransparentChecker shader material unique for the main two viewports

Fixes #377. The issue was that the shader material was being shared with the background of the cel buttons, and when the cel button transparent background was resized, the canvas transparent background was also affected.
This commit is contained in:
Manolis Papadeas 2020-11-26 02:05:05 +02:00
parent 512507e2c7
commit b1e8bf98d2
6 changed files with 49 additions and 6 deletions

View file

@ -19,11 +19,11 @@ func update_offset(offset : Vector2, scale : Vector2) -> void:
material.set_shader_param("scale", scale)
func _on_TransparentChecker_resized():
func _on_TransparentChecker_resized() -> void:
material.set_shader_param("rect_size", rect_size)
func _init_position(id : int):
func _init_position(id : int) -> void:
match id:
0:
Global.current_project.tile_mode = Global.Tile_Mode.NONE