resize cursor. closes #108
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
class_name RTMICursorManager
|
||||
|
||||
func set_cursor(texture: Texture) -> void:
|
||||
Input.set_custom_mouse_cursor( texture, Input.CURSOR_ARROW, Vector2(32,32))
|
||||
const RESIZE_RATIO: float = 0.7
|
||||
|
||||
func set_cursor(texture: Texture2D) -> void:
|
||||
var image = texture.get_image()
|
||||
image.resize(image.get_width() * RESIZE_RATIO, image.get_height() * RESIZE_RATIO)
|
||||
Input.set_custom_mouse_cursor( image, Input.CURSOR_ARROW, Vector2(32,32))
|
||||
|
||||
func clear_cursor():
|
||||
Input.set_custom_mouse_cursor(null)
|
||||
|
||||
Reference in New Issue
Block a user