From e24e9d65a50d8fbb30c5b5399b1447160fae2df0 Mon Sep 17 00:00:00 2001 From: azagaya Date: Mon, 3 Feb 2020 14:01:59 -0300 Subject: [PATCH] Reset slider to zero when openning again --- Prefabs/Dialogs/RotateImage.gd | 4 ++++ Prefabs/Dialogs/RotateImage.tscn | 1 + 2 files changed, 5 insertions(+) diff --git a/Prefabs/Dialogs/RotateImage.gd b/Prefabs/Dialogs/RotateImage.gd index 0ed90a867..080affdbe 100644 --- a/Prefabs/Dialogs/RotateImage.gd +++ b/Prefabs/Dialogs/RotateImage.gd @@ -46,3 +46,7 @@ func rotate(): func _on_OptionButton_item_selected(id): rotate() + + +func _on_RotateImage_about_to_show(): + $VBoxContainer/HBoxContainer/HSlider.value = 0 diff --git a/Prefabs/Dialogs/RotateImage.tscn b/Prefabs/Dialogs/RotateImage.tscn index b9ab68f15..12302e362 100644 --- a/Prefabs/Dialogs/RotateImage.tscn +++ b/Prefabs/Dialogs/RotateImage.tscn @@ -74,6 +74,7 @@ margin_left = 155.0 margin_right = 229.0 margin_bottom = 24.0 max_value = 359.0 +[connection signal="about_to_show" from="." to="." method="_on_RotateImage_about_to_show"] [connection signal="confirmed" from="." to="." method="_on_RotateImage_confirmed"] [connection signal="item_selected" from="VBoxContainer/HBoxContainer2/OptionButton" to="." method="_on_OptionButton_item_selected"] [connection signal="value_changed" from="VBoxContainer/HBoxContainer/HSlider" to="." method="_on_HSlider_value_changed"]