Changed default cursor shape for the rulers, to indicate that they are interactive

This commit is contained in:
OverloadedOrama 2019-12-16 16:00:02 +02:00
parent 8bfd7db4d9
commit 9f1779893d
2 changed files with 7 additions and 0 deletions

View file

@ -12,6 +12,11 @@ var last : Vector2
# warning-ignore:unused_argument
func _process(delta : float) -> void:
update()
var mouse_pos := get_local_mouse_position()
if mouse_pos.x < RULER_WIDTH: #For double guides
mouse_default_cursor_shape = Control.CURSOR_BDIAGSIZE
else:
mouse_default_cursor_shape = Control.CURSOR_HSPLIT
#Code taken and modified from Godot's source code
func _draw() -> void: