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:
parent
0f3187be10
commit
d91fd1cc4f
4 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,7 @@
|
||||||
[ext_resource path="res://src/Interface.gd" type="Script" id=1]
|
[ext_resource path="res://src/Interface.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://music/piano.ogg" type="AudioStream" id=2]
|
[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_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
[ext_resource path="res://Clothes.tscn" type="PackedScene" id=4]
|
[ext_resource path="res://Clothes.tscn" type="PackedScene" id=4]
|
||||||
[ext_resource path="res://Interface.tscn" type="PackedScene" id=5]
|
[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"]
|
[node name="Background" type="Sprite" parent="." index="0"]
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ func _on_outfit_gui_input(ev):
|
||||||
if ev is InputEventMouseButton:
|
if ev is InputEventMouseButton:
|
||||||
if ev.button_index == BUTTON_LEFT:
|
if ev.button_index == BUTTON_LEFT:
|
||||||
if ev.pressed:
|
if ev.pressed:
|
||||||
item_pos = get_global_mouse_position() - rect_position
|
item_pos = get_global_mouse_position() - rect_global_position
|
||||||
else:
|
else:
|
||||||
item_pos = null
|
item_pos = null
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ func _on_TitleBar_gui_input(ev):
|
||||||
if ev is InputEventMouseButton:
|
if ev is InputEventMouseButton:
|
||||||
if ev.button_index == BUTTON_LEFT:
|
if ev.button_index == BUTTON_LEFT:
|
||||||
if ev.pressed:
|
if ev.pressed:
|
||||||
drag_pos = get_global_mouse_position() - rect_position
|
drag_pos = get_global_mouse_position() - rect_global_position
|
||||||
else:
|
else:
|
||||||
drag_pos = null
|
drag_pos = null
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue