1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-05-08 06:14:48 -04:00

Switched to rect_global_position from rect_position

This commit is contained in:
Anthony Wilcox 2018-12-31 23:25:02 -05:00
parent 0f3187be10
commit d91fd1cc4f
4 changed files with 4 additions and 4 deletions

View file

@ -3,7 +3,7 @@
[ext_resource path="res://src/Interface.gd" type="Script" id=1]
[ext_resource path="res://music/piano.ogg" type="AudioStream" id=2]
[node name="Interface" type="Control" index="0"]
[node name="Interface" type="Control"]
anchor_left = 0.0
anchor_top = 0.0

View file

@ -6,7 +6,7 @@
[ext_resource path="res://Clothes.tscn" type="PackedScene" id=4]
[ext_resource path="res://Interface.tscn" type="PackedScene" id=5]
[node name="MainScreen" type="Node2D"]
[node name="MainScreen" type="Node2D" index="0"]
[node name="Background" type="Sprite" parent="." index="0"]

View file

@ -8,7 +8,7 @@ func _on_outfit_gui_input(ev):
if ev is InputEventMouseButton:
if ev.button_index == BUTTON_LEFT:
if ev.pressed:
item_pos = get_global_mouse_position() - rect_position
item_pos = get_global_mouse_position() - rect_global_position
else:
item_pos = null

View file

@ -30,7 +30,7 @@ func _on_TitleBar_gui_input(ev):
if ev is InputEventMouseButton:
if ev.button_index == BUTTON_LEFT:
if ev.pressed:
drag_pos = get_global_mouse_position() - rect_position
drag_pos = get_global_mouse_position() - rect_global_position
else:
drag_pos = null