28 Commits

Author SHA1 Message Date
Ray
0f5f0f7d00 Update raygui.h 2026-01-20 21:02:08 +01:00
Ray
9a1c183d85 Update raylib.vcxproj 2026-01-11 16:57:48 +01:00
Ray
51e6bcb393 Update raygui.h 2026-01-09 20:07:07 +01:00
Ray
04282d1763 Update year to 2026 2026-01-02 13:40:53 +01:00
Ray
0b94b80c92 Update raygui.h 2025-12-20 22:09:03 +01:00
Ray
867ca4bf8d Update raygui.h 2025-12-11 21:41:33 +01:00
367e169ad3 initializ some variables to prevent warnings (#515) 2025-12-02 23:31:24 +01:00
Ray
1a74db2ab3 Update raygui.h 2025-11-25 12:15:44 +01:00
Ray
715baf250d Update raygui.rc 2025-11-25 12:15:42 +01:00
Ray
3aea427fc8 REVIEWED: Out of bounds warning 2025-11-18 20:59:05 +01:00
Ray
773d1ec52b Update raygui.h 2025-11-18 16:49:44 +01:00
Ray
ff4dbd0712 Update raygui.h 2025-11-13 22:49:22 +01:00
Ray
aed63cedd1 Update raygui.h 2025-11-12 11:09:02 +01:00
Ray
4436a897f9 ADDED: New icons 2025-11-12 09:41:36 +01:00
Ray
d4ebcdc2be Update raygui.h 2025-11-11 19:38:38 +01:00
Ray
860e46d3f8 Reviewed text cursor 2025-11-09 14:06:53 +01:00
Ray
b9971133b2 Comment unused variable 2025-10-21 12:28:05 +02:00
947ef5799d Lock other controls when GuiTextInputBox is open (#512)
Previously, the color picker would end up eating inputs intended for the
GuiTextInputBox!
2025-10-08 14:46:29 +02:00
Ray
681393a423 Update user links to github 2025-09-22 11:54:08 +02:00
Ray
9cdfec460b Update raygui.h 2025-09-18 15:26:53 +02:00
Ray
546b4bacf4 Using calloc() instead of malloc() 2025-09-10 21:03:27 +02:00
Ray
cf3aab1e9f REVIEWED: Code sections description for consistency 2025-09-02 12:35:58 +02:00
9193f38424 Fixed examples (#505) 2025-08-28 22:49:47 +02:00
Ray
6530ee136b Fix #501 2025-08-15 12:21:17 +02:00
Ray
1b2612cf75 Minor format tweaks to align with new raylib conventions 2025-08-08 21:49:33 +02:00
Ray
54ee53e7d7 Update raygui.h 2025-08-04 23:36:27 +02:00
Ray
b4eb06657b Reviewed GuiGetTextWidth() exposed to public API 2025-07-30 16:46:49 +02:00
c4c87f2971 Making GetTextWidth part of the public API (#480)
GetTextWidth is useuful to be called publicly. E.g: when you want to get the final horizontal size of a Slider that has textBefore and textAfter.
2025-07-30 16:40:46 +02:00
11 changed files with 272 additions and 270 deletions

View File

@ -1,6 +1,6 @@
zlib License zlib License
Copyright (c) 2014-2025 Ramon Santamaria (@raysan5) Copyright (c) 2014-2026 Ramon Santamaria (@raysan5)
This software is provided "as-is", without any express or implied warranty. In no event This software is provided "as-is", without any express or implied warranty. In no event
will the authors be held liable for any damages arising from the use of this software. will the authors be held liable for any damages arising from the use of this software.

View File

@ -208,6 +208,7 @@ int main()
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Check all possible events that require GuiLock // Check all possible events that require GuiLock
if (dropDown000EditMode || dropDown001EditMode) GuiLock(); if (dropDown000EditMode || dropDown001EditMode) GuiLock();
if (showTextInputBox) GuiLock();
// First GUI column // First GUI column
//GuiSetStyle(CHECKBOX, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT); //GuiSetStyle(CHECKBOX, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
@ -236,7 +237,9 @@ int main()
GuiComboBox((Rectangle){ 25, 480, 125, 30 }, "default;Jungle;Lavanda;Dark;Bluish;Cyber;Terminal;Candy;Cherry;Ashes;Enefete;Sunny;Amber", &visualStyleActive); GuiComboBox((Rectangle){ 25, 480, 125, 30 }, "default;Jungle;Lavanda;Dark;Bluish;Cyber;Terminal;Candy;Cherry;Ashes;Enefete;Sunny;Amber", &visualStyleActive);
// NOTE: GuiDropdownBox must draw after any other control that can be covered on unfolding // NOTE: GuiDropdownBox must draw after any other control that can be covered on unfolding
GuiUnlock(); if (dropDown000EditMode || dropDown001EditMode) GuiUnlock();
if (showTextInputBox) GuiLock(); // Stay locked
GuiSetStyle(DROPDOWNBOX, TEXT_PADDING, 4); GuiSetStyle(DROPDOWNBOX, TEXT_PADDING, 4);
GuiSetStyle(DROPDOWNBOX, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT); GuiSetStyle(DROPDOWNBOX, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
if (GuiDropdownBox((Rectangle){ 25, 65, 125, 30 }, "#01#ONE;#02#TWO;#03#THREE;#04#FOUR", &dropdownBox001Active, dropDown001EditMode)) dropDown001EditMode = !dropDown001EditMode; if (GuiDropdownBox((Rectangle){ 25, 65, 125, 30 }, "#01#ONE;#02#TWO;#03#THREE;#04#FOUR", &dropdownBox001Active, dropDown001EditMode)) dropDown001EditMode = !dropDown001EditMode;
@ -300,6 +303,8 @@ int main()
if (showTextInputBox) if (showTextInputBox)
{ {
GuiUnlock();
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RAYWHITE, 0.8f)); DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RAYWHITE, 0.8f));
int result = GuiTextInputBox((Rectangle){ (float)GetScreenWidth()/2 - 120, (float)GetScreenHeight()/2 - 60, 240, 140 }, GuiIconText(ICON_FILE_SAVE, "Save file as..."), "Introduce output file name:", "Ok;Cancel", textInput, 255, NULL); int result = GuiTextInputBox((Rectangle){ (float)GetScreenWidth()/2 - 120, (float)GetScreenHeight()/2 - 60, 240, 140 }, GuiIconText(ICON_FILE_SAVE, "Save file as..."), "Introduce output file name:", "Ok;Cancel", textInput, 255, NULL);

View File

@ -97,7 +97,7 @@ int GuiFloatBox(Rectangle bounds, const char* text, float* value, int minValue,
Rectangle textBounds = { 0 }; Rectangle textBounds = { 0 };
if (text != NULL) if (text != NULL)
{ {
textBounds.width = (float)GetTextWidth(text) + 2; textBounds.width = (float)GuiGetTextWidth(text) + 2;
textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
textBounds.x = bounds.x + bounds.width + GuiGetStyle(VALUEBOX, TEXT_PADDING); textBounds.x = bounds.x + bounds.width + GuiGetStyle(VALUEBOX, TEXT_PADDING);
textBounds.y = bounds.y + bounds.height / 2.0f - GuiGetStyle(DEFAULT, TEXT_SIZE) / 2.0f; textBounds.y = bounds.y + bounds.height / 2.0f - GuiGetStyle(DEFAULT, TEXT_SIZE) / 2.0f;
@ -124,7 +124,7 @@ int GuiFloatBox(Rectangle bounds, const char* text, float* value, int minValue,
// Only allow keys in range [48..57] // Only allow keys in range [48..57]
if (keyCount < RAYGUI_VALUEBOX_MAX_CHARS) if (keyCount < RAYGUI_VALUEBOX_MAX_CHARS)
{ {
if (GetTextWidth(textValue) < bounds.width) if (GuiGetTextWidth(textValue) < bounds.width)
{ {
int key = GetCharPressed(); int key = GetCharPressed();
if ((key >= 48) && (key <= 57) && guiFloatingPointIndex) if ((key >= 48) && (key <= 57) && guiFloatingPointIndex)
@ -211,7 +211,7 @@ int GuiFloatBox(Rectangle bounds, const char* text, float* value, int minValue,
if (editMode) if (editMode)
{ {
// NOTE: ValueBox internal text is always centered // NOTE: ValueBox internal text is always centered
Rectangle cursor = { bounds.x + GetTextWidth(textValue) / 2.0f + bounds.width / 2.0f + 1, bounds.y + 2.0f * GuiGetStyle(VALUEBOX, BORDER_WIDTH), 4, bounds.height - 4 * GuiGetStyle(VALUEBOX, BORDER_WIDTH) }; Rectangle cursor = { bounds.x + GuiGetTextWidth(textValue) / 2.0f + bounds.width / 2.0f + 1, bounds.y + 2.0f * GuiGetStyle(VALUEBOX, BORDER_WIDTH), 4, bounds.height - 4 * GuiGetStyle(VALUEBOX, BORDER_WIDTH) };
GuiDrawRectangle(cursor, 0, BLANK, Fade(GetColor(GuiGetStyle(VALUEBOX, BORDER_COLOR_PRESSED)), guiAlpha)); GuiDrawRectangle(cursor, 0, BLANK, Fade(GetColor(GuiGetStyle(VALUEBOX, BORDER_COLOR_PRESSED)), guiAlpha));
} }

View File

@ -182,7 +182,7 @@ float GuiVerticalSliderPro(Rectangle bounds, const char *textTop, const char *te
if (textTop != NULL) if (textTop != NULL)
{ {
Rectangle textBounds = { 0 }; Rectangle textBounds = { 0 };
textBounds.width = (float)GetTextWidth(textTop); textBounds.width = (float)GuiGetTextWidth(textTop);
textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
textBounds.x = bounds.x + bounds.width/2 - textBounds.width/2; textBounds.x = bounds.x + bounds.width/2 - textBounds.width/2;
textBounds.y = bounds.y - textBounds.height - GuiGetStyle(SLIDER, TEXT_PADDING); textBounds.y = bounds.y - textBounds.height - GuiGetStyle(SLIDER, TEXT_PADDING);
@ -193,7 +193,7 @@ float GuiVerticalSliderPro(Rectangle bounds, const char *textTop, const char *te
if (textBottom != NULL) if (textBottom != NULL)
{ {
Rectangle textBounds = { 0 }; Rectangle textBounds = { 0 };
textBounds.width = (float)GetTextWidth(textBottom); textBounds.width = (float)GuiGetTextWidth(textBottom);
textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
textBounds.x = bounds.x + bounds.width/2 - textBounds.width/2; textBounds.x = bounds.x + bounds.width/2 - textBounds.width/2;
textBounds.y = bounds.y + bounds.height + GuiGetStyle(SLIDER, TEXT_PADDING); textBounds.y = bounds.y + bounds.height + GuiGetStyle(SLIDER, TEXT_PADDING);
@ -304,7 +304,7 @@ bool GuiSliderProOwning(Rectangle bounds, const char *textLeft, const char *text
if (textLeft != NULL) if (textLeft != NULL)
{ {
Rectangle textBounds = { 0 }; Rectangle textBounds = { 0 };
textBounds.width = (float)GetTextWidth(textLeft); textBounds.width = (float)GuiGetTextWidth(textLeft);
textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
textBounds.x = bounds.x - textBounds.width - GuiGetStyle(SLIDER, TEXT_PADDING); textBounds.x = bounds.x - textBounds.width - GuiGetStyle(SLIDER, TEXT_PADDING);
textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2; textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
@ -315,7 +315,7 @@ bool GuiSliderProOwning(Rectangle bounds, const char *textLeft, const char *text
if (textRight != NULL) if (textRight != NULL)
{ {
Rectangle textBounds = { 0 }; Rectangle textBounds = { 0 };
textBounds.width = (float)GetTextWidth(textRight); textBounds.width = (float)GuiGetTextWidth(textRight);
textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
textBounds.x = bounds.x + bounds.width + GuiGetStyle(SLIDER, TEXT_PADDING); textBounds.x = bounds.x + bounds.width + GuiGetStyle(SLIDER, TEXT_PADDING);
textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2; textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
@ -435,7 +435,7 @@ bool GuiVerticalSliderProOwning(Rectangle bounds, const char *textTop, const cha
if (textTop != NULL) if (textTop != NULL)
{ {
Rectangle textBounds = { 0 }; Rectangle textBounds = { 0 };
textBounds.width = (float)GetTextWidth(textTop); textBounds.width = (float)GuiGetTextWidth(textTop);
textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
textBounds.x = bounds.x + bounds.width/2 - textBounds.width/2; textBounds.x = bounds.x + bounds.width/2 - textBounds.width/2;
textBounds.y = bounds.y - textBounds.height - GuiGetStyle(SLIDER, TEXT_PADDING); textBounds.y = bounds.y - textBounds.height - GuiGetStyle(SLIDER, TEXT_PADDING);
@ -446,7 +446,7 @@ bool GuiVerticalSliderProOwning(Rectangle bounds, const char *textTop, const cha
if (textBottom != NULL) if (textBottom != NULL)
{ {
Rectangle textBounds = { 0 }; Rectangle textBounds = { 0 };
textBounds.width = (float)GetTextWidth(textBottom); textBounds.width = (float)GuiGetTextWidth(textBottom);
textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE); textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
textBounds.x = bounds.x + bounds.width/2 - textBounds.width/2; textBounds.x = bounds.x + bounds.width/2 - textBounds.width/2;
textBounds.y = bounds.y + bounds.height + GuiGetStyle(SLIDER, TEXT_PADDING); textBounds.y = bounds.y + bounds.height + GuiGetStyle(SLIDER, TEXT_PADDING);

View File

@ -38,10 +38,10 @@ int main(int argc, char *argv[])
bool windowBoxActive = false; bool windowBoxActive = false;
int fileFormatActive = 0; int fileFormatActive = 0;
char *fileFormatTextList[3] = { "IMAGE (.png)", "DATA (.raw)", "CODE (.h)" }; const char *fileFormatTextList[3] = { "IMAGE (.png)", "DATA (.raw)", "CODE (.h)" };
int pixelFormatActive = 0; int pixelFormatActive = 0;
char *pixelFormatTextList[7] = { "GRAYSCALE", "GRAY ALPHA", "R5G6B5", "R8G8B8", "R5G5B5A1", "R4G4B4A4", "R8G8B8A8" }; const char *pixelFormatTextList[7] = { "GRAYSCALE", "GRAY ALPHA", "R5G6B5", "R8G8B8", "R5G5B5A1", "R4G4B4A4", "R8G8B8A8" };
bool textBoxEditMode = false; bool textBoxEditMode = false;
char fileName[64] = "untitled"; char fileName[64] = "untitled";

View File

@ -50,12 +50,12 @@ int main()
bool heightEditMode = false; bool heightEditMode = false;
int pixelFormatActive = 0; int pixelFormatActive = 0;
char *pixelFormatTextList[8] = { "CUSTOM", "GRAYSCALE", "GRAY ALPHA", "R5G6B5", "R8G8B8", "R5G5B5A1", "R4G4B4A4", "R8G8B8A8" }; const char *pixelFormatTextList[8] = { "CUSTOM", "GRAYSCALE", "GRAY ALPHA", "R5G6B5", "R8G8B8", "R5G5B5A1", "R4G4B4A4", "R8G8B8A8" };
int channelsActive = 3; int channelsActive = 3;
char *channelsTextList[4] = { "1", "2", "3", "4" }; const char *channelsTextList[4] = { "1", "2", "3", "4" };
int bitDepthActive = 0; int bitDepthActive = 0;
char *bitDepthTextList[3] = { "8", "16", "32" }; const char *bitDepthTextList[3] = { "8", "16", "32" };
int headerSizeValue = 0; int headerSizeValue = 0;
bool headerSizeEditMode = false; bool headerSizeEditMode = false;

View File

@ -323,7 +323,7 @@ double GuiDMValueBox(Rectangle bounds, double value, double minValue, double max
Rectangle textBounds = {bounds.x + GuiGetStyle(VALUEBOX, BORDER_WIDTH) + textPadding, bounds.y + GuiGetStyle(VALUEBOX, BORDER_WIDTH), Rectangle textBounds = {bounds.x + GuiGetStyle(VALUEBOX, BORDER_WIDTH) + textPadding, bounds.y + GuiGetStyle(VALUEBOX, BORDER_WIDTH),
bounds.width - 2*(GuiGetStyle(VALUEBOX, BORDER_WIDTH) + textPadding), bounds.height - 2*GuiGetStyle(VALUEBOX, BORDER_WIDTH)}; bounds.width - 2*(GuiGetStyle(VALUEBOX, BORDER_WIDTH) + textPadding), bounds.height - 2*GuiGetStyle(VALUEBOX, BORDER_WIDTH)};
int textWidth = GetTextWidth(textValue); int textWidth = GuiGetTextWidth(textValue);
if(textWidth > textBounds.width) textBounds.width = textWidth; if(textWidth > textBounds.width) textBounds.width = textWidth;
if (state == STATE_PRESSED) if (state == STATE_PRESSED)
@ -338,7 +338,7 @@ double GuiDMValueBox(Rectangle bounds, double value, double minValue, double max
if(cursor > 0) { if(cursor > 0) {
char c = textValue[cursor]; char c = textValue[cursor];
textValue[cursor] = '\0'; textValue[cursor] = '\0';
textWidthCursor = GetTextWidth(textValue); textWidthCursor = GuiGetTextWidth(textValue);
textValue[cursor] = c; textValue[cursor] = c;
} }
//DrawRectangle(bounds.x + textWidthCursor + textPadding + 2, bounds.y + 2*GuiGetStyle(VALUEBOX, BORDER_WIDTH), 1, bounds.height - 4*GuiGetStyle(VALUEBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(VALUEBOX, BORDER_COLOR_PRESSED)), guiAlpha)); //DrawRectangle(bounds.x + textWidthCursor + textPadding + 2, bounds.y + 2*GuiGetStyle(VALUEBOX, BORDER_WIDTH), 1, bounds.height - 4*GuiGetStyle(VALUEBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(VALUEBOX, BORDER_COLOR_PRESSED)), guiAlpha));
@ -608,7 +608,7 @@ void GuiDMPropertyList(Rectangle bounds, GuiDMProperty* props, int count, int* f
// draw X, Y, Z, W values (only when expanded) // draw X, Y, Z, W values (only when expanded)
if(!PROP_CHECK_FLAG(&props[p], GUI_PFLAG_COLLAPSED)) { if(!PROP_CHECK_FLAG(&props[p], GUI_PFLAG_COLLAPSED)) {
Rectangle slotBounds = { propBounds.x, propBounds.y+GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)+1, propBounds.width, GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)-2}; Rectangle slotBounds = { propBounds.x, propBounds.y+GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)+1, propBounds.width, GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)-2};
Rectangle lblBounds = { propBounds.x+PROPERTY_PADDING, slotBounds.y, GetTextWidth("A"), slotBounds.height}; Rectangle lblBounds = { propBounds.x+PROPERTY_PADDING, slotBounds.y, GuiGetTextWidth("A"), slotBounds.height};
Rectangle valBounds = { lblBounds.x+lblBounds.width+PROPERTY_PADDING, slotBounds.y, propBounds.width-lblBounds.width-2*PROPERTY_PADDING, slotBounds.height}; Rectangle valBounds = { lblBounds.x+lblBounds.width+PROPERTY_PADDING, slotBounds.y, propBounds.width-lblBounds.width-2*PROPERTY_PADDING, slotBounds.height};
GuiDrawText("X", lblBounds, TEXT_ALIGN_LEFT, textColor); GuiDrawText("X", lblBounds, TEXT_ALIGN_LEFT, textColor);
props[p].value.v2.x = GuiDMSpinner(valBounds, props[p].value.v2.x, 0.0, 0.0, 1.0, PROPERTY_DECIMAL_DIGITS, (propState == STATE_FOCUSED) && CheckCollisionPointRec(mousePos, slotBounds) ); props[p].value.v2.x = GuiDMSpinner(valBounds, props[p].value.v2.x, 0.0, 0.0, 1.0, PROPERTY_DECIMAL_DIGITS, (propState == STATE_FOCUSED) && CheckCollisionPointRec(mousePos, slotBounds) );
@ -647,7 +647,7 @@ void GuiDMPropertyList(Rectangle bounds, GuiDMProperty* props, int count, int* f
// draw X, Y, Width, Height values (only when expanded) // draw X, Y, Width, Height values (only when expanded)
if(!PROP_CHECK_FLAG(&props[p], GUI_PFLAG_COLLAPSED)) { if(!PROP_CHECK_FLAG(&props[p], GUI_PFLAG_COLLAPSED)) {
Rectangle slotBounds = { propBounds.x, propBounds.y+GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)+1, propBounds.width, GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)-2}; Rectangle slotBounds = { propBounds.x, propBounds.y+GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)+1, propBounds.width, GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)-2};
Rectangle lblBounds = { propBounds.x+PROPERTY_PADDING, slotBounds.y, GetTextWidth("Height"), slotBounds.height}; Rectangle lblBounds = { propBounds.x+PROPERTY_PADDING, slotBounds.y, GuiGetTextWidth("Height"), slotBounds.height};
Rectangle valBounds = { lblBounds.x+lblBounds.width+PROPERTY_PADDING, slotBounds.y, propBounds.width-lblBounds.width-2*PROPERTY_PADDING, slotBounds.height}; Rectangle valBounds = { lblBounds.x+lblBounds.width+PROPERTY_PADDING, slotBounds.y, propBounds.width-lblBounds.width-2*PROPERTY_PADDING, slotBounds.height};
GuiDrawText("X", lblBounds, TEXT_ALIGN_LEFT, textColor); GuiDrawText("X", lblBounds, TEXT_ALIGN_LEFT, textColor);
props[p].value.vrect.x = GuiDMSpinner(valBounds, props[p].value.vrect.x, 0.0, 0.0, 1.0, 0, (propState == STATE_FOCUSED) && CheckCollisionPointRec(mousePos, slotBounds) ); props[p].value.vrect.x = GuiDMSpinner(valBounds, props[p].value.vrect.x, 0.0, 0.0, 1.0, 0, (propState == STATE_FOCUSED) && CheckCollisionPointRec(mousePos, slotBounds) );
@ -685,8 +685,8 @@ void GuiDMPropertyList(Rectangle bounds, GuiDMProperty* props, int count, int* f
// draw R, G, B, A values (only when expanded) // draw R, G, B, A values (only when expanded)
if(!PROP_CHECK_FLAG(&props[p], GUI_PFLAG_COLLAPSED)) { if(!PROP_CHECK_FLAG(&props[p], GUI_PFLAG_COLLAPSED)) {
Rectangle slotBounds = { propBounds.x, propBounds.y+GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)+1, propBounds.width, GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)-2}; Rectangle slotBounds = { propBounds.x, propBounds.y+GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)+1, propBounds.width, GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)-2};
Rectangle lblBounds = { propBounds.x+PROPERTY_PADDING, slotBounds.y, GetTextWidth("A"), slotBounds.height}; Rectangle lblBounds = { propBounds.x+PROPERTY_PADDING, slotBounds.y, GuiGetTextWidth("A"), slotBounds.height};
Rectangle valBounds = { lblBounds.x+lblBounds.width+PROPERTY_PADDING, slotBounds.y, GetTextWidth("000000"), slotBounds.height}; Rectangle valBounds = { lblBounds.x+lblBounds.width+PROPERTY_PADDING, slotBounds.y, GuiGetTextWidth("000000"), slotBounds.height};
Rectangle sbarBounds = { valBounds.x + valBounds.width + PROPERTY_PADDING, slotBounds.y, slotBounds.width - 3*PROPERTY_PADDING - lblBounds.width - valBounds.width, slotBounds.height }; Rectangle sbarBounds = { valBounds.x + valBounds.width + PROPERTY_PADDING, slotBounds.y, slotBounds.width - 3*PROPERTY_PADDING - lblBounds.width - valBounds.width, slotBounds.height };
if(sbarBounds.width <= GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)-2) valBounds.width = propBounds.width-lblBounds.width-2*PROPERTY_PADDING; // hide slider when no space if(sbarBounds.width <= GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT)-2) valBounds.width = propBounds.width-lblBounds.width-2*PROPERTY_PADDING; // hide slider when no space

View File

@ -6,10 +6,10 @@ PRODUCTVERSION 4,0,0,0
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
//BLOCK "080904E4" // English UK //BLOCK "080904E4" // English UK
BLOCK "040904E4" // English US BLOCK "040904E4" // English US
BEGIN BEGIN
//VALUE "CompanyName", "raylib technologies" //VALUE "CompanyName", "raylib technologies"
VALUE "FileDescription", "raygui application (www.raylib.com)" VALUE "FileDescription", "raygui application (www.raylib.com)"
VALUE "FileVersion", "4.0.0" VALUE "FileVersion", "4.0.0"
VALUE "InternalName", "raygui app" VALUE "InternalName", "raygui app"
@ -21,7 +21,7 @@ BEGIN
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
BEGIN BEGIN
//VALUE "Translation", 0x809, 1252 // English UK //VALUE "Translation", 0x809, 1252 // English UK
VALUE "Translation", 0x409, 1252 // English US VALUE "Translation", 0x409, 1252 // English US
END END
END END

View File

@ -311,7 +311,6 @@
<ClCompile Include="$(ProjectDir)..\..\..\..\raylib\src\rshapes.c" /> <ClCompile Include="$(ProjectDir)..\..\..\..\raylib\src\rshapes.c" />
<ClCompile Include="$(ProjectDir)..\..\..\..\raylib\src\rtext.c" /> <ClCompile Include="$(ProjectDir)..\..\..\..\raylib\src\rtext.c" />
<ClCompile Include="$(ProjectDir)..\..\..\..\raylib\src\rtextures.c" /> <ClCompile Include="$(ProjectDir)..\..\..\..\raylib\src\rtextures.c" />
<ClCompile Include="$(ProjectDir)..\..\..\..\raylib\src\utils.c" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="$(ProjectDir)..\..\..\..\raylib\src\external\cgltf.h" /> <ClInclude Include="$(ProjectDir)..\..\..\..\raylib\src\external\cgltf.h" />
@ -331,7 +330,6 @@
<ClInclude Include="$(ProjectDir)..\..\..\..\raylib\src\raylib.h" /> <ClInclude Include="$(ProjectDir)..\..\..\..\raylib\src\raylib.h" />
<ClInclude Include="$(ProjectDir)..\..\..\..\raylib\src\raymath.h" /> <ClInclude Include="$(ProjectDir)..\..\..\..\raylib\src\raymath.h" />
<ClInclude Include="$(ProjectDir)..\..\..\..\raylib\src\rlgl.h" /> <ClInclude Include="$(ProjectDir)..\..\..\..\raylib\src\rlgl.h" />
<ClInclude Include="$(ProjectDir)..\..\..\..\raylib\src\utils.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="..\..\..\..\raylib\src\raylib.dll.rc" /> <ResourceCompile Include="..\..\..\..\raylib\src\raylib.dll.rc" />

File diff suppressed because it is too large Load Diff

View File

@ -19,4 +19,4 @@ Several options are provided to add the style to a `raygui` application, choose
## about font ## about font
raylib font by Ramon Santamaria ([@raysan5](https://twitter.com/raysan5)). raylib font by Ramon Santamaria ([@raysan5](https://github.com/raysan5)).