feat: Color entries that are Favories (Part 2)
This commit is contained in:
parent
36ad88176c
commit
78964c0520
2 changed files with 10 additions and 0 deletions
|
|
@ -67,6 +67,7 @@
|
||||||
#define AUTO_RESUME_SLOT 9
|
#define AUTO_RESUME_SLOT 9
|
||||||
|
|
||||||
#define TRIAD_WHITE 0xff,0xff,0xff
|
#define TRIAD_WHITE 0xff,0xff,0xff
|
||||||
|
#define TRIAD_GOLD 0xd2,0xb4,0x6c
|
||||||
#define TRIAD_BLACK 0x00,0x00,0x00
|
#define TRIAD_BLACK 0x00,0x00,0x00
|
||||||
#define TRIAD_LIGHT_GRAY 0x7f,0x7f,0x7f
|
#define TRIAD_LIGHT_GRAY 0x7f,0x7f,0x7f
|
||||||
#define TRIAD_GRAY 0x99,0x99,0x99
|
#define TRIAD_GRAY 0x99,0x99,0x99
|
||||||
|
|
@ -76,6 +77,7 @@
|
||||||
#define TRIAD_DARK_TEXT 0x66,0x66,0x66
|
#define TRIAD_DARK_TEXT 0x66,0x66,0x66
|
||||||
|
|
||||||
#define COLOR_WHITE (SDL_Color){TRIAD_WHITE}
|
#define COLOR_WHITE (SDL_Color){TRIAD_WHITE}
|
||||||
|
#define COLOR_GOLD (SDL_Color){TRIAD_GOLD}
|
||||||
#define COLOR_GRAY (SDL_Color){TRIAD_GRAY}
|
#define COLOR_GRAY (SDL_Color){TRIAD_GRAY}
|
||||||
#define COLOR_BLACK (SDL_Color){TRIAD_BLACK}
|
#define COLOR_BLACK (SDL_Color){TRIAD_BLACK}
|
||||||
#define COLOR_LIGHT_TEXT (SDL_Color){TRIAD_LIGHT_TEXT}
|
#define COLOR_LIGHT_TEXT (SDL_Color){TRIAD_LIGHT_TEXT}
|
||||||
|
|
|
||||||
|
|
@ -462,6 +462,11 @@ static void toggleFavorite(char* path) {
|
||||||
}
|
}
|
||||||
saveFavorites();
|
saveFavorites();
|
||||||
}
|
}
|
||||||
|
static int isFavorite(char *path) {
|
||||||
|
path += strlen(SDCARD_PATH); // makes paths platform agnostic
|
||||||
|
int id = FavoriteArray_indexOf(favorites, path);
|
||||||
|
return ++id;
|
||||||
|
}
|
||||||
|
|
||||||
static int hasEmu(char* emu_name) {
|
static int hasEmu(char* emu_name) {
|
||||||
char pak_path[256];
|
char pak_path[256];
|
||||||
|
|
@ -1527,6 +1532,9 @@ int main (int argc, char *argv[]) {
|
||||||
if (i==top->start) available_width -= ow;
|
if (i==top->start) available_width -= ow;
|
||||||
|
|
||||||
SDL_Color text_color = COLOR_WHITE;
|
SDL_Color text_color = COLOR_WHITE;
|
||||||
|
if (isFavorite(entry->path)) {
|
||||||
|
text_color = COLOR_GOLD;
|
||||||
|
}
|
||||||
|
|
||||||
trimSortingMeta(&entry_name);
|
trimSortingMeta(&entry_name);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue