mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-20 06:58:20 +00:00
Add greyed out demo icon for invalid or not loaded demos
This commit is contained in:
parent
f727199060
commit
5184cf5523
|
@ -1144,7 +1144,11 @@ void CMenus::RenderDemoList(CUIRect MainView)
|
||||||
FileIcon.Margin(2.0f, &FileIcon);
|
FileIcon.Margin(2.0f, &FileIcon);
|
||||||
FileIcon.x += 2.0f;
|
FileIcon.x += 2.0f;
|
||||||
|
|
||||||
DoIcon(IMAGE_FILEICONS, Item.m_IsDir ? SPRITE_FILE_FOLDER : SPRITE_FILE_DEMO1, &FileIcon);
|
ColorRGBA IconColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||||
|
if(!Item.m_IsDir && (!Item.m_InfosLoaded || !Item.m_Valid))
|
||||||
|
IconColor = ColorRGBA(0.6f, 0.6f, 0.6f, 1.0f); // not loaded
|
||||||
|
|
||||||
|
DoIcon(IMAGE_FILEICONS, Item.m_IsDir ? SPRITE_FILE_FOLDER : SPRITE_FILE_DEMO1, &FileIcon, &IconColor);
|
||||||
|
|
||||||
for(int c = 0; c < NumCols; c++)
|
for(int c = 0; c < NumCols; c++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue