@@ -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" $/min" ));
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,12 +6314,14 @@ 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];
@@ -6350,6 +6354,9 @@ void InGameUI::drawPlayerInfoList()
63506354 Int labelX = baseX;
63516355 for (column = 0 ; column < PlayerInfoList::LabelType_Count; ++column)
63526356 {
6357+ if (!showMoneyPerMinute && column == PlayerInfoList::LabelType_MoneyPerMinute)
6358+ continue ;
6359+
63536360 labelWidths[column] = m_playerInfoList.labels [column]->getWidth ();
63546361 columnLabelX[column] = labelX;
63556362 labelX += labelWidths[column] + maxValueWidths[column] + columnGap;
@@ -6362,6 +6369,9 @@ void InGameUI::drawPlayerInfoList()
63626369
63636370 for (column = 0 ; column < PlayerInfoList::LabelType_Count; ++column)
63646371 {
6372+ if (!showMoneyPerMinute && column == PlayerInfoList::LabelType_MoneyPerMinute)
6373+ continue ;
6374+
63656375 m_playerInfoList.labels [column]->draw (columnLabelX[column], drawY, m_playerInfoListLabelColor, m_playerInfoListDropColor);
63666376 m_playerInfoList.values [column][row]->draw (columnLabelX[column] + labelWidths[column], drawY, m_playerInfoListValueColor, m_playerInfoListDropColor);
63676377 }
0 commit comments