mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-21 13:16:49 +01:00
Remove rect y axis flipping code, as it's not needed here. (Both uvs and the gui is y+ down.)
This commit is contained in:
parent
df502c5e5e
commit
5e6e17a3b2
@ -48,15 +48,11 @@ func refresh() -> void:
|
|||||||
if !_mdr:
|
if !_mdr:
|
||||||
return
|
return
|
||||||
|
|
||||||
#anchor is bottom left here
|
|
||||||
var rect : Rect2 = _base_rect
|
var rect : Rect2 = _base_rect
|
||||||
rect.position *= _rect_scale
|
rect.position *= _rect_scale
|
||||||
rect.size *= _rect_scale
|
rect.size *= _rect_scale
|
||||||
|
|
||||||
#anchor needs to be on top left here
|
rect_position = rect.position
|
||||||
var rp : Vector2 = rect.position
|
|
||||||
rp.y = edited_resource_parent_size.y * _rect_scale - rect.size.y - rect.position.y
|
|
||||||
rect_position = rp
|
|
||||||
rect_size = rect.size
|
rect_size = rect.size
|
||||||
|
|
||||||
update()
|
update()
|
||||||
@ -233,7 +229,6 @@ func _gui_input(p_event : InputEvent) -> void:
|
|||||||
set_position(rect.position)
|
set_position(rect.position)
|
||||||
|
|
||||||
#rect needs to be converted back
|
#rect needs to be converted back
|
||||||
rect.position.y = edited_resource_parent_size.y * _rect_scale - rect.size.y - rect.position.y
|
|
||||||
rect.position /= _rect_scale
|
rect.position /= _rect_scale
|
||||||
rect.size /= _rect_scale
|
rect.size /= _rect_scale
|
||||||
#edited_resource.set_rect(rect)
|
#edited_resource.set_rect(rect)
|
||||||
|
Loading…
Reference in New Issue
Block a user