mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
code changed for github static checks
This commit is contained in:
parent
10db8f875f
commit
8bbcc21ec6
|
@ -59,8 +59,9 @@ func _on_BrushType_pressed() -> void:
|
|||
if child is GridContainer:
|
||||
child.columns = columns
|
||||
Global.brushes_popup.popup(Rect2(pop_position, Vector2(size_x, size_y)))
|
||||
Tools.flip_rotate.emit(_brush_flip_x, _brush_flip_y, _brush_rotate_90, _brush_rotate_180, _brush_rotate_270)
|
||||
|
||||
Tools.flip_rotate.emit(
|
||||
_brush_flip_x, _brush_flip_y, _brush_rotate_90, _brush_rotate_180, _brush_rotate_270
|
||||
)
|
||||
|
||||
|
||||
func _on_Brush_selected(brush: Brushes.Brush) -> void:
|
||||
|
@ -738,7 +739,6 @@ func _pick_color(pos: Vector2i) -> void:
|
|||
Tools.assign_color(color, button, false)
|
||||
|
||||
|
||||
|
||||
func _on_flip_x_toggled(button_pressed: bool) -> void:
|
||||
_brush_flip_x = button_pressed
|
||||
update_brush()
|
||||
|
|
|
@ -2,6 +2,7 @@ extends BaseButton
|
|||
|
||||
var brush = Global.brushes_popup.Brush.new()
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
Tools.flip_rotate.connect(_flip_rotate_updated)
|
||||
|
||||
|
@ -30,11 +31,17 @@ func _on_BrushButton_mouse_exited() -> void:
|
|||
if brush.type == Global.brushes_popup.CUSTOM:
|
||||
$DeleteButton.visible = false
|
||||
|
||||
func _flip_rotate_updated(flip_x: bool, flip_y: bool, rotate_90: bool, rotate_180: bool,rotate_270: bool):
|
||||
|
||||
func _flip_rotate_updated(
|
||||
flip_x: bool, flip_y: bool, rotate_90: bool, rotate_180: bool,rotate_270: bool
|
||||
):
|
||||
$BrushTexture.set_flip_h(flip_x)
|
||||
$BrushTexture.set_flip_v(flip_y)
|
||||
var _rotation = 0
|
||||
if rotate_90 ==true : _rotation += 90
|
||||
if rotate_180 ==true : _rotation += 180
|
||||
if rotate_270 ==true : _rotation += 270
|
||||
if rotate_90 == true:
|
||||
_rotation += 90
|
||||
if rotate_180 == true:
|
||||
_rotation += 180
|
||||
if rotate_270 == true:
|
||||
_rotation += 270
|
||||
$BrushTexture.rotation_degrees = _rotation
|
||||
|
|
Loading…
Reference in a new issue