We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
extends Node @export var speaker : AudioStreamPlayer2D @export var cursor_point : CompressedTexture2D @export var cursor_hover : CompressedTexture2D @export var cursor_invalid : CompressedTexture2D var cursor_visible = false var controller_active = false func _ready(): SetCursor(false, false) func SetCursor(isVisible : bool, playSound : bool): if (playSound): speaker.play() if (isVisible): if (!controller_active): Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) else: Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) cursor_visible = true if (!isVisible): Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) cursor_visible = false func SetCursorImage(alias : String): match(alias): "point": Input.set_custom_mouse_cursor(cursor_point, 0, Vector2(12, 0)) "hover": Input.set_custom_mouse_cursor(cursor_hover, 0, Vector2(9, 0)) "invalid": Input.set_custom_mouse_cursor(cursor_invalid, 0, Vector2(12, 0)) pass
extends Node @export var speaker : AudioStreamPlayer2D @export var cursor_point : CompressedTexture2D @export var cursor_hover : CompressedTexture2D @export var cursor_invalid : CompressedTexture2D var cursor_visible = false var controller_active = false func vanilla_3757864496__ready(): SetCursor(false, false) + + func vanilla_3757864496_SetCursor(isVisible : bool, playSound : bool): + if (playSound): + speaker.play() + if (isVisible): + if (controller_active): Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) + else: Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) + cursor_visible = true + if (!isVisible): + Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) + cursor_visible = false + + func vanilla_3757864496_SetCursorImage(alias : String): + match(alias): + "point": Input.set_custom_mouse_cursor(cursor_point, 0, Vector2(12, 0)) + "hover": Input.set_custom_mouse_cursor(cursor_hover, 0, Vector2(9, 0)) + "invalid": Input.set_custom_mouse_cursor(cursor_invalid, 0, Vector2(12, 0)) + pass # ModLoader Hooks - The following code has been automatically added by the Godot Mod Loader. func _ready(): _ModLoaderHooks.call_hooks(vanilla_3757864496__ready, [], 2580177828) - func SetCursor(): - _ModLoaderHooks.call_hooks(vanilla_3757864496_SetCursor, [, ], 3168855034) + func SetCursor(isVisible : bool, playSound : bool): + _ModLoaderHooks.call_hooks(vanilla_3757864496_SetCursor, [isVisible, playSound], 3168855034) - func SetCursorImage(): - _ModLoaderHooks.call_hooks(vanilla_3757864496_SetCursorImage, [], 2557926557) + func SetCursorImage(alias: String): + _ModLoaderHooks.call_hooks(vanilla_3757864496_SetCursorImage, [alias], 2557926557)
This causes compiler errors because [, ] is invalid, which means the script cannot be loaded.
[, ]
The text was updated successfully, but these errors were encountered:
KANAjetzt
No branches or pull requests
Original file
Diffed output (what is generated vs what it should have been)
This causes compiler errors because
[, ]
is invalid, which means the script cannot be loaded.The text was updated successfully, but these errors were encountered: