From cb4a28f94d7427fc7521c45dd60cda17efebd36f Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Wed, 20 Jul 2022 18:51:51 +0800 Subject: [PATCH] - enhancement: add a demo template for raylib/rdrawing predefined colors --- NEWS.md | 1 + linux/templates/rdrawing_colors.ico | Bin 0 -> 67646 bytes linux/templates/rdrawing_colors.template | 21 ++ linux/templates/rdrawing_colors_c.txt | 351 +++++++++++++++++++++ windows/templates/rdrawing_colors.ico | Bin 0 -> 67646 bytes windows/templates/rdrawing_colors.template | 21 ++ windows/templates/rdrawing_colors_c.txt | 351 +++++++++++++++++++++ 7 files changed, 745 insertions(+) create mode 100644 linux/templates/rdrawing_colors.ico create mode 100644 linux/templates/rdrawing_colors.template create mode 100644 linux/templates/rdrawing_colors_c.txt create mode 100644 windows/templates/rdrawing_colors.ico create mode 100644 windows/templates/rdrawing_colors.template create mode 100644 windows/templates/rdrawing_colors_c.txt diff --git a/NEWS.md b/NEWS.md index 5a1dec2c..a00c9b35 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ Red Panda C++ Version 1.1.5 - enhancement: double clicking a non-text file in the files view, will open it with external program - enhancement: double clicking a non-text file in the project's view, will open it with external program - fix: correctly update the start postion of selection after code completion + - enhancement: add a demo template for raylib/rdrawing predefined colors Red Panda C++ Version 1.1.4 diff --git a/linux/templates/rdrawing_colors.ico b/linux/templates/rdrawing_colors.ico new file mode 100644 index 0000000000000000000000000000000000000000..000c4907d0a29b7c8a3648d3e1fd93ed61dc4e49 GIT binary patch literal 67646 zcmeI51)NpY_Qyf&c=`;mQL*0t`F{o$B`|aEou0WhGjz9rG}4^{N=OPw2#SO>(p{5u zNk|CT@xoXC_5ZGY?}cHQ8v~cp!Ozb#C+<1>tl!#euf5hf=M*YbnE$$WFU0>JEA;Hm zg$oreRH)FifK9s5Y}Y>vv9I7?fdmR9P#}Q<2^2`6Kmr94D3Cyb1PUZjAb|o26iA>z z0tFH%kU)V1u4M@%6)%2WmeX<*_(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reouZHNCzR;*$0z9x@Gv=;$R+$4(Rx>D#>le@MUnkG@*)t{;e@y z-M5x}pB}5fQSS8|!LAc@|Jk}7tu0;)_tcwPn!$f$h9lxJ<^D>%zre@Gm0Cs=En0ZY zOD`2cCeHyK55|G*K;s|k7yJ|W<_H&U4}$U(;y4q+d9RGEo^%l+;u7CdM%zCd+YNHD#Cwf`WsMt5H|mSa|Pls zKl^-qYunVf)Az9b0KTC8vq7hf8Wd z9_#@6tn;rRY;gn5l^?G2I#zjC{nTg7(rGWxp<9N7cKn^neU!>{MLw+0Xk3Xp{maE) zxUWO5^ADf|?=y@;uARViKDfUT+y(z7sDCJx=C;^3R*GoAH;%jVp2N|| zd@j&;(tiQ;eGD2;)V`Qk9}UMgjZ^&s?Hs1?ptT4|> z<2&fH>gIWMxxk>)6^`zyplEFTgWCgQYHb8}tVwz=vQaT+apba^N%mrryHDpeC>! z2Ka`Ctu?5{yM1HQ60Of|O|;$zuK9fIWu)Y?UJCB72Rh~!LkD=*i{*Jx3RDD9AOSex zIyo2ItUKX63B&;#C=d6qfxl48S^^zV?r#N`{W;sqD#U_|6-b~!0tFH%kU)V13M5b< zfdUB>NT5Ih1rjKbK!F4bBv2rM0tx)4Bp_GizaI+~DxR}pN6uaURVm1EK<;%9LuXF# zf1dSjz70n_>v!f_zsa}W-Lt>2pLKIJJ*2$nfHUjGJ?lq2KQC0sd&1o7-F^GL7s$2l zZLJ>EO;4D6{mkXOBFMddM1Se|XYTNbZ_V4FVC&t_9&Z|$YduGE3KcrHd8WbV?B@n@ zujgp4xq*va&v85Ee4h2y*)>jwepKqNdDtLAsL7Ee?y}NEN?!7PH zdCKQn_uaQ|KkK5u^RBb-oG3r*tIz(vi2nY_*>#$AMb~q;$J}3z_U89~jpB2AK6&Z7 z(Ic +#include +#include + +#define RAYGUI_IMPLEMENTATION +#include + +//color classification from https://www.dofactory.com/css/color-names + +enum ColorPage{ + Red, + Pink, + Orange, + Yellow, + Green, + Blue, + Brown, + Purple, + Light, + Gray +} ; + +void drawRedColors(Image *pImg,Font font); +void drawPinkColors(Image *pImg,Font font); +void drawOrangeColors(Image *pImg,Font font); +void drawYellowColors(Image *pImg,Font font); +void drawGreenColors(Image *pImg,Font font); +void drawBlueColors(Image *pImg,Font font); +void drawBrownColors(Image *pImg,Font font); +void drawPurpleColors(Image *pImg,Font font); +void drawLightColors(Image *pImg,Font font); +void drawGrayColors(Image *pImg,Font font); + +int ddd; +int main() { + int currentPage=Red; + InitWindow(1000,900,"Colors"); + SetTraceLogLevel(LOG_WARNING); + SetTargetFPS(60); + bool fontChanged=false; + Font font; + if (FileExists("C:\\windows\\fonts\\cour.ttf")) { + font=LoadFont("C:\\windows\\fonts\\cour.ttf"); + fontChanged=true; + } else { + font=GetFontDefault(); + } + GuiSetStyle(DEFAULT,TEXT_SIZE,20); + GuiSetStyle(LISTVIEW,SCROLLBAR_WIDTH,20); + + Image img=GenImageColor(830,890,WHITE); + Rectangle panelRec = {165,5,830,890}; + Rectangle panelContentRec = {0,0,800,1190}; + Vector2 panelScroll = {1,1}; + while(!WindowShouldClose()) { + Texture texture; + BeginDrawing(); + if (GuiToggle((Rectangle){ 10, 10, 140, 30 },"Red",currentPage==Red)) { + currentPage=Red; + } + if (GuiToggle((Rectangle){ 10, 50, 140, 30 },"Pink",currentPage==Pink)) { + currentPage=Pink; + } + if (GuiToggle((Rectangle){ 10, 90, 140, 30 },"Orange",currentPage==Orange)) { + currentPage=Orange; + } + if (GuiToggle((Rectangle){ 10, 130, 140, 30 },"Yellow",currentPage==Yellow)) { + currentPage=Yellow; + } + if (GuiToggle((Rectangle){ 10, 170, 140, 30 },"Green",currentPage==Green)) { + panelContentRec = (Rectangle){0,0, + 830- 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH), + 1170}; + if (currentPage!=Green) { + panelScroll=(Vector2){1,1}; + } + currentPage=Green; + } + if (GuiToggle((Rectangle){ 10, 210, 140, 30 },"Blue",currentPage==Blue)) { + panelContentRec = (Rectangle){0,0, + 830- 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH), + 1220}; + if (currentPage!=Blue) { + panelScroll=(Vector2){1,1}; + } + currentPage=Blue; + } + if (GuiToggle((Rectangle){ 10, 250, 140, 30 },"Brown",currentPage==Brown)) { + currentPage=Brown; + } + if (GuiToggle((Rectangle){ 10, 290, 140, 30 },"Purple",currentPage==Purple)) { + currentPage=Purple; + } + if (GuiToggle((Rectangle){ 10, 330, 140, 30 },"Light",currentPage==Light)) { + currentPage=Light; + } + if (GuiToggle((Rectangle){ 10, 370, 140, 30 },"Gray",currentPage==Gray)) { + currentPage=Gray; + } + ImageClearBackground(&img,WHITE); + switch(currentPage) { + case Red: + drawRedColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Pink: + drawPinkColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Orange: + drawOrangeColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Yellow: + drawYellowColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Green: { + Rectangle view = GuiScrollPanel(panelRec,NULL,panelContentRec,&panelScroll); + Image tmpImage = GenImageColor(830,1170,WHITE); + Image tmpImage2 = GenImageColor(view.width,view.height,WHITE); + drawGreenColors(&tmpImage,font); + ImageDraw(&tmpImage2,tmpImage, + (Rectangle){view.x-panelRec.x-panelScroll.x,view.y-panelRec.y-panelScroll.y,view.width,view.height}, + (Rectangle){0,0,view.width,view.height},WHITE); + texture = LoadTextureFromImage(tmpImage2); + UnloadImage(tmpImage2); + UnloadImage(tmpImage); + } + break; + case Blue: { + Rectangle view = GuiScrollPanel(panelRec,NULL,panelContentRec,&panelScroll); + Image tmpImage = GenImageColor(830,1220,WHITE); + Image tmpImage2 = GenImageColor(view.width,view.height,WHITE); + drawBlueColors(&tmpImage,font); + ImageDraw(&tmpImage2,tmpImage, + (Rectangle){view.x-panelRec.x-panelScroll.x,view.y-panelRec.y-panelScroll.y,view.width,view.height}, + (Rectangle){0,0,view.width,view.height},WHITE); + texture = LoadTextureFromImage(tmpImage2); + UnloadImage(tmpImage2); + UnloadImage(tmpImage); + } + break; + case Brown: + drawBrownColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Purple: + drawPurpleColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Light: + drawLightColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Gray: + drawGrayColors(&img,font); + texture = LoadTextureFromImage(img); + break; + } + ClearBackground(LIGHTGRAY); + DrawTexture(texture,165,5,WHITE); + EndDrawing(); + UnloadTexture(texture); + } + + if (fontChanged) { + UnloadFont(font); + } + //Clean up + UnloadImage(img); + CloseWindow(); +} + +void drawColor(Image* pImg, Font font, int x, int y, Color color, const char* colorName) { + char buffer[255]; + ImageFillRectangleEx(pImg,x,y,200,40,color); + ImageDrawRectangleEx(pImg,x,y,200,40,2,BLACK); + ImageDrawTextEx(pImg,font,colorName,(Vector2){x+230,y+10},20,0,BLACK); + sprintf(buffer,"0x%02X%02X%02X",color.r,color.g,color.b); + ImageDrawTextEx(pImg,font,buffer,(Vector2){x+600,y+10},20,0,BLACK); +} + +void drawRedColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,LIGHTSALMON,"LIGHTSALMON"); + drawColor(pImg,font,50,70,DARKSALMON,"DARKSALMON"); + drawColor(pImg,font,50,120,SALMON,"SALMON"); + drawColor(pImg,font,50,170,LIGHTCORAL,"LIGHTCORAL"); + drawColor(pImg,font,50,220,INDIANRED,"INDIANRED"); + drawColor(pImg,font,50,270,RED,"RED"); + drawColor(pImg,font,50,320,CRIMSON,"CRIMSON"); + drawColor(pImg,font,50,370,MAROON,"MAROON"); + drawColor(pImg,font,50,420,FIREBRICK,"FIREBRICK"); + drawColor(pImg,font,50,470,DARKRED,"DARKRED"); +} + +void drawPinkColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,PINK,"PINK"); + drawColor(pImg,font,50,70,LIGHTPINK,"LIGHTPINK"); + drawColor(pImg,font,50,120,HOTPINK,"HOTPINK"); + drawColor(pImg,font,50,170,DEEPPINK,"DEEPPINK"); + drawColor(pImg,font,50,220,PALEVIOLETRED,"PALEVIOLETRED"); + drawColor(pImg,font,50,270,MEDIUMVIOLETRED,"MEDIUMVIOLETRED"); +} + +void drawOrangeColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,GOLD,"GOLD"); + drawColor(pImg,font,50,70,ORANGE,"ORANGE"); + drawColor(pImg,font,50,120,DARKORANGE,"DARKORANGE"); + drawColor(pImg,font,50,170,LIGHTSALMON,"LIGHTSALMON"); + drawColor(pImg,font,50,220,CORAL,"CORAL"); + drawColor(pImg,font,50,270,TOMATO,"TOMATO"); + drawColor(pImg,font,50,320,ORANGERED,"ORANGERED"); +} + +void drawYellowColors(Image* pImg, Font font) { + drawColor(pImg,font,50,20,LIGHTYELLOW,"LIGHTYELLOW"); + drawColor(pImg,font,50,70,LEMONCHIFFON,"LEMONCHIFFON"); + drawColor(pImg,font,50,120,LIGHTGOLDENRODYELLOW,"LIGHTGOLDENRODYELLOW"); + drawColor(pImg,font,50,170,YELLOW,"YELLOW"); + drawColor(pImg,font,50,220,PAPAYAWHIP,"PAPAYAWHIP"); + drawColor(pImg,font,50,270,MOCCASIN,"MOCCASIN"); + drawColor(pImg,font,50,320,PEACHPUFF,"PEACHPUFF"); + drawColor(pImg,font,50,370,PALEGOLDENROD,"PALEGOLDENROD"); + drawColor(pImg,font,50,420,KHAKI,"KHAKI"); + drawColor(pImg,font,50,470,DARKKHAKI,"DARKKHAKI"); +} + +void drawGreenColors(Image* pImg, Font font) { + drawColor(pImg,font,50,20,GREENYELLOW,"GREENYELLOW"); + drawColor(pImg,font,50,70,CHARTREUSE,"CHARTREUSE"); + drawColor(pImg,font,50,120,LAWNGREEN,"LAWNGREEN"); + drawColor(pImg,font,50,170,LIME,"LIME"); + drawColor(pImg,font,50,220,PALEGREEN,"PALEGREEN"); + drawColor(pImg,font,50,270,LIGHTGREEN,"LIGHTGREEN"); + drawColor(pImg,font,50,320,SPRINGGREEN,"SPRINGGREEN"); + drawColor(pImg,font,50,370,MEDIUMSPRINGGREEN,"MEDIUMSPRINGGREEN"); + drawColor(pImg,font,50,420,LIMEGREEN,"LIMEGREEN"); + drawColor(pImg,font,50,470,MEDIUMSEAGREEN,"MEDIUMSEAGREEN"); + drawColor(pImg,font,50,520,SEAGREEN,"SEAGREEN"); + drawColor(pImg,font,50,570,FORESTGREEN,"FORESTGREEN"); + drawColor(pImg,font,50,620,GREEN,"GREEN"); + drawColor(pImg,font,50,670,DARKGREEN,"DARKGREEN"); + drawColor(pImg,font,50,720,YELLOWGREEN,"YELLOWGREEN"); + drawColor(pImg,font,50,770,OLIVEDRAB,"OLIVEDRAB"); + drawColor(pImg,font,50,820,OLIVE,"OLIVE"); + drawColor(pImg,font,50,870,DARKOLIVEGREEN,"DARKOLIVEGREEN"); + drawColor(pImg,font,50,920,MEDIUMAQUAMARINE,"MEDIUMAQUAMARINE"); + drawColor(pImg,font,50,970,DARKSEAGREEN,"DARKSEAGREEN"); + drawColor(pImg,font,50,1020,LIGHTSEAGREEN,"LIGHTSEAGREEN"); + drawColor(pImg,font,50,1070,DARKCYAN,"DARKCYAN"); + drawColor(pImg,font,50,1120,TEAL,"TEAL"); +} + +void drawBlueColors(Image* pImg, Font font) { + drawColor(pImg,font,50,20,LIGHTCYAN,"LIGHTCYAN"); + drawColor(pImg,font,50,70,CYAN,"AQUA / CYAN"); + drawColor(pImg,font,50,120,AQUAMARINE,"AQUAMARINE"); + drawColor(pImg,font,50,170,PALETURQUOISE,"PALETURQUOISE"); + drawColor(pImg,font,50,220,TURQUOISE,"TURQUOISE"); + drawColor(pImg,font,50,270,MEDIUMTURQUOISE,"MEDIUMTURQUOISE"); + drawColor(pImg,font,50,320,DARKTURQUOISE,"DARKTURQUOISE"); + drawColor(pImg,font,50,370,CADETBLUE,"CADETBLUE"); + drawColor(pImg,font,50,420,STEELBLUE,"STEELBLUE"); + drawColor(pImg,font,50,470,LIGHTSTEELBLUE,"LIGHTSTEELBLUE"); + drawColor(pImg,font,50,520,POWDERBLUE,"POWDERBLUE"); + drawColor(pImg,font,50,570,LIGHTBLUE,"LIGHTBLUE"); + drawColor(pImg,font,50,620,SKYBLUE,"SKYBLUE"); + drawColor(pImg,font,50,670,LIGHTSKYBLUE,"LIGHTSKYBLUE"); + drawColor(pImg,font,50,720,DEEPSKYBLUE,"BEEPSKYBLUE"); + drawColor(pImg,font,50,770,DODGERBLUE,"DODGERBLUE"); + drawColor(pImg,font,50,820,CORNFLOWERBLUE,"CORNFLOWERBLUE"); + drawColor(pImg,font,50,870,MEDIUMSLATEBLUE,"MEDIUMSLATEBLUE"); + drawColor(pImg,font,50,920,ROYALBLUE,"ROYALBLUE"); + drawColor(pImg,font,50,970,BLUE,"BLUE"); + drawColor(pImg,font,50,1020,MEDIUMBLUE,"MEDIUMBLUE"); + drawColor(pImg,font,50,1070,DARKBLUE,"DARKBLUE"); + drawColor(pImg,font,50,1120,NAVY,"NAVY"); + drawColor(pImg,font,50,1170,MIDNIGHTBLUE,"MIDNIGHTBLUE"); +} + +void drawBrownColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,CORNSILK,"CORNSILK"); + drawColor(pImg,font,50,70,BLANCHEDALMOND,"BLANCHEDALMOND"); + drawColor(pImg,font,50,120,BISQUE,"BISQUE"); + drawColor(pImg,font,50,170,NAVAJOWHITE,"NAVAJOWHITE"); + drawColor(pImg,font,50,220,WHEAT,"WHEAT"); + drawColor(pImg,font,50,270,BURLYWOOD,"BURLYWOOD"); + drawColor(pImg,font,50,320,TAN,"TAN"); + drawColor(pImg,font,50,370,GOLDENROD,"GOLDENROD"); + drawColor(pImg,font,50,420,DARKGOLDENROD,"DARKGOLDENROD"); + drawColor(pImg,font,50,470,ROSYBROWN,"ROSYBROWN"); + drawColor(pImg,font,50,520,SANDYBROWN,"SANDYBROWN"); + drawColor(pImg,font,50,570,BEIGE,"BEIGE"); + drawColor(pImg,font,50,620,PERU,"PERU"); + drawColor(pImg,font,50,670,CHOCOLATE,"CHOCOLATE"); + drawColor(pImg,font,50,720,SIENNA,"SIENNA"); + drawColor(pImg,font,50,770,SADDLEBROWN,"SADDLEBROWN"); + drawColor(pImg,font,50,820,BROWN,"BROWN"); +} + +void drawPurpleColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,LAVENDER,"LAVENDER"); + drawColor(pImg,font,50,70,THISTLE,"THISTLE"); + drawColor(pImg,font,50,120,PLUM,"PLUM"); + drawColor(pImg,font,50,170,VIOLET,"VIOLET"); + drawColor(pImg,font,50,220,ORCHID,"ORCHID"); + drawColor(pImg,font,50,270,FUCHSIA,"FUCHSIA / MAGENTA"); + drawColor(pImg,font,50,320,MEDIUMORCHID,"MEDIUMORCHID"); + drawColor(pImg,font,50,370,BLUEVIOLET,"BLUEVIOLET"); + drawColor(pImg,font,50,420,DARKVIOLET,"DARKVIOLET"); + drawColor(pImg,font,50,470,DARKORCHID,"DARKORCHID"); + drawColor(pImg,font,50,520,DARKMAGENTA,"DARKMAGENTA"); + drawColor(pImg,font,50,570,PURPLE,"PURPLE"); + drawColor(pImg,font,50,620,INDIGO,"INDIGO"); + drawColor(pImg,font,50,670,MEDIUMSLATEBLUE,"MEDIUMSLATEBLUE"); + drawColor(pImg,font,50,720,SLATEBLUE,"SLATEBLUE"); + drawColor(pImg,font,50,770,DARKSLATEBLUE,"DARKSLATEBLUE"); +} + +void drawLightColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,WHITE,"WHITE"); + drawColor(pImg,font,50,70,SNOW,"SNOW"); + drawColor(pImg,font,50,120,FLORALWHITE,"FLORALWHITE"); + drawColor(pImg,font,50,170,IVORY,"IVORY"); + drawColor(pImg,font,50,220,HONEYDEW,"HONEYDEW"); + drawColor(pImg,font,50,270,MINTCREAM,"MINTCREAM"); + drawColor(pImg,font,50,320,AZURE,"AZURE"); + drawColor(pImg,font,50,370,ALICEBLUE,"ALICEBLUE"); + drawColor(pImg,font,50,420,GHOSTWHITE,"GHOSTWHITE"); + drawColor(pImg,font,50,470,WHITESMOKE,"WHITESMOKE"); + drawColor(pImg,font,50,520,SEASHELL,"SEASHELL"); + drawColor(pImg,font,50,570,OLDLACE,"OLDLACE"); + drawColor(pImg,font,50,620,ANTIQUEWHITE,"ANTIQUEWHITE"); + drawColor(pImg,font,50,670,LINEN,"LINEN"); + drawColor(pImg,font,50,720,LAVENDERBLUSH,"LAVENDERBLUSH"); + drawColor(pImg,font,50,770,MISTYROSE,"MISTYROSE"); +} + +void drawGrayColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,GAINSBORO,"GAINSBORO"); + drawColor(pImg,font,50,70,LIGHTGRAY,"LIGHTGRAY"); + drawColor(pImg,font,50,120,SILVER,"SILVER"); + drawColor(pImg,font,50,170,DARKGRAY,"DARKGRAY"); + drawColor(pImg,font,50,220,GRAY,"GRAY"); + drawColor(pImg,font,50,270,DIMGRAY,"DIMGRAY"); + drawColor(pImg,font,50,320,LIGHTSLATEGRAY,"LIGHTSLATEGRAY"); + drawColor(pImg,font,50,370,SLATEGRAY,"SLATEGRAY"); + drawColor(pImg,font,50,420,DARKSLATEGRAY,"DARKSLATEGRAY"); + drawColor(pImg,font,50,470,BLACK,"BLACK"); +} \ No newline at end of file diff --git a/windows/templates/rdrawing_colors.ico b/windows/templates/rdrawing_colors.ico new file mode 100644 index 0000000000000000000000000000000000000000..000c4907d0a29b7c8a3648d3e1fd93ed61dc4e49 GIT binary patch literal 67646 zcmeI51)NpY_Qyf&c=`;mQL*0t`F{o$B`|aEou0WhGjz9rG}4^{N=OPw2#SO>(p{5u zNk|CT@xoXC_5ZGY?}cHQ8v~cp!Ozb#C+<1>tl!#euf5hf=M*YbnE$$WFU0>JEA;Hm zg$oreRH)FifK9s5Y}Y>vv9I7?fdmR9P#}Q<2^2`6Kmr94D3Cyb1PUZjAb|o26iA>z z0tFH%kU)V1u4M@%6)%2WmeX<*_(PV%avyj&%Wi!V{5jKMd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=;$R+$4(Rx>D#>le@MUnkG@*)t{;e@y z-M5x}pB}5fQSS8|!LAc@|Jk}7tu0;)_tcwPn!$f$h9lxJ<^D>%zre@Gm0Cs=En0ZY zOD`2cCeHyK55|G*K;s|k7yJ|W<_H&U4}$U(;y4q+d9RGEo^%l+;u7CdM%zCd+YNHD#Cwf`WsMt5H|mSa|Pls zKl^-qYunVf)Az9b0KTC8vq7hf8Wd z9_#@6tn;rRY;gn5l^?G2I#zjC{nTg7(rGWxp<9N7cKn^neU!>{MLw+0Xk3Xp{maE) zxUWO5^ADf|?=y@;uARViKDfUT+y(z7sDCJx=C;^3R*GoAH;%jVp2N|| zd@j&;(tiQ;eGD2;)V`Qk9}UMgjZ^&s?Hs1?ptT4|> z<2&fH>gIWMxxk>)6^`zyplEFTgWCgQYHb8}tVwz=vQaT+apba^N%mrryHDpeC>! z2Ka`Ctu?5{yM1HQ60Of|O|;$zuK9fIWu)Y?UJCB72Rh~!LkD=*i{*Jx3RDD9AOSex zIyo2ItUKX63B&;#C=d6qfxl48S^^zV?r#N`{W;sqD#U_|6-b~!0tFH%kU)V13M5b< zfdUB>NT5Ih1rjKbK!F4bBv2rM0tx)4Bp_GizaI+~DxR}pN6uaURVm1EK<;%9LuXF# zf1dSjz70n_>v!f_zsa}W-Lt>2pLKIJJ*2$nfHUjGJ?lq2KQC0sd&1o7-F^GL7s$2l zZLJ>EO;4D6{mkXOBFMddM1Se|XYTNbZ_V4FVC&t_9&Z|$YduGE3KcrHd8WbV?B@n@ zujgp4xq*va&v85Ee4h2y*)>jwepKqNdDtLAsL7Ee?y}NEN?!7PH zdCKQn_uaQ|KkK5u^RBb-oG3r*tIz(vi2nY_*>#$AMb~q;$J}3z_U89~jpB2AK6&Z7 z(Ic +#include +#include + +#define RAYGUI_IMPLEMENTATION +#include + +//color classification from https://www.dofactory.com/css/color-names + +enum ColorPage{ + Red, + Pink, + Orange, + Yellow, + Green, + Blue, + Brown, + Purple, + Light, + Gray +} ; + +void drawRedColors(Image *pImg,Font font); +void drawPinkColors(Image *pImg,Font font); +void drawOrangeColors(Image *pImg,Font font); +void drawYellowColors(Image *pImg,Font font); +void drawGreenColors(Image *pImg,Font font); +void drawBlueColors(Image *pImg,Font font); +void drawBrownColors(Image *pImg,Font font); +void drawPurpleColors(Image *pImg,Font font); +void drawLightColors(Image *pImg,Font font); +void drawGrayColors(Image *pImg,Font font); + +int ddd; +int main() { + int currentPage=Red; + InitWindow(1000,900,"Colors"); + SetTraceLogLevel(LOG_WARNING); + SetTargetFPS(60); + bool fontChanged=false; + Font font; + if (FileExists("C:\\windows\\fonts\\cour.ttf")) { + font=LoadFont("C:\\windows\\fonts\\cour.ttf"); + fontChanged=true; + } else { + font=GetFontDefault(); + } + GuiSetStyle(DEFAULT,TEXT_SIZE,20); + GuiSetStyle(LISTVIEW,SCROLLBAR_WIDTH,20); + + Image img=GenImageColor(830,890,WHITE); + Rectangle panelRec = {165,5,830,890}; + Rectangle panelContentRec = {0,0,800,1190}; + Vector2 panelScroll = {1,1}; + while(!WindowShouldClose()) { + Texture texture; + BeginDrawing(); + if (GuiToggle((Rectangle){ 10, 10, 140, 30 },"Red",currentPage==Red)) { + currentPage=Red; + } + if (GuiToggle((Rectangle){ 10, 50, 140, 30 },"Pink",currentPage==Pink)) { + currentPage=Pink; + } + if (GuiToggle((Rectangle){ 10, 90, 140, 30 },"Orange",currentPage==Orange)) { + currentPage=Orange; + } + if (GuiToggle((Rectangle){ 10, 130, 140, 30 },"Yellow",currentPage==Yellow)) { + currentPage=Yellow; + } + if (GuiToggle((Rectangle){ 10, 170, 140, 30 },"Green",currentPage==Green)) { + panelContentRec = (Rectangle){0,0, + 830- 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH), + 1170}; + if (currentPage!=Green) { + panelScroll=(Vector2){1,1}; + } + currentPage=Green; + } + if (GuiToggle((Rectangle){ 10, 210, 140, 30 },"Blue",currentPage==Blue)) { + panelContentRec = (Rectangle){0,0, + 830- 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH), + 1220}; + if (currentPage!=Blue) { + panelScroll=(Vector2){1,1}; + } + currentPage=Blue; + } + if (GuiToggle((Rectangle){ 10, 250, 140, 30 },"Brown",currentPage==Brown)) { + currentPage=Brown; + } + if (GuiToggle((Rectangle){ 10, 290, 140, 30 },"Purple",currentPage==Purple)) { + currentPage=Purple; + } + if (GuiToggle((Rectangle){ 10, 330, 140, 30 },"Light",currentPage==Light)) { + currentPage=Light; + } + if (GuiToggle((Rectangle){ 10, 370, 140, 30 },"Gray",currentPage==Gray)) { + currentPage=Gray; + } + ImageClearBackground(&img,WHITE); + switch(currentPage) { + case Red: + drawRedColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Pink: + drawPinkColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Orange: + drawOrangeColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Yellow: + drawYellowColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Green: { + Rectangle view = GuiScrollPanel(panelRec,NULL,panelContentRec,&panelScroll); + Image tmpImage = GenImageColor(830,1170,WHITE); + Image tmpImage2 = GenImageColor(view.width,view.height,WHITE); + drawGreenColors(&tmpImage,font); + ImageDraw(&tmpImage2,tmpImage, + (Rectangle){view.x-panelRec.x-panelScroll.x,view.y-panelRec.y-panelScroll.y,view.width,view.height}, + (Rectangle){0,0,view.width,view.height},WHITE); + texture = LoadTextureFromImage(tmpImage2); + UnloadImage(tmpImage2); + UnloadImage(tmpImage); + } + break; + case Blue: { + Rectangle view = GuiScrollPanel(panelRec,NULL,panelContentRec,&panelScroll); + Image tmpImage = GenImageColor(830,1220,WHITE); + Image tmpImage2 = GenImageColor(view.width,view.height,WHITE); + drawBlueColors(&tmpImage,font); + ImageDraw(&tmpImage2,tmpImage, + (Rectangle){view.x-panelRec.x-panelScroll.x,view.y-panelRec.y-panelScroll.y,view.width,view.height}, + (Rectangle){0,0,view.width,view.height},WHITE); + texture = LoadTextureFromImage(tmpImage2); + UnloadImage(tmpImage2); + UnloadImage(tmpImage); + } + break; + case Brown: + drawBrownColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Purple: + drawPurpleColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Light: + drawLightColors(&img,font); + texture = LoadTextureFromImage(img); + break; + case Gray: + drawGrayColors(&img,font); + texture = LoadTextureFromImage(img); + break; + } + ClearBackground(LIGHTGRAY); + DrawTexture(texture,165,5,WHITE); + EndDrawing(); + UnloadTexture(texture); + } + + if (fontChanged) { + UnloadFont(font); + } + //Clean up + UnloadImage(img); + CloseWindow(); +} + +void drawColor(Image* pImg, Font font, int x, int y, Color color, const char* colorName) { + char buffer[255]; + ImageFillRectangleEx(pImg,x,y,200,40,color); + ImageDrawRectangleEx(pImg,x,y,200,40,2,BLACK); + ImageDrawTextEx(pImg,font,colorName,(Vector2){x+230,y+10},20,0,BLACK); + sprintf(buffer,"0x%02X%02X%02X",color.r,color.g,color.b); + ImageDrawTextEx(pImg,font,buffer,(Vector2){x+600,y+10},20,0,BLACK); +} + +void drawRedColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,LIGHTSALMON,"LIGHTSALMON"); + drawColor(pImg,font,50,70,DARKSALMON,"DARKSALMON"); + drawColor(pImg,font,50,120,SALMON,"SALMON"); + drawColor(pImg,font,50,170,LIGHTCORAL,"LIGHTCORAL"); + drawColor(pImg,font,50,220,INDIANRED,"INDIANRED"); + drawColor(pImg,font,50,270,RED,"RED"); + drawColor(pImg,font,50,320,CRIMSON,"CRIMSON"); + drawColor(pImg,font,50,370,MAROON,"MAROON"); + drawColor(pImg,font,50,420,FIREBRICK,"FIREBRICK"); + drawColor(pImg,font,50,470,DARKRED,"DARKRED"); +} + +void drawPinkColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,PINK,"PINK"); + drawColor(pImg,font,50,70,LIGHTPINK,"LIGHTPINK"); + drawColor(pImg,font,50,120,HOTPINK,"HOTPINK"); + drawColor(pImg,font,50,170,DEEPPINK,"DEEPPINK"); + drawColor(pImg,font,50,220,PALEVIOLETRED,"PALEVIOLETRED"); + drawColor(pImg,font,50,270,MEDIUMVIOLETRED,"MEDIUMVIOLETRED"); +} + +void drawOrangeColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,GOLD,"GOLD"); + drawColor(pImg,font,50,70,ORANGE,"ORANGE"); + drawColor(pImg,font,50,120,DARKORANGE,"DARKORANGE"); + drawColor(pImg,font,50,170,LIGHTSALMON,"LIGHTSALMON"); + drawColor(pImg,font,50,220,CORAL,"CORAL"); + drawColor(pImg,font,50,270,TOMATO,"TOMATO"); + drawColor(pImg,font,50,320,ORANGERED,"ORANGERED"); +} + +void drawYellowColors(Image* pImg, Font font) { + drawColor(pImg,font,50,20,LIGHTYELLOW,"LIGHTYELLOW"); + drawColor(pImg,font,50,70,LEMONCHIFFON,"LEMONCHIFFON"); + drawColor(pImg,font,50,120,LIGHTGOLDENRODYELLOW,"LIGHTGOLDENRODYELLOW"); + drawColor(pImg,font,50,170,YELLOW,"YELLOW"); + drawColor(pImg,font,50,220,PAPAYAWHIP,"PAPAYAWHIP"); + drawColor(pImg,font,50,270,MOCCASIN,"MOCCASIN"); + drawColor(pImg,font,50,320,PEACHPUFF,"PEACHPUFF"); + drawColor(pImg,font,50,370,PALEGOLDENROD,"PALEGOLDENROD"); + drawColor(pImg,font,50,420,KHAKI,"KHAKI"); + drawColor(pImg,font,50,470,DARKKHAKI,"DARKKHAKI"); +} + +void drawGreenColors(Image* pImg, Font font) { + drawColor(pImg,font,50,20,GREENYELLOW,"GREENYELLOW"); + drawColor(pImg,font,50,70,CHARTREUSE,"CHARTREUSE"); + drawColor(pImg,font,50,120,LAWNGREEN,"LAWNGREEN"); + drawColor(pImg,font,50,170,LIME,"LIME"); + drawColor(pImg,font,50,220,PALEGREEN,"PALEGREEN"); + drawColor(pImg,font,50,270,LIGHTGREEN,"LIGHTGREEN"); + drawColor(pImg,font,50,320,SPRINGGREEN,"SPRINGGREEN"); + drawColor(pImg,font,50,370,MEDIUMSPRINGGREEN,"MEDIUMSPRINGGREEN"); + drawColor(pImg,font,50,420,LIMEGREEN,"LIMEGREEN"); + drawColor(pImg,font,50,470,MEDIUMSEAGREEN,"MEDIUMSEAGREEN"); + drawColor(pImg,font,50,520,SEAGREEN,"SEAGREEN"); + drawColor(pImg,font,50,570,FORESTGREEN,"FORESTGREEN"); + drawColor(pImg,font,50,620,GREEN,"GREEN"); + drawColor(pImg,font,50,670,DARKGREEN,"DARKGREEN"); + drawColor(pImg,font,50,720,YELLOWGREEN,"YELLOWGREEN"); + drawColor(pImg,font,50,770,OLIVEDRAB,"OLIVEDRAB"); + drawColor(pImg,font,50,820,OLIVE,"OLIVE"); + drawColor(pImg,font,50,870,DARKOLIVEGREEN,"DARKOLIVEGREEN"); + drawColor(pImg,font,50,920,MEDIUMAQUAMARINE,"MEDIUMAQUAMARINE"); + drawColor(pImg,font,50,970,DARKSEAGREEN,"DARKSEAGREEN"); + drawColor(pImg,font,50,1020,LIGHTSEAGREEN,"LIGHTSEAGREEN"); + drawColor(pImg,font,50,1070,DARKCYAN,"DARKCYAN"); + drawColor(pImg,font,50,1120,TEAL,"TEAL"); +} + +void drawBlueColors(Image* pImg, Font font) { + drawColor(pImg,font,50,20,LIGHTCYAN,"LIGHTCYAN"); + drawColor(pImg,font,50,70,CYAN,"AQUA / CYAN"); + drawColor(pImg,font,50,120,AQUAMARINE,"AQUAMARINE"); + drawColor(pImg,font,50,170,PALETURQUOISE,"PALETURQUOISE"); + drawColor(pImg,font,50,220,TURQUOISE,"TURQUOISE"); + drawColor(pImg,font,50,270,MEDIUMTURQUOISE,"MEDIUMTURQUOISE"); + drawColor(pImg,font,50,320,DARKTURQUOISE,"DARKTURQUOISE"); + drawColor(pImg,font,50,370,CADETBLUE,"CADETBLUE"); + drawColor(pImg,font,50,420,STEELBLUE,"STEELBLUE"); + drawColor(pImg,font,50,470,LIGHTSTEELBLUE,"LIGHTSTEELBLUE"); + drawColor(pImg,font,50,520,POWDERBLUE,"POWDERBLUE"); + drawColor(pImg,font,50,570,LIGHTBLUE,"LIGHTBLUE"); + drawColor(pImg,font,50,620,SKYBLUE,"SKYBLUE"); + drawColor(pImg,font,50,670,LIGHTSKYBLUE,"LIGHTSKYBLUE"); + drawColor(pImg,font,50,720,DEEPSKYBLUE,"BEEPSKYBLUE"); + drawColor(pImg,font,50,770,DODGERBLUE,"DODGERBLUE"); + drawColor(pImg,font,50,820,CORNFLOWERBLUE,"CORNFLOWERBLUE"); + drawColor(pImg,font,50,870,MEDIUMSLATEBLUE,"MEDIUMSLATEBLUE"); + drawColor(pImg,font,50,920,ROYALBLUE,"ROYALBLUE"); + drawColor(pImg,font,50,970,BLUE,"BLUE"); + drawColor(pImg,font,50,1020,MEDIUMBLUE,"MEDIUMBLUE"); + drawColor(pImg,font,50,1070,DARKBLUE,"DARKBLUE"); + drawColor(pImg,font,50,1120,NAVY,"NAVY"); + drawColor(pImg,font,50,1170,MIDNIGHTBLUE,"MIDNIGHTBLUE"); +} + +void drawBrownColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,CORNSILK,"CORNSILK"); + drawColor(pImg,font,50,70,BLANCHEDALMOND,"BLANCHEDALMOND"); + drawColor(pImg,font,50,120,BISQUE,"BISQUE"); + drawColor(pImg,font,50,170,NAVAJOWHITE,"NAVAJOWHITE"); + drawColor(pImg,font,50,220,WHEAT,"WHEAT"); + drawColor(pImg,font,50,270,BURLYWOOD,"BURLYWOOD"); + drawColor(pImg,font,50,320,TAN,"TAN"); + drawColor(pImg,font,50,370,GOLDENROD,"GOLDENROD"); + drawColor(pImg,font,50,420,DARKGOLDENROD,"DARKGOLDENROD"); + drawColor(pImg,font,50,470,ROSYBROWN,"ROSYBROWN"); + drawColor(pImg,font,50,520,SANDYBROWN,"SANDYBROWN"); + drawColor(pImg,font,50,570,BEIGE,"BEIGE"); + drawColor(pImg,font,50,620,PERU,"PERU"); + drawColor(pImg,font,50,670,CHOCOLATE,"CHOCOLATE"); + drawColor(pImg,font,50,720,SIENNA,"SIENNA"); + drawColor(pImg,font,50,770,SADDLEBROWN,"SADDLEBROWN"); + drawColor(pImg,font,50,820,BROWN,"BROWN"); +} + +void drawPurpleColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,LAVENDER,"LAVENDER"); + drawColor(pImg,font,50,70,THISTLE,"THISTLE"); + drawColor(pImg,font,50,120,PLUM,"PLUM"); + drawColor(pImg,font,50,170,VIOLET,"VIOLET"); + drawColor(pImg,font,50,220,ORCHID,"ORCHID"); + drawColor(pImg,font,50,270,FUCHSIA,"FUCHSIA / MAGENTA"); + drawColor(pImg,font,50,320,MEDIUMORCHID,"MEDIUMORCHID"); + drawColor(pImg,font,50,370,BLUEVIOLET,"BLUEVIOLET"); + drawColor(pImg,font,50,420,DARKVIOLET,"DARKVIOLET"); + drawColor(pImg,font,50,470,DARKORCHID,"DARKORCHID"); + drawColor(pImg,font,50,520,DARKMAGENTA,"DARKMAGENTA"); + drawColor(pImg,font,50,570,PURPLE,"PURPLE"); + drawColor(pImg,font,50,620,INDIGO,"INDIGO"); + drawColor(pImg,font,50,670,MEDIUMSLATEBLUE,"MEDIUMSLATEBLUE"); + drawColor(pImg,font,50,720,SLATEBLUE,"SLATEBLUE"); + drawColor(pImg,font,50,770,DARKSLATEBLUE,"DARKSLATEBLUE"); +} + +void drawLightColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,WHITE,"WHITE"); + drawColor(pImg,font,50,70,SNOW,"SNOW"); + drawColor(pImg,font,50,120,FLORALWHITE,"FLORALWHITE"); + drawColor(pImg,font,50,170,IVORY,"IVORY"); + drawColor(pImg,font,50,220,HONEYDEW,"HONEYDEW"); + drawColor(pImg,font,50,270,MINTCREAM,"MINTCREAM"); + drawColor(pImg,font,50,320,AZURE,"AZURE"); + drawColor(pImg,font,50,370,ALICEBLUE,"ALICEBLUE"); + drawColor(pImg,font,50,420,GHOSTWHITE,"GHOSTWHITE"); + drawColor(pImg,font,50,470,WHITESMOKE,"WHITESMOKE"); + drawColor(pImg,font,50,520,SEASHELL,"SEASHELL"); + drawColor(pImg,font,50,570,OLDLACE,"OLDLACE"); + drawColor(pImg,font,50,620,ANTIQUEWHITE,"ANTIQUEWHITE"); + drawColor(pImg,font,50,670,LINEN,"LINEN"); + drawColor(pImg,font,50,720,LAVENDERBLUSH,"LAVENDERBLUSH"); + drawColor(pImg,font,50,770,MISTYROSE,"MISTYROSE"); +} + +void drawGrayColors(Image *pImg,Font font) { + drawColor(pImg,font,50,20,GAINSBORO,"GAINSBORO"); + drawColor(pImg,font,50,70,LIGHTGRAY,"LIGHTGRAY"); + drawColor(pImg,font,50,120,SILVER,"SILVER"); + drawColor(pImg,font,50,170,DARKGRAY,"DARKGRAY"); + drawColor(pImg,font,50,220,GRAY,"GRAY"); + drawColor(pImg,font,50,270,DIMGRAY,"DIMGRAY"); + drawColor(pImg,font,50,320,LIGHTSLATEGRAY,"LIGHTSLATEGRAY"); + drawColor(pImg,font,50,370,SLATEGRAY,"SLATEGRAY"); + drawColor(pImg,font,50,420,DARKSLATEGRAY,"DARKSLATEGRAY"); + drawColor(pImg,font,50,470,BLACK,"BLACK"); +} \ No newline at end of file