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

gamewindow api #108

Merged
merged 3 commits into from
Dec 28, 2024
Merged

Conversation

GameParrot
Copy link
Contributor

@GameParrot GameParrot commented Dec 27, 2024

Adds various game window api functions:

  • game_window_get_primary_window: Returns a handle to the primary window
  • game_window_is_mouse_locked: Returns if the mouse is currently locked
  • game_window_get_input_mode: Returns the current input mode
  • game_window_add_keyboard_callback: Adds a keyboard input callback
  • game_window_add_mouse_button_callback: Adds a mouse click callback
  • game_window_add_mouse_position_callback: Adds a mouse position callback
  • game_window_add_mouse_scroll_callback: Adds a mouse scroll callback
  • game_window_add_window_creation_callback: Adds a window creation callback

Copy link
Member

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency it could be helpful if all input methods have callbacks?

Missing gamepad.

Other than renaming this should be ready to go.

src/window_callbacks.h Outdated Show resolved Hide resolved
src/window_callbacks.h Outdated Show resolved Hide resolved
src/window_callbacks.h Outdated Show resolved Hide resolved
src/window_callbacks.h Outdated Show resolved Hide resolved
src/core_patches.h Show resolved Hide resolved
src/core_patches.cpp Outdated Show resolved Hide resolved
src/core_patches.cpp Outdated Show resolved Hide resolved
@ChristopherHX ChristopherHX merged commit bf155f5 into minecraft-linux:master Dec 28, 2024
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants