4 Commits
5.0 ... master

Author SHA1 Message Date
Ray
3f81e2bd02 Update README.md 2026-07-22 00:22:20 +02:00
Ray
63465e55c2 Update controls_test_suite.c 2026-07-21 15:18:49 +02:00
Ray
220b6a85ba Update controls_test_suite.c 2026-07-21 15:06:45 +02:00
Ray
3ea06d4c3d Fix issue with GuiColorPicker() 2026-07-21 15:06:42 +02:00
3 changed files with 27 additions and 3 deletions

View File

@ -10,7 +10,7 @@
<br> <br>
**WARNING: Latest `raygui` from master branch is always aligned with latest `raylib` from master branch and all raylibtech tools. Make sure to use the appropriate versions.** **WARNING: Latest `raygui` from master branch is always aligned with latest `raylib` from master branch and all raylibtech tools. Make sure to use the latest versions.**
**WARNING: Latest `raygui 5.0` introduces some API-BREAKING changes, now all functions return a result value.** **WARNING: Latest `raygui 5.0` introduces some API-BREAKING changes, now all functions return a result value.**

View File

@ -58,6 +58,12 @@
#include "../styles/style_sunny.h" // raygui style: sunny #include "../styles/style_sunny.h" // raygui style: sunny
#include "../styles/style_amber.h" // raygui style: amber #include "../styles/style_amber.h" // raygui style: amber
#include "../styles/style_genesis.h" // raygui style: genesis #include "../styles/style_genesis.h" // raygui style: genesis
#include "../styles/style_brick.h" // raygui style: genesis
#include "../styles/style_turbo.h" // raygui style: genesis
#include "../styles/style_wisteria.h" // raygui style: genesis
#include "../styles/style_advance.h" // raygui style: genesis
#include "../styles/style_rltech.h" // raygui style: genesis
#include "../styles/style_pocket.h" // raygui style: genesis
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------
// Program main entry point // Program main entry point
@ -139,6 +145,8 @@ int main()
//GuiSetStyle(DEFAULT, TEXT_PADDING, 0); //GuiSetStyle(DEFAULT, TEXT_PADDING, 0);
//GuiSetStyle(DEFAULT, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER); //GuiSetStyle(DEFAULT, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
int frameCounter = 0;
SetTargetFPS(60); SetTargetFPS(60);
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -174,6 +182,16 @@ int main()
if (progressValue > 1.0f) progressValue = 1.0f; if (progressValue > 1.0f) progressValue = 1.0f;
else if (progressValue < 0.0f) progressValue = 0.0f; else if (progressValue < 0.0f) progressValue = 0.0f;
/*
// Style updater auto
frameCounter++;
if ((frameCounter > 300) && (frameCounter%60) == 0)
{
visualStyleActive++;
if (visualStyleActive >= 20) visualStyleActive = 0;
}
*/
if (visualStyleActive != prevVisualStyleActive) if (visualStyleActive != prevVisualStyleActive)
{ {
GuiLoadStyleDefault(); GuiLoadStyleDefault();
@ -194,6 +212,12 @@ int main()
case 11: GuiLoadStyleSunny(); break; case 11: GuiLoadStyleSunny(); break;
case 12: GuiLoadStyleAmber(); break; case 12: GuiLoadStyleAmber(); break;
case 13: GuiLoadStyleGenesis(); break; case 13: GuiLoadStyleGenesis(); break;
case 14: GuiLoadStyleBrick(); break;
case 15: GuiLoadStylePocket(); break;
case 16: GuiLoadStyleTurbo(); break;
case 17: GuiLoadStyleWisteria(); break;
case 18: GuiLoadStyleAdvance(); break;
case 19: GuiLoadStyleRLTech(); break;
default: break; default: break;
} }
@ -244,7 +268,7 @@ int main()
GuiSetStyle(COMBOBOX, COMBO_BUTTON_WIDTH, 40); GuiSetStyle(COMBOBOX, COMBO_BUTTON_WIDTH, 40);
GuiComboBox((Rectangle){ 25, 480 + 20, 125, 30 }, GuiComboBox((Rectangle){ 25, 480 + 20, 125, 30 },
"default;Jungle;Lavanda;Dark;Bluish;Cyber;Terminal;Candy;Cherry;Ashes;Enefete;Sunny;Amber;Genesis", &visualStyleActive); "default;Jungle;Lavanda;Dark;Bluish;Cyber;Terminal;Candy;Cherry;Ashes;Enefete;Sunny;Amber;Genesis;Brick;Pocket;Turbo;Wisteria;Advance;RLTech", &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
if (dropDown000EditMode || dropDown001EditMode) GuiUnlock(); if (dropDown000EditMode || dropDown001EditMode) GuiUnlock();

View File

@ -4214,7 +4214,7 @@ int GuiColorPicker(Rectangle bounds, const char *text, Color *color)
// NOTE: this conversion can cause low hue-resolution, if the r, g and b value are very similar, which causes the hue bar to shift around when only the GuiColorPanel is used // NOTE: this conversion can cause low hue-resolution, if the r, g and b value are very similar, which causes the hue bar to shift around when only the GuiColorPanel is used
Vector3 hsv = ConvertRGBtoHSV(RAYGUI_CLITERAL(Vector3){ (*color).r/255.0f, (*color).g/255.0f, (*color).b/255.0f }); Vector3 hsv = ConvertRGBtoHSV(RAYGUI_CLITERAL(Vector3){ (*color).r/255.0f, (*color).g/255.0f, (*color).b/255.0f });
if (result != RESULT_CHANGED) result = GuiColorBarHue(boundsHue, NULL, &hsv.x); result = GuiColorBarHue(boundsHue, NULL, &hsv.x);
//color.a = (unsigned char)(GuiColorBarAlpha(boundsAlpha, (float)color.a/255.0f)*255.0f); //color.a = (unsigned char)(GuiColorBarAlpha(boundsAlpha, (float)color.a/255.0f)*255.0f);
Vector3 rgb = ConvertHSVtoRGB(hsv); Vector3 rgb = ConvertHSVtoRGB(hsv);