1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-20 12:33:14 +00:00

Fixed "fill_color variable already declared" warning

This commit is contained in:
Manolis Papadeas 2020-01-11 00:11:36 +02:00 committed by GitHub
parent 6dfa3ac9b7
commit c59182019c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,12 +2,12 @@ extends ConfirmationDialog
onready var width_value = $VBoxContainer/OptionsContainer/WidthValue
onready var height_value = $VBoxContainer/OptionsContainer/HeightValue
onready var fill_color = $VBoxContainer/OptionsContainer/FillColor
onready var fill_color_node = $VBoxContainer/OptionsContainer/FillColor
func _on_CreateNewImage_confirmed() -> void:
var width : int = $VBoxContainer/OptionsContainer/WidthValue.value
var height : int = $VBoxContainer/OptionsContainer/HeightValue.value
var fill_color : Color = $VBoxContainer/OptionsContainer/FillColor.color
var width : int = width_value.value
var height : int = height_value.value
var fill_color : Color = fill_color_node.color
Global.control.clear_canvases()
Global.canvas = load("res://Prefabs/Canvas.tscn").instance()
Global.canvas.size = Vector2(width, height).floor()
@ -23,4 +23,4 @@ func _on_CreateNewImage_confirmed() -> void:
func _on_CreateNewImage_about_to_show() -> void:
width_value.value = Global.default_image_width
height_value.value = Global.default_image_height
fill_color.color = Global.default_fill_color
fill_color_node.color = Global.default_fill_color