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:
|
if child is GridContainer:
|
||||||
child.columns = columns
|
child.columns = columns
|
||||||
Global.brushes_popup.popup(Rect2(pop_position, Vector2(size_x, size_y)))
|
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:
|
func _on_Brush_selected(brush: Brushes.Brush) -> void:
|
||||||
|
@ -195,16 +196,16 @@ func update_mirror_brush() -> void:
|
||||||
|
|
||||||
|
|
||||||
func update_brush_image_flip_and_rotate() -> void:
|
func update_brush_image_flip_and_rotate() -> void:
|
||||||
if _brush_flip_x == true:
|
if _brush_flip_x == true:
|
||||||
_brush_image.flip_x()
|
_brush_image.flip_x()
|
||||||
if _brush_flip_y == true:
|
if _brush_flip_y == true:
|
||||||
_brush_image.flip_y()
|
_brush_image.flip_y()
|
||||||
if _brush_rotate_90 == true:
|
if _brush_rotate_90 == true:
|
||||||
_brush_image.rotate_90(CLOCKWISE)
|
_brush_image.rotate_90(CLOCKWISE)
|
||||||
if _brush_rotate_180 == true:
|
if _brush_rotate_180 == true:
|
||||||
_brush_image.rotate_180()
|
_brush_image.rotate_180()
|
||||||
if _brush_rotate_270 == true:
|
if _brush_rotate_270 == true:
|
||||||
_brush_image.rotate_90(COUNTERCLOCKWISE)
|
_brush_image.rotate_90(COUNTERCLOCKWISE)
|
||||||
|
|
||||||
|
|
||||||
func update_mask(can_skip := true) -> void:
|
func update_mask(can_skip := true) -> void:
|
||||||
|
@ -738,7 +739,6 @@ func _pick_color(pos: Vector2i) -> void:
|
||||||
Tools.assign_color(color, button, false)
|
Tools.assign_color(color, button, false)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _on_flip_x_toggled(button_pressed: bool) -> void:
|
func _on_flip_x_toggled(button_pressed: bool) -> void:
|
||||||
_brush_flip_x = button_pressed
|
_brush_flip_x = button_pressed
|
||||||
update_brush()
|
update_brush()
|
||||||
|
|
|
@ -2,6 +2,7 @@ extends BaseButton
|
||||||
|
|
||||||
var brush = Global.brushes_popup.Brush.new()
|
var brush = Global.brushes_popup.Brush.new()
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
Tools.flip_rotate.connect(_flip_rotate_updated)
|
Tools.flip_rotate.connect(_flip_rotate_updated)
|
||||||
|
|
||||||
|
@ -30,11 +31,17 @@ func _on_BrushButton_mouse_exited() -> void:
|
||||||
if brush.type == Global.brushes_popup.CUSTOM:
|
if brush.type == Global.brushes_popup.CUSTOM:
|
||||||
$DeleteButton.visible = false
|
$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_h(flip_x)
|
||||||
$BrushTexture.set_flip_v(flip_y)
|
$BrushTexture.set_flip_v(flip_y)
|
||||||
var _rotation = 0
|
var _rotation = 0
|
||||||
if rotate_90 ==true : _rotation += 90
|
if rotate_90 == true:
|
||||||
if rotate_180 ==true : _rotation += 180
|
_rotation += 90
|
||||||
if rotate_270 ==true : _rotation += 270
|
if rotate_180 == true:
|
||||||
|
_rotation += 180
|
||||||
|
if rotate_270 == true:
|
||||||
|
_rotation += 270
|
||||||
$BrushTexture.rotation_degrees = _rotation
|
$BrushTexture.rotation_degrees = _rotation
|
||||||
|
|
Loading…
Reference in a new issue