Raygui wrapper lib.

This commit is contained in:
jussi
2023-04-14 00:11:58 +03:00
parent 895c7f1a06
commit dc2edd6944
20 changed files with 210 additions and 23 deletions

View File

@@ -2049,7 +2049,8 @@ bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
// Delete text
if (keyCount > 0)
{
if (IsKeyPressed(KEY_BACKSPACE))
// if (IsKeyPressed(KEY_BACKSPACE))
if ( GetKeyPressed() == KEY_BACKSPACE )
{
while ((keyCount > 0) && ((text[--keyCount] & 0xc0) == 0x80));
text[keyCount] = '\0';
@@ -2343,7 +2344,8 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
// Delete characters
if (textLength > 0)
{
if (IsKeyPressed(KEY_BACKSPACE))
// if (IsKeyPressed(KEY_BACKSPACE))
if ( GetKeyPressed() == KEY_BACKSPACE )
{
if ((unsigned char)text[textLength - 1] < 127)
{

View File

@@ -11,6 +11,7 @@ int lguiGuiSetState( lua_State *L );
int lguiGuiGetState( lua_State *L );
/* Font. */
int lguiGuiSetFont( lua_State *L );
int lguiGuiGetFont( lua_State *L );
/* Style */
int lguiGuiSetStyle( lua_State *L );
int lguiGuiGetStyle( lua_State *L );

View File

@@ -14,6 +14,7 @@ typedef struct {
lua_State *luaState;
Vector2 resolution;
int textureSource;
size_t guiFont;
/* Resources. */
/* Images. */
Image **images;