mirror of
https://github.com/raysan5/raygui.git
synced 2026-07-22 05:21:55 -04:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f81e2bd02 | |||
| 63465e55c2 | |||
| 220b6a85ba | |||
| 3ea06d4c3d |
@ -10,7 +10,7 @@
|
||||
|
||||
<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.**
|
||||
|
||||
|
||||
@ -58,6 +58,12 @@
|
||||
#include "../styles/style_sunny.h" // raygui style: sunny
|
||||
#include "../styles/style_amber.h" // raygui style: amber
|
||||
#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
|
||||
@ -139,6 +145,8 @@ int main()
|
||||
//GuiSetStyle(DEFAULT, TEXT_PADDING, 0);
|
||||
//GuiSetStyle(DEFAULT, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
|
||||
|
||||
int frameCounter = 0;
|
||||
|
||||
SetTargetFPS(60);
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
@ -174,6 +182,16 @@ int main()
|
||||
if (progressValue > 1.0f) progressValue = 1.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)
|
||||
{
|
||||
GuiLoadStyleDefault();
|
||||
@ -194,6 +212,12 @@ int main()
|
||||
case 11: GuiLoadStyleSunny(); break;
|
||||
case 12: GuiLoadStyleAmber(); 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;
|
||||
}
|
||||
|
||||
@ -244,7 +268,7 @@ int main()
|
||||
|
||||
GuiSetStyle(COMBOBOX, COMBO_BUTTON_WIDTH, 40);
|
||||
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
|
||||
if (dropDown000EditMode || dropDown001EditMode) GuiUnlock();
|
||||
|
||||
@ -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
|
||||
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);
|
||||
Vector3 rgb = ConvertHSVtoRGB(hsv);
|
||||
|
||||
Reference in New Issue
Block a user