@@ -1007,6 +1007,7 @@ void InGameUI::PlayerInfoList::init(const AsciiString &fontName, Int pointSize,
10071007
10081008 labels[LabelType_Team]->setText (TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:PlayerInfoListLabelTeam" , L" T" ));
10091009 labels[LabelType_Money]->setText (TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:PlayerInfoListLabelMoney" , L" $" ));
1010+ labels[LabelType_MoneyPerMinute]->setText (TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:PlayerInfoListLabelMoneyPerMinute" , L" +" ));
10101011 labels[LabelType_Rank]->setText (TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:PlayerInfoListLabelRank" , L" *" ));
10111012 labels[LabelType_Xp]->setText (TheGameText->FETCH_OR_SUBSTITUTE_FORMAT (" GUI:PlayerInfoListLabelXp" , L" XP" ));
10121013}
@@ -6298,6 +6299,7 @@ void InGameUI::drawPlayerInfoList()
62986299 Int maxValueWidths[PlayerInfoList::LabelType_Count] = {0 };
62996300 Color rowColors[MAX_PLAYER_COUNT ] = {0 };
63006301 Int nameValueWidth[MAX_PLAYER_COUNT ] = {0 };
6302+ const Bool showMoneyPerMinute = TheGlobalData->m_showMoneyPerMinute ;
63016303 Int column;
63026304
63036305 for (Int slotIndex = 0 ; slotIndex < MAX_SLOTS && rowCount < MAX_PLAYER_COUNT ; ++slotIndex)
@@ -6312,18 +6314,27 @@ void InGameUI::drawPlayerInfoList()
63126314
63136315 const Int row = rowCount++;
63146316 const UnsignedInt teamValue = (slot && slot->getTeamNumber () >= 0 ) ? static_cast <UnsignedInt>(slot->getTeamNumber () + 1 ) : 0 ;
6315- const UnsignedInt moneyValue = player->getMoney ()->countMoney ();
6317+ const Money *money = player->getMoney ();
6318+ const UnsignedInt moneyValue = money->countMoney ();
6319+ const UnsignedInt moneyPerMinuteValue = money->getCashPerMinute ();
63166320 const UnsignedInt rankValue = static_cast <UnsignedInt>(player->getRankLevel ());
63176321 const UnsignedInt xpValue = static_cast <UnsignedInt>(player->getSkillPoints ());
63186322 const UnicodeString nameValue = player->getPlayerDisplayName ();
63196323
6320- const UnsignedInt currentValues[] = {teamValue, moneyValue, rankValue, xpValue};
6324+ const UnsignedInt currentValues[] = {teamValue, moneyValue, moneyPerMinuteValue, rankValue, xpValue};
63216325 for (column = 0 ; column < ARRAY_SIZE (currentValues); ++column)
63226326 {
63236327 UnsignedInt &lastValue = m_playerInfoList.lastValues .values [column][row];
63246328 if (lastValue != currentValues[column])
63256329 {
6326- playerInfoListValue.format (L" %u" , currentValues[column]);
6330+ if (column == PlayerInfoList::ValueType_MoneyPerMinute)
6331+ {
6332+ playerInfoListValue = formatIncomeValue (currentValues[column]);
6333+ }
6334+ else
6335+ {
6336+ playerInfoListValue.format (L" %u" , currentValues[column]);
6337+ }
63276338 m_playerInfoList.values [column][row]->setText (playerInfoListValue);
63286339 lastValue = currentValues[column];
63296340 }
@@ -6350,6 +6361,9 @@ void InGameUI::drawPlayerInfoList()
63506361 Int labelX = baseX;
63516362 for (column = 0 ; column < PlayerInfoList::LabelType_Count; ++column)
63526363 {
6364+ if (!showMoneyPerMinute && column == PlayerInfoList::LabelType_MoneyPerMinute)
6365+ continue ;
6366+
63536367 labelWidths[column] = m_playerInfoList.labels [column]->getWidth ();
63546368 columnLabelX[column] = labelX;
63556369 labelX += labelWidths[column] + maxValueWidths[column] + columnGap;
@@ -6362,6 +6376,9 @@ void InGameUI::drawPlayerInfoList()
63626376
63636377 for (column = 0 ; column < PlayerInfoList::LabelType_Count; ++column)
63646378 {
6379+ if (!showMoneyPerMinute && column == PlayerInfoList::LabelType_MoneyPerMinute)
6380+ continue ;
6381+
63656382 m_playerInfoList.labels [column]->draw (columnLabelX[column], drawY, m_playerInfoListLabelColor, m_playerInfoListDropColor);
63666383 m_playerInfoList.values [column][row]->draw (columnLabelX[column] + labelWidths[column], drawY, m_playerInfoListValueColor, m_playerInfoListDropColor);
63676384 }
0 commit comments