Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/menu.js
Show First 20 Lines • Show All 921 Lines • ▼ Show 20 Lines | active || inactive ? | ||||
), | ), | ||||
{ "numberGarrisoned": garrisoned } | { "numberGarrisoned": garrisoned } | ||||
); | ); | ||||
return sprintf(message, { | return sprintf(message, { | ||||
"openingTradingString": activeString, | "openingTradingString": activeString, | ||||
"openingGarrisonedString": garrisonedString, | "openingGarrisonedString": garrisonedString, | ||||
"garrisonedString": garrisonedString, | "garrisonedString": garrisonedString, | ||||
"inactiveString": coloredText(inactiveString, g_IdleTraderTextColor) | "inactiveString": setColor(inactiveString, g_IdleTraderTextColor) | ||||
}); | }); | ||||
} | } | ||||
function getIdleShipTradersText(traderNumber) | function getIdleShipTradersText(traderNumber) | ||||
{ | { | ||||
let active = traderNumber.shipTrader.trading; | let active = traderNumber.shipTrader.trading; | ||||
let inactive = traderNumber.shipTrader.total - active; | let inactive = traderNumber.shipTrader.total - active; | ||||
Show All 31 Lines | active ? | ||||
"%(numberOfShipTraders)s merchant ships inactive", | "%(numberOfShipTraders)s merchant ships inactive", | ||||
inactive | inactive | ||||
), | ), | ||||
{ "numberOfShipTraders": inactive } | { "numberOfShipTraders": inactive } | ||||
); | ); | ||||
return sprintf(message, { | return sprintf(message, { | ||||
"openingTradingString": activeString, | "openingTradingString": activeString, | ||||
"inactiveString": coloredText(inactiveString, g_IdleTraderTextColor) | "inactiveString": setColor(inactiveString, g_IdleTraderTextColor) | ||||
}); | }); | ||||
} | } | ||||
function closeTrade() | function closeTrade() | ||||
{ | { | ||||
g_IsTradeOpen = false; | g_IsTradeOpen = false; | ||||
Engine.GetGUIObjectByName("tradeDialogPanel").hidden = true; | Engine.GetGUIObjectByName("tradeDialogPanel").hidden = true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 253 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator