mirror of
https://github.com/archr-linux/fileman.git
synced 2026-07-13 03:19:08 -07:00
Added icon file-text.png.
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 627 B |
@@ -159,5 +159,6 @@ extern SDL_Texture *g_iconEdit;
|
||||
extern SDL_Texture *g_iconCancel;
|
||||
extern SDL_Texture *g_iconFloppy;
|
||||
extern SDL_Texture *g_iconImage;
|
||||
extern SDL_Texture *g_iconFileText;
|
||||
|
||||
#endif
|
||||
|
||||
+19
-16
@@ -35,6 +35,7 @@ SDL_Texture *g_iconEdit = NULL;
|
||||
SDL_Texture *g_iconCancel = NULL;
|
||||
SDL_Texture *g_iconFloppy = NULL;
|
||||
SDL_Texture *g_iconImage = NULL;
|
||||
SDL_Texture *g_iconFileText = NULL;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -64,6 +65,7 @@ int main(int argc, char* args[])
|
||||
g_iconCancel = SDLUtils::loadTexture(std::string(RES_PATH) + "/cancel.png");
|
||||
g_iconFloppy = SDLUtils::loadTexture(std::string(RES_PATH) + "/floppy.png");
|
||||
g_iconImage = SDLUtils::loadTexture(std::string(RES_PATH) + "/image.png");
|
||||
g_iconFileText = SDLUtils::loadTexture(std::string(RES_PATH) + "/file-text.png");
|
||||
|
||||
// Load fonts
|
||||
g_font = SDLUtils::loadFont(std::string(RES_PATH) + "/" + FONT_NAME, FONT_SIZE);
|
||||
@@ -90,22 +92,23 @@ int main(int argc, char* args[])
|
||||
g_fontMono = NULL;
|
||||
|
||||
// Free textures
|
||||
if (g_iconFile != NULL) { SDL_DestroyTexture(g_iconFile); g_iconFile = NULL; }
|
||||
if (g_iconDir != NULL) { SDL_DestroyTexture(g_iconDir); g_iconDir = NULL; }
|
||||
if (g_iconUp != NULL) { SDL_DestroyTexture(g_iconUp); g_iconUp = NULL; }
|
||||
if (g_iconCopy != NULL) { SDL_DestroyTexture(g_iconCopy); g_iconCopy = NULL; }
|
||||
if (g_iconCut != NULL) { SDL_DestroyTexture(g_iconCut); g_iconCut = NULL; }
|
||||
if (g_iconPaste != NULL) { SDL_DestroyTexture(g_iconPaste); g_iconPaste = NULL; }
|
||||
if (g_iconTrash != NULL) { SDL_DestroyTexture(g_iconTrash); g_iconTrash = NULL; }
|
||||
if (g_iconDisk != NULL) { SDL_DestroyTexture(g_iconDisk); g_iconDisk = NULL; }
|
||||
if (g_iconSelect != NULL) { SDL_DestroyTexture(g_iconSelect); g_iconSelect = NULL; }
|
||||
if (g_iconNone != NULL) { SDL_DestroyTexture(g_iconNone); g_iconNone = NULL; }
|
||||
if (g_iconNewDir != NULL) { SDL_DestroyTexture(g_iconNewDir); g_iconNewDir = NULL; }
|
||||
if (g_iconQuit != NULL) { SDL_DestroyTexture(g_iconQuit); g_iconQuit = NULL; }
|
||||
if (g_iconEdit != NULL) { SDL_DestroyTexture(g_iconEdit); g_iconEdit = NULL; }
|
||||
if (g_iconCancel != NULL) { SDL_DestroyTexture(g_iconCancel); g_iconCancel = NULL; }
|
||||
if (g_iconFloppy != NULL) { SDL_DestroyTexture(g_iconFloppy); g_iconFloppy = NULL; }
|
||||
if (g_iconImage != NULL) { SDL_DestroyTexture(g_iconImage); g_iconImage = NULL; }
|
||||
if (g_iconFile != NULL) { SDL_DestroyTexture(g_iconFile); g_iconFile = NULL; }
|
||||
if (g_iconDir != NULL) { SDL_DestroyTexture(g_iconDir); g_iconDir = NULL; }
|
||||
if (g_iconUp != NULL) { SDL_DestroyTexture(g_iconUp); g_iconUp = NULL; }
|
||||
if (g_iconCopy != NULL) { SDL_DestroyTexture(g_iconCopy); g_iconCopy = NULL; }
|
||||
if (g_iconCut != NULL) { SDL_DestroyTexture(g_iconCut); g_iconCut = NULL; }
|
||||
if (g_iconPaste != NULL) { SDL_DestroyTexture(g_iconPaste); g_iconPaste = NULL; }
|
||||
if (g_iconTrash != NULL) { SDL_DestroyTexture(g_iconTrash); g_iconTrash = NULL; }
|
||||
if (g_iconDisk != NULL) { SDL_DestroyTexture(g_iconDisk); g_iconDisk = NULL; }
|
||||
if (g_iconSelect != NULL) { SDL_DestroyTexture(g_iconSelect); g_iconSelect = NULL; }
|
||||
if (g_iconNone != NULL) { SDL_DestroyTexture(g_iconNone); g_iconNone = NULL; }
|
||||
if (g_iconNewDir != NULL) { SDL_DestroyTexture(g_iconNewDir); g_iconNewDir = NULL; }
|
||||
if (g_iconQuit != NULL) { SDL_DestroyTexture(g_iconQuit); g_iconQuit = NULL; }
|
||||
if (g_iconEdit != NULL) { SDL_DestroyTexture(g_iconEdit); g_iconEdit = NULL; }
|
||||
if (g_iconCancel != NULL) { SDL_DestroyTexture(g_iconCancel); g_iconCancel = NULL; }
|
||||
if (g_iconFloppy != NULL) { SDL_DestroyTexture(g_iconFloppy); g_iconFloppy = NULL; }
|
||||
if (g_iconImage != NULL) { SDL_DestroyTexture(g_iconImage); g_iconImage = NULL; }
|
||||
if (g_iconFileText != NULL) { SDL_DestroyTexture(g_iconFileText); g_iconFileText = NULL; }
|
||||
|
||||
// Quit SDL
|
||||
SDLUtils::close();
|
||||
|
||||
+1
-1
@@ -242,7 +242,7 @@ void MainWindow::openHighlightedFile(void)
|
||||
int action = -1;
|
||||
{
|
||||
Dialog l_dialog("Open:");
|
||||
l_dialog.addOption("View as text", 0, g_iconFile);
|
||||
l_dialog.addOption("View as text", 0, g_iconFileText);
|
||||
l_dialog.addOption("Edit as text", 1, g_iconEdit);
|
||||
l_dialog.addOption("Cancel", 2, g_iconCancel);
|
||||
action = l_dialog.execute();
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ void TextViewer::render(const bool p_focus)
|
||||
|
||||
// Render title
|
||||
int l_y = LINE_HEIGHT / 2;
|
||||
SDLUtils::renderTexture(g_iconFile, MARGIN_X, l_y, SDLUtils::T_ALIGN_LEFT, SDLUtils::T_ALIGN_MIDDLE);
|
||||
SDLUtils::renderTexture(g_iconFileText, MARGIN_X, l_y, SDLUtils::T_ALIGN_LEFT, SDLUtils::T_ALIGN_MIDDLE);
|
||||
SDLUtils::renderText(m_title, g_font, MARGIN_X + ICON_SIZE + MARGIN_X, l_y, {COLOR_TEXT_NORMAL}, {COLOR_TITLE_BG}, SDLUtils::T_ALIGN_LEFT, SDLUtils::T_ALIGN_MIDDLE);
|
||||
|
||||
// Render scrollbar
|
||||
|
||||
Reference in New Issue
Block a user