From 42532f314903052a6a1188d9ef8c673cac9bc403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sat, 25 Jun 2022 17:16:20 +0200 Subject: [PATCH] Use `CRenderTools::RenderIcon` in editor file dialog --- src/game/editor/editor.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 978c81915..7944905f8 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -4325,12 +4325,7 @@ void CEditor::AddFileDialogEntry(int Index, CUIRect *pView) Button.VSplitLeft(Button.h, &FileIcon, &Button); Button.VSplitLeft(5.0f, nullptr, &Button); - Graphics()->TextureSet(g_pData->m_aImages[IMAGE_FILEICONS].m_Id); - Graphics()->QuadsBegin(); - RenderTools()->SelectSprite(m_vFileList[Index].m_IsDir ? SPRITE_FILE_FOLDER : SPRITE_FILE_MAP2); - IGraphics::CQuadItem QuadItem(FileIcon.x, FileIcon.y, FileIcon.w, FileIcon.h); - Graphics()->QuadsDrawTL(&QuadItem, 1); - Graphics()->QuadsEnd(); + RenderTools()->RenderIcon(IMAGE_FILEICONS, m_vFileList[Index].m_IsDir ? SPRITE_FILE_FOLDER : SPRITE_FILE_MAP2, &FileIcon); if(DoButton_File(&m_vFileList[Index], m_vFileList[Index].m_aName, m_FilesSelectedIndex == Index, &Button, 0, nullptr)) {