mirror of
https://github.com/Relintai/Godot-Simple-TODO.git
synced 2024-12-20 10:16:52 +01:00
Error fixes
This commit is contained in:
parent
2e4ac956da
commit
32c8b35608
@ -49,7 +49,7 @@ func _process(_delta):
|
|||||||
if is_dragging:
|
if is_dragging:
|
||||||
var mouse_position = main.get_local_mouse_position()
|
var mouse_position = main.get_local_mouse_position()
|
||||||
|
|
||||||
var item_under_mouse = main.column_container.get_column_from_mouse_position()
|
var item_under_mouse = get_column_from_mouse_position()
|
||||||
if item_under_mouse:
|
if item_under_mouse:
|
||||||
if item_under_mouse:
|
if item_under_mouse:
|
||||||
var item_index = item_under_mouse.get_index()
|
var item_index = item_under_mouse.get_index()
|
||||||
@ -165,6 +165,17 @@ func move_column(index):
|
|||||||
|
|
||||||
undo_redo.commit_action()
|
undo_redo.commit_action()
|
||||||
|
|
||||||
|
func get_column_from_mouse_position() -> PanelContainer:
|
||||||
|
var mouse_position = main.column_container.get_local_mouse_position()
|
||||||
|
|
||||||
|
for i in main.column_container.get_child_count():
|
||||||
|
var child = main.column_container.get_child(i)
|
||||||
|
var rect: Rect2 = child.get_rect()
|
||||||
|
|
||||||
|
if rect.has_point(Vector2(mouse_position.x, 0)):
|
||||||
|
return child
|
||||||
|
return null
|
||||||
|
|
||||||
func _on_Items_child_entered_tree(node):
|
func _on_Items_child_entered_tree(node):
|
||||||
update_counter()
|
update_counter()
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ one_shot = true
|
|||||||
[connection signal="text_changed" from="VBoxContainer/Head/Name" to="." method="name_changed"]
|
[connection signal="text_changed" from="VBoxContainer/Head/Name" to="." method="name_changed"]
|
||||||
[connection signal="pressed" from="VBoxContainer/Head/Minimize" to="." method="_on_Minimize_pressed"]
|
[connection signal="pressed" from="VBoxContainer/Head/Minimize" to="." method="_on_Minimize_pressed"]
|
||||||
[connection signal="child_entered_tree" from="VBoxContainer/ScrollContainer/Items" to="." method="_on_Items_child_entered_tree"]
|
[connection signal="child_entered_tree" from="VBoxContainer/ScrollContainer/Items" to="." method="_on_Items_child_entered_tree"]
|
||||||
[connection signal="child_exited_tree" from="VBoxContainer/ScrollContainer/Items" to="." method="_on_Items_child_exited_tree"]
|
[connection signal="child_exiting_tree" from="VBoxContainer/ScrollContainer/Items" to="." method="_on_Items_child_exited_tree"]
|
||||||
[connection signal="pressed" from="VBoxContainer/Actions/AddItem" to="." method="add_item" binds= [ true ]]
|
[connection signal="pressed" from="VBoxContainer/Actions/AddItem" to="." method="add_item" binds= [ true ]]
|
||||||
[connection signal="pressed" from="VBoxContainer/Actions/DeleteColumn" to="." method="delete_column"]
|
[connection signal="pressed" from="VBoxContainer/Actions/DeleteColumn" to="." method="delete_column"]
|
||||||
[connection signal="timeout" from="Timer" to="." method="request_save"]
|
[connection signal="timeout" from="Timer" to="." method="request_save"]
|
||||||
|
Loading…
Reference in New Issue
Block a user