Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse cursor is resetting "Input.set_default_cursor_shape" #21958

Closed
AlexHolly opened this issue Sep 11, 2018 · 3 comments
Closed

Mouse cursor is resetting "Input.set_default_cursor_shape" #21958

AlexHolly opened this issue Sep 11, 2018 · 3 comments

Comments

@AlexHolly
Copy link
Contributor

c320d93
x11

"reset is never printed"
Looks like the cursor is resetted internally somewhere.

Step:

  1. Make the control FullRect
  2. Add this script
extends Control

func _ready():
	pass 

func _process(delta):
	if get_rect().has_point(get_global_mouse_position()):
		Input.set_default_cursor_shape(Input.CURSOR_HSIZE)
	else:
		print("reset")
		Input.set_default_cursor_shape(Input.CURSOR_ARROW)
	

peek 2018-09-11 02-49

@akien-mga
Copy link
Member

CC @guilhermefelipecgs

@capnm
Copy link
Contributor

capnm commented Sep 11, 2018

I don't think that's a bug. The cursor movement here over the control resets the shape to the arrow.
You should not change the shape as it's managed by the controls.

var i = 0.0
func _process(delta):
	i+=delta
	if int(i*10)%10 == 0:
		Input.set_default_cursor_shape(Input.CURSOR_HSIZE)

@guilhermefelipecgs
Copy link
Contributor

I think this is a bug yes, set_default_cursor_shape should works with control, probably a bug introduced recently, I'll check that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants