From 67d002f62b2cba6b37afe4f961d879f066d1a12b Mon Sep 17 00:00:00 2001 From: Chris Angelico Date: Sat, 6 Oct 2012 00:18:04 +1000 Subject: [PATCH 2/5] Disable the 'Borrow' button when current loan exceeds max loan --- src/company_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/company_gui.cpp b/src/company_gui.cpp index e78aef4..fa107ef 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -414,7 +414,7 @@ struct CompanyFinancesWindow : Window { } const Company *c = Company::Get(company); - this->SetWidgetDisabledState(WID_CF_INCREASE_LOAN, c->current_loan == _economy.max_loan); // Borrow button only shows when there is any more money to loan. + this->SetWidgetDisabledState(WID_CF_INCREASE_LOAN, c->current_loan >= _economy.max_loan); // Borrow button only shows when there is any more money to loan. this->SetWidgetDisabledState(WID_CF_REPAY_LOAN, company != _local_company || c->current_loan == 0); // Repay button only shows when there is any more money to repay. } -- 1.7.9.GIT