Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f917532aa | |||
| 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();
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// //
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define ADVANCE_STYLE_PROPS_COUNT 25
|
||||
#define ADVANCE_STYLE_PROPS_COUNT 26
|
||||
|
||||
// Custom style name: Advance
|
||||
static const GuiStyleProp advanceStyleProps[ADVANCE_STYLE_PROPS_COUNT] = {
|
||||
@ -31,6 +31,7 @@ static const GuiStyleProp advanceStyleProps[ADVANCE_STYLE_PROPS_COUNT] = {
|
||||
{ 0, 17, (int)0x00000000 }, // DEFAULT_TEXT_SPACING
|
||||
{ 0, 18, (int)0x9eadd0ff }, // DEFAULT_LINE_COLOR
|
||||
{ 0, 19, (int)0xe6e6e6ff }, // DEFAULT_BACKGROUND_COLOR
|
||||
{ 0, 20, (int)0x00000006 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 1, 5, (int)0x917de2ff }, // LABEL_TEXT_COLOR_FOCUSED
|
||||
{ 1, 8, (int)0xffb033ff }, // LABEL_TEXT_COLOR_PRESSED
|
||||
{ 4, 5, (int)0xb0b0e1ff }, // SLIDER_TEXT_COLOR_FOCUSED
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
// //
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define BRICK_STYLE_PROPS_COUNT 17
|
||||
#define BRICK_STYLE_PROPS_COUNT 18
|
||||
|
||||
// Custom style name: Brick
|
||||
static const GuiStyleProp brickStyleProps[BRICK_STYLE_PROPS_COUNT] = {
|
||||
@ -29,6 +29,7 @@ static const GuiStyleProp brickStyleProps[BRICK_STYLE_PROPS_COUNT] = {
|
||||
{ 0, 11, (int)0x8c9c9eff }, // DEFAULT_TEXT_COLOR_DISABLED
|
||||
{ 0, 18, (int)0x71a8aeff }, // DEFAULT_LINE_COLOR
|
||||
{ 0, 19, (int)0xeff0f3ff }, // DEFAULT_BACKGROUND_COLOR
|
||||
{ 0, 20, (int)0x00000008 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 1, 5, (int)0x568a90ff }, // LABEL_TEXT_COLOR_FOCUSED
|
||||
{ 9, 5, (int)0x5e9095ff }, // TEXTBOX_TEXT_COLOR_FOCUSED
|
||||
{ 10, 5, (int)0x639196ff }, // VALUEBOX_TEXT_COLOR_FOCUSED
|
||||
|
||||
@ -31,7 +31,7 @@ static const GuiStyleProp pocketStyleProps[POCKET_STYLE_PROPS_COUNT] = {
|
||||
{ 0, 17, (int)0x00000000 }, // DEFAULT_TEXT_SPACING
|
||||
{ 0, 18, (int)0x56591eff }, // DEFAULT_LINE_COLOR
|
||||
{ 0, 19, (int)0xd9d9ceff }, // DEFAULT_BACKGROUND_COLOR
|
||||
{ 0, 20, (int)0x00000018 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 0, 20, (int)0x00000008 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
};
|
||||
|
||||
// WARNING: This style uses a custom font: "GMSN.ttf" (size: 16, spacing: 0)
|
||||
|
||||
@ -30,7 +30,7 @@ static const GuiStyleProp turboStyleProps[TURBO_STYLE_PROPS_COUNT] = {
|
||||
{ 0, 16, (int)0x00000010 }, // DEFAULT_TEXT_SIZE
|
||||
{ 0, 18, (int)0xbbaf6cff }, // DEFAULT_LINE_COLOR
|
||||
{ 0, 19, (int)0x60645fff }, // DEFAULT_BACKGROUND_COLOR
|
||||
{ 0, 20, (int)0x00000018 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 0, 20, (int)0x00000008 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 1, 8, (int)0xf0e4c4ff }, // LABEL_TEXT_COLOR_PRESSED
|
||||
{ 1, 11, (int)0x959680ff }, // LABEL_TEXT_COLOR_DISABLED
|
||||
{ 4, 8, (int)0xb4aa8dff }, // SLIDER_TEXT_COLOR_PRESSED
|
||||
|
||||
@ -31,7 +31,7 @@ static const GuiStyleProp wisteriaStyleProps[WISTERIA_STYLE_PROPS_COUNT] = {
|
||||
{ 0, 17, (int)0x00000000 }, // DEFAULT_TEXT_SPACING
|
||||
{ 0, 18, (int)0x9b74d2ff }, // DEFAULT_LINE_COLOR
|
||||
{ 0, 19, (int)0xe9eaf6ff }, // DEFAULT_BACKGROUND_COLOR
|
||||
{ 0, 20, (int)0x00000012 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 0, 20, (int)0x00000008 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 4, 3, (int)0xa9bdcfff }, // SLIDER_BORDER_COLOR_FOCUSED
|
||||
{ 4, 5, (int)0xacc4d8ff }, // SLIDER_TEXT_COLOR_FOCUSED
|
||||
{ 5, 3, (int)0xb5c7d9ff }, // PROGRESSBAR_BORDER_COLOR_FOCUSED
|
||||
|
||||
@ -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);
|
||||
|
||||
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 129 KiB |
@ -11,7 +11,7 @@
|
||||
// //
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define ADVANCE_STYLE_PROPS_COUNT 25
|
||||
#define ADVANCE_STYLE_PROPS_COUNT 26
|
||||
|
||||
// Custom style name: Advance
|
||||
static const GuiStyleProp advanceStyleProps[ADVANCE_STYLE_PROPS_COUNT] = {
|
||||
@ -31,6 +31,7 @@ static const GuiStyleProp advanceStyleProps[ADVANCE_STYLE_PROPS_COUNT] = {
|
||||
{ 0, 17, (int)0x00000000 }, // DEFAULT_TEXT_SPACING
|
||||
{ 0, 18, (int)0x9eadd0ff }, // DEFAULT_LINE_COLOR
|
||||
{ 0, 19, (int)0xe6e6e6ff }, // DEFAULT_BACKGROUND_COLOR
|
||||
{ 0, 20, (int)0x00000006 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 1, 5, (int)0x917de2ff }, // LABEL_TEXT_COLOR_FOCUSED
|
||||
{ 1, 8, (int)0xffb033ff }, // LABEL_TEXT_COLOR_PRESSED
|
||||
{ 4, 5, (int)0xb0b0e1ff }, // SLIDER_TEXT_COLOR_FOCUSED
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
@ -25,6 +25,7 @@ p 00 16 0x0000000c TEXT_SIZE
|
||||
p 00 17 0x00000000 TEXT_SPACING
|
||||
p 00 18 0x9eadd0ff LINE_COLOR
|
||||
p 00 19 0xe6e6e6ff BACKGROUND_COLOR
|
||||
p 00 20 0x00000006 TEXT_LINE_SPACING
|
||||
p 01 05 0x917de2ff LABEL_TEXT_COLOR_FOCUSED
|
||||
p 01 08 0xffb033ff LABEL_TEXT_COLOR_PRESSED
|
||||
p 04 05 0xb0b0e1ff SLIDER_TEXT_COLOR_FOCUSED
|
||||
|
||||
|
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
@ -11,7 +11,7 @@
|
||||
// //
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define BRICK_STYLE_PROPS_COUNT 17
|
||||
#define BRICK_STYLE_PROPS_COUNT 18
|
||||
|
||||
// Custom style name: Brick
|
||||
static const GuiStyleProp brickStyleProps[BRICK_STYLE_PROPS_COUNT] = {
|
||||
@ -29,6 +29,7 @@ static const GuiStyleProp brickStyleProps[BRICK_STYLE_PROPS_COUNT] = {
|
||||
{ 0, 11, (int)0x8c9c9eff }, // DEFAULT_TEXT_COLOR_DISABLED
|
||||
{ 0, 18, (int)0x71a8aeff }, // DEFAULT_LINE_COLOR
|
||||
{ 0, 19, (int)0xeff0f3ff }, // DEFAULT_BACKGROUND_COLOR
|
||||
{ 0, 20, (int)0x00000008 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 1, 5, (int)0x568a90ff }, // LABEL_TEXT_COLOR_FOCUSED
|
||||
{ 9, 5, (int)0x5e9095ff }, // TEXTBOX_TEXT_COLOR_FOCUSED
|
||||
{ 10, 5, (int)0x639196ff }, // VALUEBOX_TEXT_COLOR_FOCUSED
|
||||
|
||||
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
@ -23,6 +23,7 @@ p 00 10 0xc8d7d9ff DEFAULT_BASE_COLOR_DISABLED
|
||||
p 00 11 0x8c9c9eff DEFAULT_TEXT_COLOR_DISABLED
|
||||
p 00 18 0x71a8aeff LINE_COLOR
|
||||
p 00 19 0xeff0f3ff BACKGROUND_COLOR
|
||||
p 00 20 0x00000008 TEXT_LINE_SPACING
|
||||
p 01 05 0x568a90ff LABEL_TEXT_COLOR_FOCUSED
|
||||
p 09 05 0x5e9095ff TEXTBOX_TEXT_COLOR_FOCUSED
|
||||
p 10 05 0x639196ff VALUEBOX_TEXT_COLOR_FOCUSED
|
||||
|
||||
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
@ -31,7 +31,7 @@ static const GuiStyleProp pocketStyleProps[POCKET_STYLE_PROPS_COUNT] = {
|
||||
{ 0, 17, (int)0x00000000 }, // DEFAULT_TEXT_SPACING
|
||||
{ 0, 18, (int)0x56591eff }, // DEFAULT_LINE_COLOR
|
||||
{ 0, 19, (int)0xd9d9ceff }, // DEFAULT_BACKGROUND_COLOR
|
||||
{ 0, 20, (int)0x00000018 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 0, 20, (int)0x00000008 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
};
|
||||
|
||||
// WARNING: This style uses a custom font: "GMSN.ttf" (size: 16, spacing: 0)
|
||||
|
||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
@ -25,4 +25,4 @@ p 00 16 0x00000010 TEXT_SIZE
|
||||
p 00 17 0x00000000 TEXT_SPACING
|
||||
p 00 18 0x56591eff LINE_COLOR
|
||||
p 00 19 0xd9d9ceff BACKGROUND_COLOR
|
||||
p 00 20 0x00000018 TEXT_LINE_SPACING
|
||||
p 00 20 0x00000008 TEXT_LINE_SPACING
|
||||
|
||||
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 125 KiB |
@ -30,7 +30,7 @@ static const GuiStyleProp turboStyleProps[TURBO_STYLE_PROPS_COUNT] = {
|
||||
{ 0, 16, (int)0x00000010 }, // DEFAULT_TEXT_SIZE
|
||||
{ 0, 18, (int)0xbbaf6cff }, // DEFAULT_LINE_COLOR
|
||||
{ 0, 19, (int)0x60645fff }, // DEFAULT_BACKGROUND_COLOR
|
||||
{ 0, 20, (int)0x00000018 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 0, 20, (int)0x00000008 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 1, 8, (int)0xf0e4c4ff }, // LABEL_TEXT_COLOR_PRESSED
|
||||
{ 1, 11, (int)0x959680ff }, // LABEL_TEXT_COLOR_DISABLED
|
||||
{ 4, 8, (int)0xb4aa8dff }, // SLIDER_TEXT_COLOR_PRESSED
|
||||
|
||||
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
@ -24,7 +24,7 @@ p 00 11 0x696a5dff DEFAULT_TEXT_COLOR_DISABLED
|
||||
p 00 16 0x00000010 TEXT_SIZE
|
||||
p 00 18 0xbbaf6cff LINE_COLOR
|
||||
p 00 19 0x60645fff BACKGROUND_COLOR
|
||||
p 00 20 0x00000018 TEXT_LINE_SPACING
|
||||
p 00 20 0x00000008 TEXT_LINE_SPACING
|
||||
p 01 08 0xf0e4c4ff LABEL_TEXT_COLOR_PRESSED
|
||||
p 01 11 0x959680ff LABEL_TEXT_COLOR_DISABLED
|
||||
p 04 08 0xb4aa8dff SLIDER_TEXT_COLOR_PRESSED
|
||||
|
||||
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
@ -31,7 +31,7 @@ static const GuiStyleProp wisteriaStyleProps[WISTERIA_STYLE_PROPS_COUNT] = {
|
||||
{ 0, 17, (int)0x00000000 }, // DEFAULT_TEXT_SPACING
|
||||
{ 0, 18, (int)0x9b74d2ff }, // DEFAULT_LINE_COLOR
|
||||
{ 0, 19, (int)0xe9eaf6ff }, // DEFAULT_BACKGROUND_COLOR
|
||||
{ 0, 20, (int)0x00000012 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 0, 20, (int)0x00000008 }, // DEFAULT_TEXT_LINE_SPACING
|
||||
{ 4, 3, (int)0xa9bdcfff }, // SLIDER_BORDER_COLOR_FOCUSED
|
||||
{ 4, 5, (int)0xacc4d8ff }, // SLIDER_TEXT_COLOR_FOCUSED
|
||||
{ 5, 3, (int)0xb5c7d9ff }, // PROGRESSBAR_BORDER_COLOR_FOCUSED
|
||||
|
||||
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
@ -25,7 +25,7 @@ p 00 16 0x0000000c TEXT_SIZE
|
||||
p 00 17 0x00000000 TEXT_SPACING
|
||||
p 00 18 0x9b74d2ff LINE_COLOR
|
||||
p 00 19 0xe9eaf6ff BACKGROUND_COLOR
|
||||
p 00 20 0x00000012 TEXT_LINE_SPACING
|
||||
p 00 20 0x00000008 TEXT_LINE_SPACING
|
||||
p 04 03 0xa9bdcfff SLIDER_BORDER_COLOR_FOCUSED
|
||||
p 04 05 0xacc4d8ff SLIDER_TEXT_COLOR_FOCUSED
|
||||
p 05 03 0xb5c7d9ff PROGRESSBAR_BORDER_COLOR_FOCUSED
|
||||
|
||||