Use CRenderTools::RenderIcon in editor file dialog

This commit is contained in:
Robert Müller 2022-06-25 17:16:20 +02:00
parent fb91881765
commit 42532f3149

View file

@ -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))
{