fix map icons for maps that dont use the maps/thumb/ folder

This commit is contained in:
edshot99 2024-03-25 02:30:11 -05:00
parent d4981eefa9
commit 611419e837

View File

@ -14,6 +14,8 @@ maps.list:AddColumn( "Map Name" )
maps.list.OnRowSelected = function( self, LineID, Line )
if ( ULib.fileExists( "maps/thumb/" .. maps.list:GetSelected()[1]:GetColumnText(1) .. ".png" ) ) then
maps.disp:SetMaterial( Material( "maps/thumb/" .. maps.list:GetSelected()[1]:GetColumnText(1) .. ".png" ) )
elseif ( ULib.fileExists( "maps/" .. maps.list:GetSelected()[1]:GetColumnText(1) .. ".png" ) ) then
maps.disp:SetMaterial( Material( "maps/" .. maps.list:GetSelected()[1]:GetColumnText(1) .. ".png" ) )
else
maps.disp:SetMaterial( Material( "maps/thumb/noicon.png" ) )
end