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 25, 2022
1 parent 14018b1 commit 37eb6f7
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 SetPreeditWindowPosition(int x, int y); // Set a preedit w
RLAPI void GetPreeditWindowPosition(int *x, int *y); // Get a preedit window postion XY
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 @@ -3578,6 +3578,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 37eb6f7

Please sign in to comment.