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