1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Fix a variable shadowing warning

This warning was reported by Godot 3.2 thanks to its new variable
shadowing warning.
This commit is contained in:
Hugo Locurcio 2019-11-19 22:40:34 +01:00
parent 7318db30ab
commit f1eb6de1d0
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
5 changed files with 6 additions and 6 deletions

View file

@ -652,8 +652,8 @@ func point_in_rectangle(p : Vector2, coord1 : Vector2, coord2 : Vector2) -> bool
return p.x > coord1.x && p.y > coord1.y && p.x < coord2.x && p.y < coord2.y
#Returns the position in the middle of a rectangle
func rectangle_center(pos : Vector2, size : Vector2) -> Vector2:
return (pos - size / 2).floor()
func rectangle_center(rect_position : Vector2, rect_size : Vector2) -> Vector2:
return (rect_position - rect_size / 2).floor()
func _on_Timer_timeout() -> void:
Global.can_draw = true

View file

@ -119,4 +119,4 @@ func change_frame_order(rate : int) -> void:
Global.undo_redo.add_undo_method(Global, "undo", [Global.canvases[frame]])
Global.undo_redo.add_do_method(Global, "redo", [Global.canvases[frame]])
Global.undo_redo.commit_action()
Global.undo_redo.commit_action()

View file

@ -51,4 +51,4 @@ func _draw() -> void:
if i % minor_subdivision == 0:
draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.33), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), Color.white)
else:
draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.66), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), Color.white)
draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.66), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), Color.white)

View file

@ -65,4 +65,4 @@ func _on_VisibilityButton_pressed() -> void:
func _on_LineEdit_text_changed(new_text : String) -> void:
Global.canvas.layers[i][2] = new_text
$HBoxContainer/Label.text = new_text
$HBoxContainer/Label.text = new_text

View file

@ -51,4 +51,4 @@ func _draw() -> void:
if i % minor_subdivision == 0:
draw_line(Vector2(RULER_WIDTH * 0.33, position.y), Vector2(RULER_WIDTH, position.y), Color.white)
else:
draw_line(Vector2(RULER_WIDTH * 0.66, position.y), Vector2(RULER_WIDTH, position.y), Color.white)
draw_line(Vector2(RULER_WIDTH * 0.66, position.y), Vector2(RULER_WIDTH, position.y), Color.white)