improve alert tooltip, see #2353

This was SVN commit r14684.
This commit is contained in:
mimo 2014-01-26 18:17:13 +00:00
parent 9ed11bc404
commit 3e1fc74add

View File

@ -357,18 +357,24 @@ function getEntityCommandsList(entState)
if(entState.alertRaiser) if(entState.alertRaiser)
{ {
if(entState.alertRaiser.canIncreaseLevel) if(entState.alertRaiser.canIncreaseLevel)
{
if(entState.alertRaiser.hasRaisedAlert)
var tooltip = "Increase the alert level to protect more units";
else
var tooltip = "Raise an alert!";
commands.push({ commands.push({
"name": "increase-alert-level", "name": "increase-alert-level",
"tooltip": "Raise the alert ! Or raise it again to protect more units.", "tooltip": tooltip,
"icon": "bell_level1.png" "icon": "bell_level1.png"
}); });
}
if(entState.alertRaiser.hasRaisedAlert) if(entState.alertRaiser.hasRaisedAlert)
commands.push({ commands.push({
"name": "alert-end", "name": "alert-end",
"tooltip": "End of alert.", "tooltip": "End of alert.",
"icon": "bell_level0.png" "icon": "bell_level0.png"
}); });
} }
return commands; return commands;