mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-18 22:56:58 +00:00
Fix GUI errors on broken entities with no icons. Delete some bogus icon sheet references.
This was SVN commit r7905.
This commit is contained in:
@@ -111,8 +111,16 @@ function displayGeneralInfo(playerState, entState, template)
|
||||
}
|
||||
|
||||
// Icon
|
||||
getGUIObjectByName("sdIconImage").sprite = template.icon_sheet;
|
||||
getGUIObjectByName("sdIconImage").cell_id = template.icon_cell;
|
||||
if (template.icon_sheet && typeof template.icon_cell != "undefined")
|
||||
{
|
||||
getGUIObjectByName("sdIconImage").sprite = template.icon_sheet;
|
||||
getGUIObjectByName("sdIconImage").cell_id = template.icon_cell;
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: we should require all entities to have icons, so this case never occurs
|
||||
getGUIObjectByName("sdIconImage").sprite = "bkFillBlack";
|
||||
}
|
||||
getGUIObjectByName("sdIcon").tooltip = iconTooltip;
|
||||
//getGUIObjectByName("sdIconOutline"); // Need to change color of icon outline with the playerColor
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<Entity parent="template_entity_full">
|
||||
<Identity>
|
||||
<GenericName>Structure</GenericName>
|
||||
<IconSheet>PortraitSheet</IconSheet>
|
||||
</Identity>
|
||||
<BuildRestrictions>
|
||||
<PlacementType>standard</PlacementType>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<Entity parent="template_entity_full">
|
||||
<Identity>
|
||||
<GenericName>Unit</GenericName>
|
||||
<IconSheet>PortraitSheet</IconSheet>
|
||||
</Identity>
|
||||
<Minimap>
|
||||
<Type>unit</Type>
|
||||
|
||||
Reference in New Issue
Block a user