correction options

pull/4/head
Valentin Stark 3 years ago
parent 88c65f772a
commit 2d1ba7b5e3
  1. 9
      Poisson.gd

@ -16,13 +16,13 @@ var points = []
signal new_poisson(points)
func _ready():
reset_options(str(default_width), str(default_height), str(default_spacing))
reset_options(default_width, default_height, default_spacing)
pass
func reset_options(width, height, spacing):
$HBoxContainer/Properties/width/width_edit.text = width
$HBoxContainer/Properties/height/height_edit.text = height
$HBoxContainer/Properties/spacing/spacing_edit.text = spacing
$HBoxContainer/Properties/width/width_edit.text = str(width)
$HBoxContainer/Properties/height/height_edit.text = str(height)
$HBoxContainer/Properties/spacing/spacing_edit.text = str(spacing)
func set_data(width, height, spacing):
data.width = width
@ -59,5 +59,6 @@ func _on_OpenFileDialog_file_selected(path):
file.open(path, 1)
var new_data = file.get_var()
set_data(new_data.width, new_data.height, new_data.spacing)
reset_options(new_data.width, new_data.height, new_data.spacing)
points = file.get_var()
emit_signal("new_poisson", points)

Loading…
Cancel
Save