mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Also make rect based selection work when dragging from right to left adn/or from down to up.
This commit is contained in:
parent
85a4fc8fd3
commit
f71d65be85
@ -289,6 +289,16 @@ func forward_spatial_gui_input(index, camera, event):
|
||||
else:
|
||||
# Always return false here, so the drag rect thing disappears in the editor
|
||||
var rect : Rect2 = Rect2(_rect_drag_start_point, rect_size)
|
||||
|
||||
# This is needed so selection works even when you drag from bottom to top, and from right to left
|
||||
var rect_ofs : Vector2 = _rect_drag_start_point - mouse_pos
|
||||
|
||||
if rect_ofs.x > 0:
|
||||
rect.position.x -= rect_ofs.x
|
||||
|
||||
if rect_ofs.y > 0:
|
||||
rect.position.y -= rect_ofs.y
|
||||
|
||||
var selected : PoolIntArray = PoolIntArray()
|
||||
|
||||
for i in range(_handle_points.size()):
|
||||
|
Loading…
Reference in New Issue
Block a user