Changeset - r23322:c1e1504ca6f1
[Not reviewed]
master
0 2 0
glx - 6 years ago 2019-02-16 17:37:00
glx@openttd.org
Fix: use more descriptive "spectator" strings for story book and goal dropdown menus
2 files changed with 25 insertions and 20 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -2098,13 +2098,12 @@ STR_NETWORK_CLIENTLIST_SPEAK_TO_CLIENT  
 

	
 
STR_NETWORK_SERVER                                              :Server
 
STR_NETWORK_CLIENT                                              :Client
 
STR_NETWORK_SPECTATORS                                          :Spectators
 

	
 
STR_NETWORK_GIVE_MONEY_CAPTION                                  :{WHITE}Enter the amount of money you want to give
 
STR_NETWORK_TOOLBAR_LIST_SPECTATOR                              :{BLACK}Spectator
 

	
 
# Network set password
 
STR_COMPANY_PASSWORD_CANCEL                                     :{BLACK}Do not save the entered password
 
STR_COMPANY_PASSWORD_OK                                         :{BLACK}Give the company the new password
 
STR_COMPANY_PASSWORD_CAPTION                                    :{WHITE}Company password
 
STR_COMPANY_PASSWORD_MAKE_DEFAULT                               :{BLACK}Default company password
 
@@ -3109,12 +3108,13 @@ STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_NEW_B
 
STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_EXCLUSIVE_TRANSPORT          :{YELLOW}Buy 1 year's exclusive transport rights in town. Town authority will only allow passengers and cargo to use your company's stations.{}Cost: {CURRENCY_LONG}
 
STR_LOCAL_AUTHORITY_ACTION_TOOLTIP_BRIBE                        :{YELLOW}Bribe the local authority to increase your rating, at the risk of a severe penalty if caught.{}Cost: {CURRENCY_LONG}
 

	
 
# Goal window
 
STR_GOALS_CAPTION                                               :{WHITE}{COMPANY} Goals
 
STR_GOALS_SPECTATOR_CAPTION                                     :{WHITE}Global Goals
 
STR_GOALS_SPECTATOR                                             :Global Goals
 
STR_GOALS_GLOBAL_TITLE                                          :{BLACK}Global goals:
 
STR_GOALS_TEXT                                                  :{ORANGE}{RAW_STRING}
 
STR_GOALS_NONE                                                  :{ORANGE}- None -
 
STR_GOALS_SPECTATOR_NONE                                        :{ORANGE}- Not applicable -
 
STR_GOALS_PROGRESS                                              :{ORANGE}{RAW_STRING}
 
STR_GOALS_PROGRESS_COMPLETE                                     :{GREEN}{RAW_STRING}
 
@@ -3157,12 +3157,13 @@ STR_SUBSIDIES_SUBSIDISED_TITLE          
 
STR_SUBSIDIES_SUBSIDISED_FROM_TO                                :{ORANGE}{STRING} from {STRING2} to {STRING2}{YELLOW} ({COMPANY}{YELLOW}, until {DATE_SHORT})
 
STR_SUBSIDIES_TOOLTIP_CLICK_ON_SERVICE_TO_CENTER                :{BLACK}Click on service to centre main view on industry/town. Ctrl+Click opens a new viewport on industry/town location
 

	
 
# Story book window
 
STR_STORY_BOOK_CAPTION                                          :{WHITE}{COMPANY} Story Book
 
STR_STORY_BOOK_SPECTATOR_CAPTION                                :{WHITE}Global Story Book
 
STR_STORY_BOOK_SPECTATOR                                        :Global Story Book
 
STR_STORY_BOOK_TITLE                                            :{YELLOW}{RAW_STRING}
 
STR_STORY_BOOK_GENERIC_PAGE_ITEM                                :Page {NUM}
 
STR_STORY_BOOK_SEL_PAGE_TOOLTIP                                 :{BLACK}Jump to a specific page by selecting it in this drop down list.
 
STR_STORY_BOOK_PREV_PAGE                                        :{BLACK}Previous
 
STR_STORY_BOOK_PREV_PAGE_TOOLTIP                                :{BLACK}Go to previous page
 
STR_STORY_BOOK_NEXT_PAGE                                        :{BLACK}Next
src/toolbar_gui.cpp
Show inline comments
 
@@ -217,36 +217,40 @@ static const int CTMN_SPECTATOR   = -4; 
 
 * Pop up a generic company list menu.
 
 * @param w The toolbar window.
 
 * @param widget The button widget id.
 
 * @param grey A bitbask of which items to mark as disabled.
 
 * @param include_spectator If true, a spectator option is included in the list.
 
 */
 
static void PopupMainCompanyToolbMenu(Window *w, int widget, int grey = 0, bool include_spectator = false)
 
static void PopupMainCompanyToolbMenu(Window *w, int widget, int grey = 0)
 
{
 
	DropDownList *list = new DropDownList();
 

	
 
	switch (widget) {
 
		case WID_TN_COMPANIES:
 
#ifdef ENABLE_NETWORK
 
	if (_networking) {
 
		if (widget == WID_TN_COMPANIES) {
 
			if (!_networking) break;
 

	
 
			/* Add the client list button for the companies menu */
 
			*list->Append() = new DropDownListStringItem(STR_NETWORK_COMPANY_LIST_CLIENT_LIST, CTMN_CLIENT_LIST, false);
 
		}
 

	
 
			if (_local_company == COMPANY_SPECTATOR) {
 
				*list->Append() = new DropDownListStringItem(STR_NETWORK_COMPANY_LIST_NEW_COMPANY, CTMN_NEW_COMPANY, NetworkMaxCompaniesReached());
 
			} else {
 
				*list->Append() = new DropDownListStringItem(STR_NETWORK_COMPANY_LIST_SPECTATE, CTMN_SPECTATE, NetworkMaxSpectatorsReached());
 
			}
 
#endif /* ENABLE_NETWORK */
 
			break;
 

	
 
		if (include_spectator) {
 
			if (widget == WID_TN_COMPANIES) {
 
				if (_local_company == COMPANY_SPECTATOR) {
 
					*list->Append() = new DropDownListStringItem(STR_NETWORK_COMPANY_LIST_NEW_COMPANY, CTMN_NEW_COMPANY, NetworkMaxCompaniesReached());
 
				} else {
 
					*list->Append() = new DropDownListStringItem(STR_NETWORK_COMPANY_LIST_SPECTATE, CTMN_SPECTATE, NetworkMaxSpectatorsReached());
 
				}
 
			} else {
 
				*list->Append() = new DropDownListStringItem(STR_NETWORK_TOOLBAR_LIST_SPECTATOR, CTMN_SPECTATOR, false);
 
			}
 
		}
 
		case WID_TN_STORY:
 
			*list->Append() = new DropDownListStringItem(STR_STORY_BOOK_SPECTATOR, CTMN_SPECTATOR, false);
 
			break;
 

	
 
		case WID_TN_GOAL:
 
			*list->Append() = new DropDownListStringItem(STR_GOALS_SPECTATOR, CTMN_SPECTATOR, false);
 
			break;
 
	}
 
#endif /* ENABLE_NETWORK */
 

	
 
	for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
 
		if (!Company::IsValidID(c)) continue;
 
		*list->Append() = new DropDownListCompanyItem(c, false, HasBit(grey, c));
 
	}
 

	
 
@@ -594,13 +598,13 @@ static CallBackFunction MenuClickFinance
 
}
 

	
 
/* --- Company's button menu --- */
 

	
 
static CallBackFunction ToolbarCompaniesClick(Window *w)
 
{
 
	PopupMainCompanyToolbMenu(w, WID_TN_COMPANIES, 0, true);
 
	PopupMainCompanyToolbMenu(w, WID_TN_COMPANIES, 0);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Company menu.
 
 *
 
@@ -640,13 +644,13 @@ static CallBackFunction MenuClickCompany
 
}
 

	
 
/* --- Story button menu --- */
 

	
 
static CallBackFunction ToolbarStoryClick(Window *w)
 
{
 
	PopupMainCompanyToolbMenu(w, WID_TN_STORY, 0, true);
 
	PopupMainCompanyToolbMenu(w, WID_TN_STORY, 0);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Story menu
 
 *
 
@@ -660,13 +664,13 @@ static CallBackFunction MenuClickStory(i
 
}
 

	
 
/* --- Goal button menu --- */
 

	
 
static CallBackFunction ToolbarGoalClick(Window *w)
 
{
 
	PopupMainCompanyToolbMenu(w, WID_TN_GOAL, 0, true);
 
	PopupMainCompanyToolbMenu(w, WID_TN_GOAL, 0);
 
	return CBF_NONE;
 
}
 

	
 
/**
 
 * Handle click on the entry in the Goal menu
 
 *
0 comments (0 inline, 0 general)