rename input character functions

This commit is contained in:
ushiostarfish 2019-11-10 09:08:14 +09:00
parent bbc3480ad0
commit ec813758bb
2 changed files with 5 additions and 5 deletions

View File

@ -2216,11 +2216,11 @@ int GetKeyPressed(void)
return lastKeyPressed;
}
bool HasWaitingInputCharacter()
bool IsCharAvailable()
{
return 0 < inputCharacterQueueCount;
}
unsigned int PullNextInputCharacter()
unsigned int GetNextChar()
{
if (inputCharacterQueueCount <= 0)
{
@ -3953,7 +3953,7 @@ static void CharCallback(GLFWwindow *window, unsigned int key)
static const int CAPACITY = sizeof(inputCharacterQueue) / sizeof(inputCharacterQueue[0]);
if (CAPACITY <= inputCharacterQueueCount)
{
PullNextInputCharacter();
GetNextChar();
}
// add to queue

View File

@ -977,8 +977,8 @@ RLAPI bool IsKeyUp(int key); // Detect if a key
RLAPI int GetKeyPressed(void); // Get latest key pressed
RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
RLAPI bool HasWaitingInputCharacter(); // Check if input character exists at least one in the internal input character stream. The characters are produced by the operating system text input system.
RLAPI unsigned int PullNextInputCharacter(); // Pull a input character from the the internal input character stream
RLAPI bool IsCharAvailable(); // Check if input character exists at least one in the internal input character stream. The characters are produced by the operating system text input system.
RLAPI unsigned int GetNextChar(); // Pull a input character from the the internal input character stream
// Input-related functions: gamepads
RLAPI bool IsGamepadAvailable(int gamepad); // Detect if a gamepad is available