forked from 0ad/0ad
Revert 9846f374a0
as it doesn't work with the packaged version, refs #4313, because that comes with DDS files instead of PNGs and FileExists does not translate that like the sprite attribute does.
This was SVN commit r18905.
This commit is contained in:
parent
661cb8c932
commit
b83168cfbf
@ -31,10 +31,9 @@ function getMapDescriptionAndPreview(mapType, mapName)
|
||||
*/
|
||||
function setMapPreviewImage(guiObject, filename)
|
||||
{
|
||||
let path = "session/icons/mappreview/";
|
||||
Engine.GetGUIObjectByName(guiObject).sprite =
|
||||
"cropped:" + 400/512 + "," + 300/512 + ":" +
|
||||
path + (Engine.FileExists("art/textures/ui/" + path + filename) ? filename : "nopreview.png");
|
||||
"session/icons/mappreview/" + filename;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user