Set the main viewport's cursor to be cross, and set it as a custom cursor image

Instead of setting the main arrow as a custom cursor every time the cursor gets inside the viewport, set the viewport's default cursor to be the cross, and change the cross's image once in Global.gd
This commit is contained in:
OverloadedOrama 2020-06-13 18:09:46 +03:00
parent 2e587e3634
commit c6b977d48e
5 changed files with 5 additions and 7 deletions

View file

@ -241,6 +241,7 @@ func _ready() -> void:
# XDGDataDirs depends on it nyaa
directory_module = XDGDataPaths.new()
image_clipboard = Image.new()
Input.set_custom_mouse_cursor(Global.cursor_image, Input.CURSOR_CROSS, Vector2(15, 15))
var root = get_tree().get_root()
control = find_node_by_name(root, "Control")