Skip to content

Commit 4dc1272

Browse files
committed
Mouse manager: Set custom cursor for cross shape
Use Tiny Swords reticule cursor, with the corresponding hotspot.
1 parent 8e39ee1 commit 4dc1272

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scenes/globals/mouse_manager/mouse_manager.gd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
# SPDX-License-Identifier: MPL-2.0
33
extends Node
44

5+
const MOUSE_CURSOR_CROSS = preload("uid://bx11wyx7unc4q")
6+
57
@onready var hide_timer: Timer = %HideTimer
68

79

10+
func _ready() -> void:
11+
Input.set_custom_mouse_cursor(MOUSE_CURSOR_CROSS, Input.CURSOR_CROSS, Vector2(32, 32))
12+
13+
814
func _input(event: InputEvent) -> void:
915
if event is InputEventMouseMotion:
1016
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE

0 commit comments

Comments
 (0)