diff options
| author | physick <mynameisgennadiy@vk.com> | 2026-07-31 18:36:22 +0500 |
|---|---|---|
| committer | physick <mynameisgennadiy@vk.com> | 2026-07-31 18:36:22 +0500 |
| commit | 722a9d1e729aff2eb64f3c064c33d547ea980eb0 (patch) | |
| tree | fb03a4f5bf76d1274565ef261e7f2e3a579a0823 /src/resources/resources.c | |
| parent | e20b4c3a5dfe081fa2d6d772617307fae4689698 (diff) | |
Buttons GUI start
Diffstat (limited to 'src/resources/resources.c')
| -rw-r--r-- | src/resources/resources.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/resources/resources.c b/src/resources/resources.c index e82b6e0..c1b78b5 100644 --- a/src/resources/resources.c +++ b/src/resources/resources.c @@ -5,9 +5,43 @@ Font MainFont; Font MonoFont; +Texture ButtonsAtlas; + +Texture PrepareTexture(char *location) { + Image img = LoadImage(location); + // Applying colorscheme + ImageColorReplace(&img, + (Color) { .r = 0xFF, .g = 0x00, .b = 0x00, .a = 0xFF }, + COLORSCHEME_RED); + ImageColorReplace(&img, + (Color) { .r = 0x00, .g = 0xFF, .b = 0x00, .a = 0xFF }, + COLORSCHEME_GREEN); + ImageColorReplace(&img, + (Color) { .r = 0XFF, .g = 0x7F, .b = 0x00, .a = 0xFF }, + COLORSCHEME_YELLOW); + ImageColorReplace(&img, + (Color) { .r = 0x00, .g = 0x00, .b = 0xFF, .a = 0xFF }, + COLORSCHEME_ORANGE); + ImageColorReplace(&img, + (Color) { .r = 0x00, .g = 0x00, .b = 0x00, .a = 0xFF }, + COLORSCHEME_BROWN); + ImageColorReplace(&img, + (Color) { .r = 0xFF, .g = 0xFF, .b = 0xFF, .a = 0xFF }, + COLORSCHEME_WHITE); + Texture outp = LoadTextureFromImage(img); + UnloadImage(img); + return outp; +} + void LoadResources() { MainFont = LoadFontEx("assets/fonts/coolvetica.ttf", 100, NULL, 0); MonoFont = LoadFontEx("assets/fonts/monofont.ttf", 100, NULL, 0); + + ButtonsAtlas = PrepareTexture("assets/textures/buttons_atlas.png"); +} + +Texture *GetButtonsAtlas() { + return &ButtonsAtlas; } Font *GetMainFont() { return &MainFont; } |
