mirror of
https://github.com/raysan5/raygui.git
synced 2026-08-25 05:38:27 -04:00
Compare commits
2 Commits
4f917532aa
...
9fed992452
| Author | SHA1 | Date | |
|---|---|---|---|
| 9fed992452 | |||
| 70f440b2d1 |
10
src/raygui.h
10
src/raygui.h
@ -4449,11 +4449,11 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, ch
|
|||||||
Rectangle textBounds = { 0 };
|
Rectangle textBounds = { 0 };
|
||||||
if (message != NULL)
|
if (message != NULL)
|
||||||
{
|
{
|
||||||
int textSize = GuiGetTextWidth(message) + 2;
|
int messageTextSize = GuiGetTextWidth(message) + 2;
|
||||||
|
|
||||||
textBounds.x = bounds.x + bounds.width/2 - textSize/2;
|
textBounds.x = bounds.x + bounds.width/2 - messageTextSize/2;
|
||||||
textBounds.y = bounds.y + RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT + messageInputHeight/4 - (float)GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
|
textBounds.y = bounds.y + RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT + messageInputHeight/4 - (float)GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
|
||||||
textBounds.width = (float)textSize;
|
textBounds.width = (float)messageTextSize;
|
||||||
textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
|
textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4641,8 +4641,8 @@ void GuiLoadStyle(const char *fileName)
|
|||||||
{
|
{
|
||||||
case 'v':
|
case 'v':
|
||||||
{
|
{
|
||||||
sscanf(buffer, "v %d", &version);
|
sscanf(buffer, "v %u", &version);
|
||||||
}
|
} break;
|
||||||
case 'p':
|
case 'p':
|
||||||
{
|
{
|
||||||
// Style property: p <control_id> <property_id> <property_value> <property_name>
|
// Style property: p <control_id> <property_id> <property_value> <property_name>
|
||||||
|
|||||||
Reference in New Issue
Block a user