From 51189ac7936eabcb027d3030ea3b0bac8c09cc61 Mon Sep 17 00:00:00 2001 From: RorotoSic <70805756+RorotoSic@users.noreply.github.com> Date: Thu, 7 Mar 2024 21:41:41 +0100 Subject: [PATCH] expand button for flip/rotate --- src/Tools/BaseDraw.gd | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Tools/BaseDraw.gd b/src/Tools/BaseDraw.gd index ebd898de9e5..aa4ef88ebc9 100644 --- a/src/Tools/BaseDraw.gd +++ b/src/Tools/BaseDraw.gd @@ -172,8 +172,9 @@ func update_brush() -> void: _polylines = _create_polylines(_indicator) $Brush/Type/Texture.texture = _brush_texture $ColorInterpolation.visible = _brush.type in [Brushes.FILE, Brushes.RANDOM_FILE, Brushes.CUSTOM] - $Flip.visible = _brush.type in [Brushes.FILE, Brushes.RANDOM_FILE, Brushes.CUSTOM] - $Rotate.visible = _brush.type in [Brushes.FILE, Brushes.RANDOM_FILE, Brushes.CUSTOM] + $ExpandButton.visible = _brush.type in [Brushes.FILE, Brushes.RANDOM_FILE, Brushes.CUSTOM] + if $ExpandButton.visible == false: + $ExpandButton.set_pressed(false) func update_random_image() -> void: @@ -764,3 +765,8 @@ func _on_rotate_180_toggled(button_pressed: bool) -> void: func _on_rotate_270_toggled(button_pressed: bool) -> void: _brush_rotate_270 = button_pressed update_brush() + + +func _on_expand_button_toggled(button_pressed: bool) -> void: + $Flip.visible = button_pressed + $Rotate.visible = button_pressed