Changeset - r26385:ee6e2dc31b36
[Not reviewed]
master
0 2 0
Tyler Trahan - 21 months ago 2022-09-21 10:38:03
tyler@tylertrahan.com
Fix #9989: Zero Net Profit is neither negative nor positive (#9991)
2 files changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/company_gui.cpp
Show inline comments
 
@@ -214,9 +214,11 @@ static void DrawCategories(const Rect &r
 
static void DrawPrice(Money amount, int left, int right, int top, TextColour colour)
 
{
 
	StringID str = STR_FINANCES_NEGATIVE_INCOME;
 
	if (amount < 0) {
 
	if (amount == 0) {
 
		str = STR_FINANCES_ZERO_INCOME;
 
	} else if (amount < 0) {
 
		amount = -amount;
 
		str++;
 
		str = STR_FINANCES_POSITIVE_INCOME;
 
	}
 
	SetDParam(0, amount);
 
	DrawString(left, right, top, str, colour, SA_RIGHT);
src/lang/english.txt
Show inline comments
 
@@ -3641,6 +3641,7 @@ STR_FINANCES_SECTION_LOAN_INTEREST      
 
STR_FINANCES_SECTION_OTHER                                      :{GOLD}Other
 

	
 
STR_FINANCES_NEGATIVE_INCOME                                    :-{CURRENCY_LONG}
 
STR_FINANCES_ZERO_INCOME                                        :{CURRENCY_LONG}
 
STR_FINANCES_POSITIVE_INCOME                                    :+{CURRENCY_LONG}
 
STR_FINANCES_NET_PROFIT                                         :{WHITE}Net Profit
 
STR_FINANCES_BANK_BALANCE_TITLE                                 :{WHITE}Bank Balance
0 comments (0 inline, 0 general)