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

Improve cursor_set_custom_image() method #88970

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Feb 28, 2024

cursor_set_custom_image() has image in name, mentions image in the description, but the resource it expects is actually Texture2D. Moreover, the Texture2D is converted to Image inside the method and every DisplayServer implementation has pretty much the same code to do so...

This PR

  • adds a common method to convert a Resource to cursor Image
  • the method now takes either Texture2D or Image
  • DisplayServers will use the new method instead of repeating the code
  • clarified documentation

@Mickeon
Copy link
Contributor

Mickeon commented Feb 28, 2024

I am to assume this will require some GDExtension binding compatibility code of sorts.

@AThousandShips
Copy link
Member

Compatibility for what? It doesn't change any bindings

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Feb 28, 2024
@akien-mga akien-mga merged commit 6d9a529 into godotengine:master Feb 29, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

5 participants