|
|
@ -529,7 +529,7 @@ static void MenuClickLeague(int index)
|
|
|
|
static void ToolbarIndustryClick(Window *w)
|
|
|
|
static void ToolbarIndustryClick(Window *w)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* Disable build-industry menu if we are a spectator */
|
|
|
|
/* Disable build-industry menu if we are a spectator */
|
|
|
|
PopupMainToolbMenu(w, TBN_INDUSTRIES, STR_INDUSTRY_DIR, (_current_company == COMPANY_SPECTATOR) ? 1 : 2);
|
|
|
|
PopupMainToolbMenu(w, TBN_INDUSTRIES, STR_INDUSTRY_DIR, (_local_company == COMPANY_SPECTATOR) ? 1 : 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void MenuClickIndustry(int index)
|
|
|
|
static void MenuClickIndustry(int index)
|
|
|
@ -1035,7 +1035,7 @@ struct MainToolbarWindow : Window {
|
|
|
|
/* If spectator, disable all construction buttons
|
|
|
|
/* If spectator, disable all construction buttons
|
|
|
|
* ie : Build road, rail, ships, airports and landscaping
|
|
|
|
* ie : Build road, rail, ships, airports and landscaping
|
|
|
|
* Since enabled state is the default, just disable when needed */
|
|
|
|
* Since enabled state is the default, just disable when needed */
|
|
|
|
this->SetWidgetsDisabledState(_current_company == COMPANY_SPECTATOR, TBN_RAILS, TBN_ROADS, TBN_WATER, TBN_AIR, TBN_LANDSCAPE, WIDGET_LIST_END);
|
|
|
|
this->SetWidgetsDisabledState(_local_company == COMPANY_SPECTATOR, TBN_RAILS, TBN_ROADS, TBN_WATER, TBN_AIR, TBN_LANDSCAPE, WIDGET_LIST_END);
|
|
|
|
/* disable company list drop downs, if there are no companies */
|
|
|
|
/* disable company list drop downs, if there are no companies */
|
|
|
|
this->SetWidgetsDisabledState(ActiveCompanyCount() == TBN_PAUSE, TBN_STATIONS, TBN_FINANCES, TBN_TRAINS, TBN_ROADVEHS, TBN_SHIPS, TBN_AIRCRAFTS, WIDGET_LIST_END);
|
|
|
|
this->SetWidgetsDisabledState(ActiveCompanyCount() == TBN_PAUSE, TBN_STATIONS, TBN_FINANCES, TBN_TRAINS, TBN_ROADVEHS, TBN_SHIPS, TBN_AIRCRAFTS, WIDGET_LIST_END);
|
|
|
|
|
|
|
|
|
|
|
|