Enabled template tooltips
This was SVN commit r7988.
This commit is contained in:
parent
f64e4c71cf
commit
7a2fac889f
@ -50,6 +50,10 @@ function displayGeneralInfo(entState, template)
|
||||
else
|
||||
getGUIObjectByName("sdSpecific").tooltip = "";
|
||||
|
||||
// Tooltip info
|
||||
if (template.tooltip)
|
||||
iconTooltip += " - [font=\"serif-13\"]" + template.tooltip + "[/font]";
|
||||
|
||||
// Player Name
|
||||
getGUIObjectByName("sdPlayer").caption = g_Players[entState.player].name;
|
||||
getGUIObjectByName("sdPlayer").tooltip = getFormalCivName(civName);
|
||||
|
@ -94,7 +94,12 @@ function setupUnitPanel(guiName, usedPanels, unitEntState, items, callback)
|
||||
break;
|
||||
|
||||
case TRAINING:
|
||||
var tooltip = getEntityNameWithGenericType(template) + "\n" + getEntityCost(template);
|
||||
var tooltip = getEntityNameWithGenericType(template);
|
||||
if (template.tooltip)
|
||||
tooltip += "\n[font=\"serif-13\"]" + template.tooltip + "[/font]";
|
||||
|
||||
tooltip += "\n" + getEntityCost(template);
|
||||
|
||||
var [batchSize, batchIncrement] = getTrainingQueueBatchStatus(unitEntState.id, entType);
|
||||
if (batchSize)
|
||||
{
|
||||
@ -104,7 +109,11 @@ function setupUnitPanel(guiName, usedPanels, unitEntState, items, callback)
|
||||
break;
|
||||
|
||||
case CONSTRUCTION:
|
||||
var tooltip = getEntityNameWithGenericType(template) + "\n" + getEntityCost(template);
|
||||
var tooltip = getEntityNameWithGenericType(template);
|
||||
if (template.tooltip)
|
||||
tooltip += "\n[font=\"serif-13\"]" + template.tooltip + "[/font]";
|
||||
|
||||
tooltip += "\n" + getEntityCost(template);
|
||||
break;
|
||||
|
||||
case COMMAND:
|
||||
|
@ -61,7 +61,7 @@ GuiInterface.prototype.GetEntityState = function(player, ent)
|
||||
if (cmpIdentity)
|
||||
{
|
||||
ret.identity = {
|
||||
"classes": cmpIdentity.GetClassesList(),
|
||||
"classes": cmpIdentity.GetClassesList()
|
||||
};
|
||||
}
|
||||
|
||||
@ -162,6 +162,7 @@ GuiInterface.prototype.GetTemplateData = function(player, name)
|
||||
};
|
||||
ret.icon_sheet = template.Identity.IconSheet;
|
||||
ret.icon_cell = template.Identity.IconCell;
|
||||
ret.tooltip = template.Identity.Tooltip;
|
||||
}
|
||||
|
||||
if (template.Cost)
|
||||
|
@ -93,6 +93,13 @@ Identity.prototype.GetCiv = function()
|
||||
return this.template.Civ;
|
||||
};
|
||||
|
||||
Identity.prototype.GetTooltip= function()
|
||||
{
|
||||
if (this.template.Tooltip)
|
||||
return this.template.Tooltip;
|
||||
return "";
|
||||
};
|
||||
|
||||
Identity.prototype.GetClassesList = function()
|
||||
{
|
||||
if (this.template.Classes)
|
||||
|
Loading…
Reference in New Issue
Block a user