From 03a3cce57bba39687685a186600897447d20c61b Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 7 Nov 2022 13:13:03 +0100 Subject: [PATCH] ADDED: Two new icons --- examples/custom_file_dialog/gui_file_dialog.h | 8 ++++++-- src/raygui.h | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/custom_file_dialog/gui_file_dialog.h b/examples/custom_file_dialog/gui_file_dialog.h index f9902e5..f8a538b 100644 --- a/examples/custom_file_dialog/gui_file_dialog.h +++ b/examples/custom_file_dialog/gui_file_dialog.h @@ -446,12 +446,16 @@ static void ReloadDirectoryFiles(GuiFileDialogState *state) { strcpy(dirFilesIcon[i], TextFormat("#10#%s", GetFileName(state->dirFiles.paths[i]))); } - else strcpy(dirFilesIcon[i], TextFormat("#8#%s", GetFileName(state->dirFiles.paths[i]))); + else if (IsFileExtension(state->dirFiles.paths[i], ".exe;.bin;.raw;.msi")) + { + strcpy(dirFilesIcon[i], TextFormat("#200#%s", GetFileName(state->dirFiles.paths[i]))); + } + else strcpy(dirFilesIcon[i], TextFormat("#218#%s", GetFileName(state->dirFiles.paths[i]))); } else { // Path is a directory, add a directory icon - strcpy(dirFilesIcon[i], TextFormat("#204#%s", GetFileName(state->dirFiles.paths[i]))); + strcpy(dirFilesIcon[i], TextFormat("#1#%s", GetFileName(state->dirFiles.paths[i]))); } } } diff --git a/src/raygui.h b/src/raygui.h index 5697e31..c80a6d8 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -791,8 +791,8 @@ typedef enum { ICON_BURGER_MENU = 214, ICON_CASE_SENSITIVE = 215, ICON_REG_EXP = 216, - ICON_217 = 217, - ICON_218 = 218, + ICON_FOLDER = 217, + ICON_FILE = 218, ICON_219 = 219, ICON_220 = 220, ICON_221 = 221, @@ -1104,8 +1104,8 @@ static unsigned int guiIcons[RAYGUI_ICON_MAX_ICONS*RAYGUI_ICON_DATA_ELEMENTS] = 0x00000000, 0x00000000, 0x1ff81ff8, 0x1ff80000, 0x00001ff8, 0x1ff81ff8, 0x00000000, 0x00000000, // ICON_BURGER_MENU 0x00000000, 0x00000000, 0x00880070, 0x0c880088, 0x1e8810f8, 0x3e881288, 0x00000000, 0x00000000, // ICON_CASE_SENSITIVE 0x00000000, 0x02000000, 0x07000a80, 0x07001fc0, 0x02000a80, 0x00300030, 0x00000000, 0x00000000, // ICON_REG_EXP - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_217 - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_218 + 0x00000000, 0x0042007e, 0x40027fc2, 0x40024002, 0x40024002, 0x40024002, 0x7ffe4002, 0x00000000, // ICON_FOLDER + 0x3ff00000, 0x201c2010, 0x20042004, 0x20042004, 0x20042004, 0x20042004, 0x20042004, 0x00003ffc, // ICON_FILE 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_219 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_220 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_221