Skip to content

Commit

Permalink
Add API: ResetPreedit
Browse files Browse the repository at this point in the history
This is for GLFW3: glfwResetPreeditText
  • Loading branch information
daipom committed Nov 30, 2022
1 parent 90175cb commit 574f985
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/raylib.h
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,7 @@ RLAPI void SetPreeditCursorRectangle(int x, int y, int w, int h); // Set the pre
RLAPI void GetPreeditCursorRectangle(int *x, int *y, int *w, int *h); // Get the preedit cursor area
RLAPI bool IsImeOn(void); // Check if IME is ON
RLAPI void SetImeStatus(bool on); // Set IME status
RLAPI void ResetPreedit(void); // Reset preedit text

// Input-related functions: gamepads
RLAPI bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available
Expand Down
6 changes: 6 additions & 0 deletions src/rcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -3581,6 +3581,12 @@ void SetImeStatus(bool on)
else glfwSetInputMode(CORE.Window.handle, GLFW_IME, GLFW_FALSE);
}

// Reset preedit text
void ResetPreedit(void)
{
glfwResetPreeditText(CORE.Window.handle);
}

// Set a custom key to exit program
// NOTE: default exitKey is ESCAPE
void SetExitKey(int key)
Expand Down

0 comments on commit 574f985

Please sign in to comment.