1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-20 12:33:14 +00:00

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

@ -806,6 +806,7 @@ margin_right = 704.0
margin_bottom = 16.0
rect_min_size = Vector2( 0, 16 )
focus_mode = 0
mouse_default_cursor_shape = 15
custom_styles/hover = ExtResource( 12 )
custom_styles/pressed = ExtResource( 12 )
custom_styles/focus = ExtResource( 12 )
@ -826,6 +827,7 @@ margin_right = 16.0
margin_bottom = 462.0
rect_min_size = Vector2( 16, 0 )
focus_mode = 0
mouse_default_cursor_shape = 14
size_flags_horizontal = 0
size_flags_vertical = 3
custom_styles/hover = ExtResource( 12 )

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: