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

Merge pull request #20 with previous commit

This commit is contained in:
OverloadedOrama 2019-11-20 14:42:52 +02:00
parent e895e82a95
commit d44b31b5a8
6 changed files with 7 additions and 6 deletions

View file

@ -904,6 +904,7 @@ margin_right = 224.0
margin_bottom = 530.0 margin_bottom = 530.0
[node name="TabContainer" type="TabContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] [node name="TabContainer" type="TabContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"]
editor/display_folded = true
margin_top = 533.0 margin_top = 533.0
margin_right = 224.0 margin_right = 224.0
margin_bottom = 605.0 margin_bottom = 605.0

View file

@ -650,8 +650,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 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 #Returns the position in the middle of a rectangle
func rectangle_center(pos : Vector2, size : Vector2) -> Vector2: func rectangle_center(rect_position : Vector2, rect_size : Vector2) -> Vector2:
return (pos - size / 2).floor() return (rect_position - rect_size / 2).floor()
func _on_Timer_timeout() -> void: func _on_Timer_timeout() -> void:
Global.can_draw = true Global.can_draw = true