Moved Rotate Image selection up, fixed some warnings

And minor UI changes, like changing default cursor shape to pointing hand when hovering on some UI elements in RotateImage.tscn
This commit is contained in:
OverloadedOrama 2020-02-04 18:29:34 +02:00
parent c4229e1759
commit 155b77b514
5 changed files with 48 additions and 53 deletions

View file

@ -18,12 +18,12 @@ func set_sprite(sprite : Image):
$VBoxContainer/TextureRect.texture = texture
func _on_HSlider_value_changed(value):
func _on_HSlider_value_changed(_value):
rotate()
$VBoxContainer/HBoxContainer/SpinBox.value = $VBoxContainer/HBoxContainer/HSlider.value
func _on_SpinBox_value_changed(value):
func _on_SpinBox_value_changed(_value):
$VBoxContainer/HBoxContainer/HSlider.value = $VBoxContainer/HBoxContainer/SpinBox.value
@ -36,7 +36,7 @@ func _on_RotateImage_confirmed():
Global.nn_rotate(layer,$VBoxContainer/HBoxContainer/HSlider.value*PI/180)
Global.canvas.handle_redo("Draw")
$VBoxContainer/HBoxContainer/HSlider.value = 0
func rotate():
var sprite : Image = Image.new()
sprite.copy_from(aux_img)
@ -48,7 +48,7 @@ func rotate():
texture.create_from_image(sprite, 0)
func _on_OptionButton_item_selected(id):
func _on_OptionButton_item_selected(_id):
rotate()

View file

@ -5,7 +5,7 @@
[node name="RotateImage" type="ConfirmationDialog"]
margin_right = 245.0
margin_bottom = 241.0
window_title = "Confirmá, por favor..."
resizable = true
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
@ -44,6 +44,7 @@ text = "Type:"
margin_left = 38.0
margin_right = 229.0
margin_bottom = 20.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
size_flags_vertical = 3
@ -62,6 +63,7 @@ text = "Angle: "
margin_left = 48.0
margin_right = 151.0
margin_bottom = 24.0
mouse_default_cursor_shape = 2
size_flags_horizontal = 3
size_flags_vertical = 3
max_value = 359.0
@ -73,6 +75,7 @@ __meta__ = {
margin_left = 155.0
margin_right = 229.0
margin_bottom = 24.0
mouse_default_cursor_shape = 2
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"]