Changeset - r17569:79cc833a8f35
[Not reviewed]
src/ai/ai_gui.cpp
Show inline comments
 
@@ -394,13 +394,13 @@ struct AISettingsWindow : public Window 
 

	
 
					this->CheckDifficultyLevel();
 
				} else if (!bool_item) {
 
					/* Display a query box so users can enter a custom value. */
 
					this->clicked_row = num;
 
					SetDParam(0, this->ai_config->GetSetting(config_item.name));
 
					ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, 10, 100, this, CS_NUMERAL, QSF_NONE);
 
					ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, 10, this, CS_NUMERAL, QSF_NONE);
 
				}
 

	
 
				this->SetDirty();
 
				break;
 
			}
 

	
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -1208,13 +1208,13 @@ struct BuildVehicleWindow : Window {
 

	
 
			case BUILD_VEHICLE_WIDGET_RENAME: {
 
				EngineID sel_eng = this->sel_engine;
 
				if (sel_eng != INVALID_ENGINE) {
 
					this->rename_engine = sel_eng;
 
					SetDParam(0, sel_eng);
 
					ShowQueryString(STR_ENGINE_NAME, STR_QUERY_RENAME_TRAIN_TYPE_CAPTION + this->vehicle_type, MAX_LENGTH_ENGINE_NAME_CHARS, MAX_LENGTH_ENGINE_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
					ShowQueryString(STR_ENGINE_NAME, STR_QUERY_RENAME_TRAIN_TYPE_CAPTION + this->vehicle_type, MAX_LENGTH_ENGINE_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				}
 
				break;
 
			}
 
		}
 
	}
 

	
src/cheat_gui.cpp
Show inline comments
 
@@ -331,13 +331,13 @@ struct CheatWindow : Window {
 
		int value = (int32)ReadValue(ce->variable, ce->type);
 
		int oldvalue = value;
 

	
 
		if (btn == CHT_CHANGE_DATE && x >= 40) {
 
			/* Click at the date text directly. */
 
			SetDParam(0, value);
 
			ShowQueryString(STR_JUST_INT, STR_CHEAT_CHANGE_DATE_QUERY_CAPT, 8, 100, this, CS_NUMERAL, QSF_ACCEPT_UNCHANGED);
 
			ShowQueryString(STR_JUST_INT, STR_CHEAT_CHANGE_DATE_QUERY_CAPT, 8, this, CS_NUMERAL, QSF_ACCEPT_UNCHANGED);
 
			return;
 
		}
 

	
 
		/* Not clicking a button? */
 
		if (!IsInsideMM(x, 20, 40)) return;
 

	
src/company_gui.cpp
Show inline comments
 
@@ -1452,13 +1452,13 @@ public:
 
				this->SetDirty();
 
				break;
 

	
 
			/* 'Company manager face number' button, view and/or set company manager face number */
 
			case SCMFW_WIDGET_FACECODE:
 
				SetDParam(0, this->face);
 
				ShowQueryString(STR_JUST_INT, STR_FACE_FACECODE_CAPTION, 10 + 1, 0, this, CS_NUMERAL, QSF_NONE);
 
				ShowQueryString(STR_JUST_INT, STR_FACE_FACECODE_CAPTION, 10 + 1, this, CS_NUMERAL, QSF_NONE);
 
				break;
 

	
 
			/* Save button */
 
			case SCMFW_WIDGET_SAVE:
 
				_company_manager_face = this->face;
 
				ShowErrorMessage(STR_FACE_SAVE_DONE, INVALID_STRING_ID, WL_INFO);
 
@@ -1949,19 +1949,19 @@ struct CompanyWindow : Window
 
				new SelectCompanyLiveryWindow(&_select_company_livery_desc, (CompanyID)this->window_number);
 
				break;
 

	
 
			case CW_WIDGET_PRESIDENT_NAME:
 
				this->query_widget = CW_WIDGET_PRESIDENT_NAME;
 
				SetDParam(0, this->window_number);
 
				ShowQueryString(STR_PRESIDENT_NAME, STR_COMPANY_VIEW_PRESIDENT_S_NAME_QUERY_CAPTION, MAX_LENGTH_PRESIDENT_NAME_CHARS, MAX_LENGTH_PRESIDENT_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				ShowQueryString(STR_PRESIDENT_NAME, STR_COMPANY_VIEW_PRESIDENT_S_NAME_QUERY_CAPTION, MAX_LENGTH_PRESIDENT_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				break;
 

	
 
			case CW_WIDGET_COMPANY_NAME:
 
				this->query_widget = CW_WIDGET_COMPANY_NAME;
 
				SetDParam(0, this->window_number);
 
				ShowQueryString(STR_COMPANY_NAME, STR_COMPANY_VIEW_COMPANY_NAME_QUERY_CAPTION, MAX_LENGTH_COMPANY_NAME_CHARS, MAX_LENGTH_COMPANY_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				ShowQueryString(STR_COMPANY_NAME, STR_COMPANY_VIEW_COMPANY_NAME_QUERY_CAPTION, MAX_LENGTH_COMPANY_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				break;
 

	
 
			case CW_WIDGET_VIEW_HQ: {
 
				TileIndex tile = Company::Get((CompanyID)this->window_number)->location_of_HQ;
 
				if (_ctrl_pressed) {
 
					ShowExtraViewPortWindow(tile);
 
@@ -2004,13 +2004,13 @@ struct CompanyWindow : Window
 
				CompanyID company = (CompanyID)this->window_number;
 
				if (_network_server) {
 
					NetworkServerDoMove(CLIENT_ID_SERVER, company);
 
					MarkWholeScreenDirty();
 
				} else if (NetworkCompanyIsPassworded(company)) {
 
					/* ask for the password */
 
					ShowQueryString(STR_EMPTY, STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION, NETWORK_PASSWORD_LENGTH, 180, this, CS_ALPHANUMERAL, QSF_NONE);
 
					ShowQueryString(STR_EMPTY, STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION, NETWORK_PASSWORD_LENGTH, this, CS_ALPHANUMERAL, QSF_NONE);
 
				} else {
 
					/* just send the join command */
 
					NetworkClientRequestMove(company);
 
				}
 
				break;
 
			}
src/company_type.h
Show inline comments
 
@@ -34,18 +34,16 @@ enum Owner {
 
	COMPANY_INACTIVE_CLIENT = 253, ///< The client is joining
 
	COMPANY_NEW_COMPANY     = 254, ///< The client wants a new company
 
	COMPANY_SPECTATOR       = 255, ///< The client is spectating
 
};
 
DECLARE_POSTFIX_INCREMENT(Owner)
 

	
 
static const uint MAX_LENGTH_PRESIDENT_NAME_CHARS  =  32; ///< The maximum length of a president name in characters including '\0'
 
static const uint MAX_LENGTH_PRESIDENT_NAME_PIXELS =  94; ///< The maximum length of a president name in pixels
 
static const uint MAX_LENGTH_COMPANY_NAME_CHARS    =  32; ///< The maximum length of a company name in characters including '\0'
 
static const uint MAX_LENGTH_COMPANY_NAME_PIXELS   = 150; ///< The maximum length of a company name in pixels
 
static const uint MAX_LENGTH_PRESIDENT_NAME_CHARS = 32; ///< The maximum length of a president name in characters including '\0'
 
static const uint MAX_LENGTH_COMPANY_NAME_CHARS   = 32; ///< The maximum length of a company name in characters including '\0'
 

	
 
static const uint MAX_HISTORY_MONTHS               =  24; ///< The maximum number of months kept as performance's history
 
static const uint MAX_HISTORY_MONTHS              = 24; ///< The maximum number of months kept as performance's history
 

	
 
/** Define basic enum properties */
 
template <> struct EnumPropsT<Owner> : MakeEnumPropsT<Owner, byte, OWNER_BEGIN, OWNER_END, INVALID_OWNER> {};
 
typedef TinyEnumT<Owner> OwnerByte;
 

	
 
typedef Owner CompanyID;
src/depot_gui.cpp
Show inline comments
 
@@ -729,13 +729,13 @@ struct DepotWindow : Window {
 
				}
 
				break;
 

	
 
			case DEPOT_WIDGET_RENAME: // Rename button
 
				SetDParam(0, this->type);
 
				SetDParam(1, Depot::GetByTile((TileIndex)this->window_number)->index);
 
				ShowQueryString(STR_DEPOT_NAME, STR_DEPOT_RENAME_DEPOT_CAPTION, MAX_LENGTH_DEPOT_NAME_CHARS, MAX_LENGTH_DEPOT_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				ShowQueryString(STR_DEPOT_NAME, STR_DEPOT_RENAME_DEPOT_CAPTION, MAX_LENGTH_DEPOT_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				break;
 

	
 
			case DEPOT_WIDGET_STOP_ALL:
 
			case DEPOT_WIDGET_START_ALL: {
 
				VehicleListIdentifier vli(VL_DEPOT_LIST, this->type, this->owner);
 
				DoCommandP(this->window_number, (widget == DEPOT_WIDGET_START_ALL ? (1 << 0) : 0), vli.Pack(), CMD_MASS_START_STOP);
src/depot_type.h
Show inline comments
 
@@ -12,10 +12,9 @@
 
#ifndef DEPOT_TYPE_H
 
#define DEPOT_TYPE_H
 

	
 
typedef uint16 DepotID;
 
struct Depot;
 

	
 
static const uint MAX_LENGTH_DEPOT_NAME_CHARS  =  32; ///< The maximum length of a depot name in characters including '\0'
 
static const uint MAX_LENGTH_DEPOT_NAME_PIXELS = 180; ///< The maximum length of a depot name in pixels
 
static const uint MAX_LENGTH_DEPOT_NAME_CHARS = 32; ///< The maximum length of a depot name in characters including '\0'
 

	
 
#endif /* DEPOT_TYPE_H */
src/engine_type.h
Show inline comments
 
@@ -151,12 +151,11 @@ enum EngineMiscFlags {
 
enum EngineFlags {
 
	ENGINE_AVAILABLE         = 1, ///< This vehicle is available to everyone.
 
	ENGINE_EXCLUSIVE_PREVIEW = 2, ///< This vehicle is in the exclusive preview stage, either being used or being offered to a company.
 
	ENGINE_OFFER_WINDOW_OPEN = 4, ///< The exclusive offer window is currently open for a company.
 
};
 

	
 
static const uint MAX_LENGTH_ENGINE_NAME_CHARS  =  32; ///< The maximum length of an engine name in characters including '\0'
 
static const uint MAX_LENGTH_ENGINE_NAME_PIXELS = 160; ///< The maximum length of an engine name in pixels
 
static const uint MAX_LENGTH_ENGINE_NAME_CHARS = 32; ///< The maximum length of an engine name in characters including '\0'
 

	
 
static const EngineID INVALID_ENGINE = 0xFFFF; ///< Constant denoting an invalid engine.
 

	
 
#endif /* ENGINE_TYPE_H */
src/genworld_gui.cpp
Show inline comments
 
@@ -630,13 +630,13 @@ struct GenerateLandscapeWindow : public 
 
				_left_button_clicked = false;
 
				break;
 

	
 
			case GLAND_START_DATE_TEXT: // Year text
 
				this->widget_id = GLAND_START_DATE_TEXT;
 
				SetDParam(0, _settings_newgame.game_creation.starting_year);
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_START_DATE_QUERY_CAPT, 8, 100, this, CS_NUMERAL, QSF_ENABLE_DEFAULT);
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_START_DATE_QUERY_CAPT, 8, this, CS_NUMERAL, QSF_ENABLE_DEFAULT);
 
				break;
 

	
 
			case GLAND_SNOW_LEVEL_DOWN:
 
			case GLAND_SNOW_LEVEL_UP: // Snow line buttons
 
				/* Don't allow too fast scrolling */
 
				if ((this->flags4 & WF_TIMEOUT_MASK) <= WF_TIMEOUT_TRIGGER) {
 
@@ -648,13 +648,13 @@ struct GenerateLandscapeWindow : public 
 
				_left_button_clicked = false;
 
				break;
 

	
 
			case GLAND_SNOW_LEVEL_TEXT: // Snow line text
 
				this->widget_id = GLAND_SNOW_LEVEL_TEXT;
 
				SetDParam(0, _settings_newgame.game_creation.snow_line_height);
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_SNOW_LINE_QUERY_CAPT, 3, 100, this, CS_NUMERAL, QSF_ENABLE_DEFAULT);
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_SNOW_LINE_QUERY_CAPT, 3, this, CS_NUMERAL, QSF_ENABLE_DEFAULT);
 
				break;
 

	
 
			case GLAND_TREE_PULLDOWN: // Tree placer
 
				ShowDropDownMenu(this, _tree_placer, _settings_newgame.game_creation.tree_placer, GLAND_TREE_PULLDOWN, 0, 0);
 
				break;
 

	
 
@@ -756,13 +756,13 @@ struct GenerateLandscapeWindow : public 
 
			case GLAND_HEIGHTMAP_ROTATION_PULLDOWN: _settings_newgame.game_creation.heightmap_rotation = index; break;
 

	
 
			case GLAND_TOWN_PULLDOWN:
 
				if ((uint)index == CUSTOM_TOWN_NUMBER_DIFFICULTY) {
 
					this->widget_id = widget;
 
					SetDParam(0, _settings_newgame.game_creation.custom_town_number);
 
					ShowQueryString(STR_JUST_INT, STR_MAPGEN_NUMBER_OF_TOWNS, 5, 50, this, CS_NUMERAL, QSF_NONE);
 
					ShowQueryString(STR_JUST_INT, STR_MAPGEN_NUMBER_OF_TOWNS, 5, this, CS_NUMERAL, QSF_NONE);
 
				}
 
				IConsoleSetSetting("difficulty.number_towns", index);
 
				break;
 

	
 
			case GLAND_INDUSTRY_PULLDOWN:
 
				IConsoleSetSetting("difficulty.industry_density", index);
 
@@ -777,13 +777,13 @@ struct GenerateLandscapeWindow : public 
 
			}
 

	
 
			case GLAND_WATER_PULLDOWN: {
 
				if ((uint)index == CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY) {
 
					this->widget_id = widget;
 
					SetDParam(0, _settings_newgame.game_creation.custom_sea_level);
 
					ShowQueryString(STR_JUST_INT, STR_MAPGEN_QUANTITY_OF_SEA_LAKES, 3, 50, this, CS_NUMERAL, QSF_NONE);
 
					ShowQueryString(STR_JUST_INT, STR_MAPGEN_QUANTITY_OF_SEA_LAKES, 3, this, CS_NUMERAL, QSF_NONE);
 
				}
 
				GameMode old_gm = _game_mode;
 
				_game_mode = GM_MENU;
 
				IConsoleSetSetting("difficulty.quantity_sea_lakes", index);
 
				_game_mode = old_gm;
 
				break;
 
@@ -1028,13 +1028,13 @@ struct CreateScenarioWindow : public Win
 
				_left_button_clicked = false;
 
				break;
 

	
 
			case CSCEN_START_DATE_TEXT: // Year text
 
				this->widget_id = CSCEN_START_DATE_TEXT;
 
				SetDParam(0, _settings_newgame.game_creation.starting_year);
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_START_DATE_QUERY_CAPT, 8, 100, this, CS_NUMERAL, QSF_NONE);
 
				ShowQueryString(STR_JUST_INT, STR_MAPGEN_START_DATE_QUERY_CAPT, 8, this, CS_NUMERAL, QSF_NONE);
 
				break;
 

	
 
			case CSCEN_FLAT_LAND_HEIGHT_DOWN:
 
			case CSCEN_FLAT_LAND_HEIGHT_UP: // Height level buttons
 
				/* Don't allow too fast scrolling */
 
				if ((this->flags4 & WF_TIMEOUT_MASK) <= WF_TIMEOUT_TRIGGER) {
 
@@ -1046,13 +1046,13 @@ struct CreateScenarioWindow : public Win
 
				_left_button_clicked = false;
 
				break;
 

	
 
			case CSCEN_FLAT_LAND_HEIGHT_TEXT: // Height level text
 
				this->widget_id = CSCEN_FLAT_LAND_HEIGHT_TEXT;
 
				SetDParam(0, _settings_newgame.game_creation.se_flat_world_height);
 
				ShowQueryString(STR_JUST_INT, STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_QUERY_CAPT, 3, 100, this, CS_NUMERAL, QSF_NONE);
 
				ShowQueryString(STR_JUST_INT, STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_QUERY_CAPT, 3, this, CS_NUMERAL, QSF_NONE);
 
				break;
 
		}
 
	}
 

	
 
	virtual void OnTimeout()
 
	{
src/group_gui.cpp
Show inline comments
 
@@ -628,13 +628,13 @@ public:
 
		/* Show empty query for new groups */
 
		StringID str = STR_EMPTY;
 
		if (!empty) {
 
			SetDParam(0, group);
 
			str = STR_GROUP_NAME;
 
		}
 
		ShowQueryString(str, STR_GROUP_RENAME_CAPTION, MAX_LENGTH_GROUP_NAME_CHARS, MAX_LENGTH_GROUP_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
		ShowQueryString(str, STR_GROUP_RENAME_CAPTION, MAX_LENGTH_GROUP_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
	}
 

	
 
	/**
 
	 * Tests whether a given vehicle is selected in the window, and unselects it if necessary.
 
	 * Called when the vehicle is deleted.
 
	 * @param vehicle Vehicle that is going to be deleted
src/group_type.h
Show inline comments
 
@@ -15,12 +15,11 @@
 
typedef uint16 GroupID;
 

	
 
static const GroupID ALL_GROUP     = 0xFFFD;
 
static const GroupID DEFAULT_GROUP = 0xFFFE; ///< ungrouped vehicles are in this group.
 
static const GroupID INVALID_GROUP = 0xFFFF;
 

	
 
static const uint MAX_LENGTH_GROUP_NAME_CHARS  =  32; ///< The maximum length of a group name in characters including '\0'
 
static const uint MAX_LENGTH_GROUP_NAME_PIXELS = 150; ///< The maximum length of a group name in pixels
 
static const uint MAX_LENGTH_GROUP_NAME_CHARS = 32; ///< The maximum length of a group name in characters including '\0'
 

	
 
struct Group;
 

	
 
#endif /* GROUP_TYPE_H */
src/industry_gui.cpp
Show inline comments
 
@@ -880,18 +880,18 @@ public:
 
				} else if (IsInsideMM(pt.x, left + 30, right)) {
 
					/* clicked the text */
 
					this->editbox_line = line;
 
					switch (this->editable) {
 
						case EA_MULTIPLIER:
 
							SetDParam(0, RoundDivSU(i->prod_level * 100, PRODLEVEL_DEFAULT));
 
							ShowQueryString(STR_JUST_INT, STR_CONFIG_GAME_PRODUCTION_LEVEL, 10, 100, this, CS_ALPHANUMERAL, QSF_NONE);
 
							ShowQueryString(STR_JUST_INT, STR_CONFIG_GAME_PRODUCTION_LEVEL, 10, this, CS_ALPHANUMERAL, QSF_NONE);
 
							break;
 

	
 
						case EA_RATE:
 
							SetDParam(0, i->production_rate[line - IL_RATE1] * 8);
 
							ShowQueryString(STR_JUST_INT, STR_CONFIG_GAME_PRODUCTION, 10, 100, this, CS_ALPHANUMERAL, QSF_NONE);
 
							ShowQueryString(STR_JUST_INT, STR_CONFIG_GAME_PRODUCTION, 10, this, CS_ALPHANUMERAL, QSF_NONE);
 
							break;
 

	
 
						default: NOT_REACHED();
 
					}
 
				}
 
				break;
src/main_gui.cpp
Show inline comments
 
@@ -120,13 +120,13 @@ void CcPlaySound10(const CommandCost &re
 

	
 
#ifdef ENABLE_NETWORK
 
void ShowNetworkGiveMoneyWindow(CompanyID company)
 
{
 
	_rename_id = company;
 
	_rename_what = 3;
 
	ShowQueryString(STR_EMPTY, STR_NETWORK_GIVE_MONEY_CAPTION, 30, 180, NULL, CS_NUMERAL, QSF_NONE);
 
	ShowQueryString(STR_EMPTY, STR_NETWORK_GIVE_MONEY_CAPTION, 30, NULL, CS_NUMERAL, QSF_NONE);
 
}
 
#endif /* ENABLE_NETWORK */
 

	
 

	
 
/**
 
 * Zooms a viewport in a window in or out.
src/misc_gui.cpp
Show inline comments
 
@@ -1362,13 +1362,13 @@ enum QueryStringWidgets {
 

	
 
/** Class for the string query window. */
 
struct QueryStringWindow : public QueryStringBaseWindow
 
{
 
	QueryStringFlags flags; ///< Flags controlling behaviour of the window.
 

	
 
	QueryStringWindow(StringID str, StringID caption, uint max_bytes, uint max_chars, uint max_pixels, const WindowDesc *desc, Window *parent, CharSetFilter afilter, QueryStringFlags flags) :
 
	QueryStringWindow(StringID str, StringID caption, uint max_bytes, uint max_chars, const WindowDesc *desc, Window *parent, CharSetFilter afilter, QueryStringFlags flags) :
 
			QueryStringBaseWindow(max_bytes, max_chars)
 
	{
 
		GetString(this->edit_str_buf, str, &this->edit_str_buf[max_bytes - 1]);
 
		str_validate(this->edit_str_buf, &this->edit_str_buf[max_bytes - 1], false, true);
 

	
 
		/* Make sure the name isn't too long for the text buffer in the number of
 
@@ -1379,13 +1379,13 @@ struct QueryStringWindow : public QueryS
 

	
 
		if ((flags & QSF_ACCEPT_UNCHANGED) == 0) this->orig = strdup(this->edit_str_buf);
 

	
 
		this->caption = caption;
 
		this->afilter = afilter;
 
		this->flags = flags;
 
		InitializeTextBuffer(&this->text, this->edit_str_buf, max_bytes, max_chars, max_pixels);
 
		InitializeTextBuffer(&this->text, this->edit_str_buf, max_bytes, max_chars, 0);
 

	
 
		this->InitNested(desc);
 

	
 
		this->parent = parent;
 

	
 
		this->SetFocusedWidget(QUERY_STR_WIDGET_TEXT);
 
@@ -1505,22 +1505,21 @@ static const WindowDesc _query_string_de
 

	
 
/**
 
 * Show a query popup window with a textbox in it.
 
 * @param str StringID for the text shown in the textbox
 
 * @param caption StringID of text shown in caption of querywindow
 
 * @param maxsize maximum size in bytes or characters (including terminating '\0') depending on flags
 
 * @param maxwidth maximum width in pixels allowed
 
 * @param parent pointer to a Window that will handle the events (ok/cancel) of this
 
 *        window. If NULL, results are handled by global function HandleOnEditText
 
 * @param afilter filters out unwanted character input
 
 * @param flags various flags, @see QueryStringFlags
 
 */
 
void ShowQueryString(StringID str, StringID caption, uint maxsize, uint maxwidth, Window *parent, CharSetFilter afilter, QueryStringFlags flags)
 
void ShowQueryString(StringID str, StringID caption, uint maxsize, Window *parent, CharSetFilter afilter, QueryStringFlags flags)
 
{
 
	DeleteWindowById(WC_QUERY_STRING, 0);
 
	new QueryStringWindow(str, caption, ((flags & QSF_LEN_IN_CHARS) ? MAX_CHAR_LENGTH : 1) * maxsize, maxsize, maxwidth, &_query_string_desc, parent, afilter, flags);
 
	new QueryStringWindow(str, caption, ((flags & QSF_LEN_IN_CHARS) ? MAX_CHAR_LENGTH : 1) * maxsize, maxsize, &_query_string_desc, parent, afilter, flags);
 
}
 

	
 

	
 
enum QueryWidgets {
 
	QUERY_WIDGET_CAPTION,
 
	QUERY_WIDGET_TEXT,
src/network/network_gui.cpp
Show inline comments
 
@@ -746,13 +746,12 @@ public:
 
			case NGWW_ADD: // Add a server
 
				SetDParamStr(0, _settings_client.network.connect_to_ip);
 
				ShowQueryString(
 
					STR_JUST_RAW_STRING,
 
					STR_NETWORK_SERVER_LIST_ENTER_IP,
 
					NETWORK_HOSTNAME_LENGTH,  // maximum number of characters including '\0'
 
					0,                        // no limit in pixels
 
					this, CS_ALPHANUMERAL, QSF_ACCEPT_UNCHANGED);
 
				break;
 

	
 
			case NGWW_START: // Start server
 
				ShowNetworkStartServerWindow();
 
				break;
 
@@ -1118,13 +1117,13 @@ struct NetworkStartServerWindow : public
 
				ShowNetworkGameWindow();
 
				break;
 

	
 
			case NSSW_SETPWD: // Set password button
 
				this->widget_id = NSSW_SETPWD;
 
				SetDParamStr(0, _settings_client.network.server_password);
 
				ShowQueryString(STR_JUST_RAW_STRING, STR_NETWORK_START_SERVER_SET_PASSWORD, 20, 250, this, CS_ALPHANUMERAL, QSF_NONE);
 
				ShowQueryString(STR_JUST_RAW_STRING, STR_NETWORK_START_SERVER_SET_PASSWORD, 20, this, CS_ALPHANUMERAL, QSF_NONE);
 
				break;
 

	
 
			case NSSW_CONNTYPE_BTN: // Connection type
 
				ShowDropDownMenu(this, _connection_types_dropdown, _settings_client.network.server_advertise, NSSW_CONNTYPE_BTN, 0, 0); // do it for widget NSSW_CONNTYPE_BTN
 
				break;
 

	
 
@@ -1151,25 +1150,25 @@ struct NetworkStartServerWindow : public
 
				_left_button_clicked = false;
 
				break;
 

	
 
			case NSSW_CLIENTS_TXT:    // Click on number of clients
 
				this->widget_id = NSSW_CLIENTS_TXT;
 
				SetDParam(0, _settings_client.network.max_clients);
 
				ShowQueryString(STR_JUST_INT, STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS,    4, 50, this, CS_NUMERAL, QSF_NONE);
 
				ShowQueryString(STR_JUST_INT, STR_NETWORK_START_SERVER_NUMBER_OF_CLIENTS,    4, this, CS_NUMERAL, QSF_NONE);
 
				break;
 

	
 
			case NSSW_COMPANIES_TXT:  // Click on number of companies
 
				this->widget_id = NSSW_COMPANIES_TXT;
 
				SetDParam(0, _settings_client.network.max_companies);
 
				ShowQueryString(STR_JUST_INT, STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES,  3, 50, this, CS_NUMERAL, QSF_NONE);
 
				ShowQueryString(STR_JUST_INT, STR_NETWORK_START_SERVER_NUMBER_OF_COMPANIES,  3, this, CS_NUMERAL, QSF_NONE);
 
				break;
 

	
 
			case NSSW_SPECTATORS_TXT: // Click on number of spectators
 
				this->widget_id = NSSW_SPECTATORS_TXT;
 
				SetDParam(0, _settings_client.network.max_spectators);
 
				ShowQueryString(STR_JUST_INT, STR_NETWORK_START_SERVER_NUMBER_OF_SPECTATORS, 4, 50, this, CS_NUMERAL, QSF_NONE);
 
				ShowQueryString(STR_JUST_INT, STR_NETWORK_START_SERVER_NUMBER_OF_SPECTATORS, 4, this, CS_NUMERAL, QSF_NONE);
 
				break;
 

	
 
			case NSSW_LANGUAGE_BTN: { // Language
 
				uint sel = 0;
 
				for (uint i = 0; i < lengthof(_language_dropdown) - 1; i++) {
 
					if (_language_dropdown[i] == STR_NETWORK_LANG_ANY + _settings_client.network.server_lang) {
 
@@ -2201,13 +2200,13 @@ void ShowNetworkNeedPassword(NetworkPass
 
	StringID caption;
 
	switch (npt) {
 
		default: NOT_REACHED();
 
		case NETWORK_GAME_PASSWORD:    caption = STR_NETWORK_NEED_GAME_PASSWORD_CAPTION; break;
 
		case NETWORK_COMPANY_PASSWORD: caption = STR_NETWORK_NEED_COMPANY_PASSWORD_CAPTION; break;
 
	}
 
	ShowQueryString(STR_EMPTY, caption, NETWORK_PASSWORD_LENGTH, 180, w, CS_ALPHANUMERAL, QSF_NONE);
 
	ShowQueryString(STR_EMPTY, caption, NETWORK_PASSWORD_LENGTH, w, CS_ALPHANUMERAL, QSF_NONE);
 
}
 

	
 

	
 
/** Enum for NetworkGameWindow, referring to _network_game_window_widgets */
 
enum NetworkCompanyPasswordWindowWidgets {
 
	NCPWW_BACKGROUND,               ///< The background of the interface
src/newgrf_debug_gui.cpp
Show inline comments
 
@@ -438,13 +438,13 @@ struct NewGRFInspectWindow : Window {
 
				for (const NIVariable *niv = nif->variables; niv->name != NULL; niv++, line--) {
 
					if (line != 1) continue; // 1 because of the "Variables:" line
 

	
 
					if (!HasVariableParameter(niv->var)) break;
 

	
 
					this->current_edit_param = niv->var;
 
					ShowQueryString(STR_EMPTY, STR_NEWGRF_INSPECT_QUERY_CAPTION, 3, 100, this, CS_HEXADECIMAL, QSF_NONE);
 
					ShowQueryString(STR_EMPTY, STR_NEWGRF_INSPECT_QUERY_CAPTION, 3, this, CS_HEXADECIMAL, QSF_NONE);
 
				}
 
			}
 
		}
 
	}
 

	
 
	virtual void OnQueryTextFinished(char *str)
 
@@ -696,13 +696,13 @@ struct SpriteAlignerWindow : Window {
 
					this->current_sprite = (this->current_sprite == 0 ? GetMaxSpriteID() :  this->current_sprite) - 1;
 
				} while (GetSpriteType(this->current_sprite) != ST_NORMAL);
 
				this->SetDirty();
 
				break;
 

	
 
			case SAW_GOTO:
 
				ShowQueryString(STR_EMPTY, STR_SPRITE_ALIGNER_GOTO_CAPTION, 7, 150, this, CS_NUMERAL, QSF_NONE);
 
				ShowQueryString(STR_EMPTY, STR_SPRITE_ALIGNER_GOTO_CAPTION, 7, this, CS_NUMERAL, QSF_NONE);
 
				break;
 

	
 
			case SAW_NEXT:
 
				do {
 
					this->current_sprite = (this->current_sprite + 1) % GetMaxSpriteID();
 
				} while (GetSpriteType(this->current_sprite) != ST_NORMAL);
src/newgrf_gui.cpp
Show inline comments
 
@@ -339,13 +339,13 @@ struct NewGRFParametersWindow : public W
 

	
 
					this->clicked_button = num;
 
					this->timeout = 5;
 
				} else if (par_info->type == PTYPE_UINT_ENUM && click_count >= 2) {
 
					/* Display a query box so users can enter a custom value. */
 
					SetDParam(0, this->grf_config->param[num]);
 
					ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, 10, 100, this, CS_NUMERAL, QSF_NONE);
 
					ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, 10, this, CS_NUMERAL, QSF_NONE);
 
				}
 

	
 
				this->SetDirty();
 
				break;
 
			}
 

	
 
@@ -783,13 +783,13 @@ struct NewGRFWindow : public QueryString
 
				this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window
 
				ShowDropDownList(this, list, this->preset, SNGRFS_PRESET_LIST);
 
				break;
 
			}
 

	
 
			case SNGRFS_PRESET_SAVE:
 
				ShowQueryString(STR_EMPTY, STR_NEWGRF_SETTINGS_PRESET_SAVE_QUERY, 32, 100, this, CS_ALPHANUMERAL, QSF_NONE);
 
				ShowQueryString(STR_EMPTY, STR_NEWGRF_SETTINGS_PRESET_SAVE_QUERY, 32, this, CS_ALPHANUMERAL, QSF_NONE);
 
				break;
 

	
 
			case SNGRFS_PRESET_DELETE:
 
				if (this->preset == -1) return;
 

	
 
				DeleteGRFPresetFromConfig(_grf_preset_list[this->preset]);
src/order_gui.cpp
Show inline comments
 
@@ -1234,13 +1234,13 @@ public:
 

	
 
			case ORDER_WIDGET_COND_VALUE: {
 
				const Order *order = this->vehicle->GetOrder(this->OrderGetSel());
 
				uint value = order->GetConditionValue();
 
				if (order->GetConditionVariable() == OCV_MAX_SPEED) value = ConvertSpeedToDisplaySpeed(value);
 
				SetDParam(0, value);
 
				ShowQueryString(STR_JUST_INT, STR_ORDER_CONDITIONAL_VALUE_CAPT, 5, 100, this, CS_NUMERAL, QSF_NONE);
 
				ShowQueryString(STR_JUST_INT, STR_ORDER_CONDITIONAL_VALUE_CAPT, 5, this, CS_NUMERAL, QSF_NONE);
 
				break;
 
			}
 

	
 
			case ORDER_WIDGET_SHARED_ORDER_LIST:
 
				ShowVehicleListWindow(this->vehicle);
 
				break;
src/settings_gui.cpp
Show inline comments
 
@@ -1737,13 +1737,13 @@ struct GameSettingsWindow : Window {
 
			if (sd->desc.cmd != SDT_BOOLX && !(sd->desc.flags & SGF_MULTISTRING)) {
 
				/* Show the correct currency-translated value */
 
				if (sd->desc.flags & SGF_CURRENCY) value *= _currency->rate;
 

	
 
				this->valuewindow_entry = pe;
 
				SetDParam(0, value);
 
				ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, 10, 100, this, CS_NUMERAL, QSF_ENABLE_DEFAULT);
 
				ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, 10, this, CS_NUMERAL, QSF_ENABLE_DEFAULT);
 
			}
 
		}
 
	}
 

	
 
	virtual void OnTimeout()
 
	{
 
@@ -1990,13 +1990,13 @@ struct CustomCurrencyWindow : Window {
 
				afilter = CS_NUMERAL;
 
				break;
 
		}
 

	
 
		if (len != 0) {
 
			this->query_widget = line;
 
			ShowQueryString(str, STR_CURRENCY_CHANGE_PARAMETER, len + 1, 250, this, afilter, QSF_NONE);
 
			ShowQueryString(str, STR_CURRENCY_CHANGE_PARAMETER, len + 1, this, afilter, QSF_NONE);
 
		}
 

	
 
		this->flags4 |= WF_TIMEOUT_BEGIN;
 
		this->SetDirty();
 
	}
 

	
src/signs_gui.cpp
Show inline comments
 
@@ -152,13 +152,13 @@ struct SignListWindow : QueryStringBaseW
 
		this->vscroll = this->GetScrollbar(SLW_SCROLLBAR);
 
		this->FinishInitNested(desc, window_number);
 
		this->SetWidgetLoweredState(SLW_FILTER_MATCH_CASE_BTN, SignList::match_case);
 

	
 
		/* Initialize the text edit widget */
 
		this->afilter = CS_ALPHANUMERAL;
 
		InitializeTextBuffer(&this->text, this->edit_str_buf, MAX_LENGTH_SIGN_NAME_CHARS * MAX_CHAR_LENGTH, MAX_LENGTH_SIGN_NAME_CHARS, MAX_LENGTH_SIGN_NAME_PIXELS);
 
		InitializeTextBuffer(&this->text, this->edit_str_buf, MAX_LENGTH_SIGN_NAME_CHARS * MAX_CHAR_LENGTH, MAX_LENGTH_SIGN_NAME_CHARS, 0);
 
		ClearFilterTextWidget();
 

	
 
		/* Initialize the filtering variables */
 
		this->SetFilterString("");
 

	
 
		/* Create initial list. */
 
@@ -499,13 +499,13 @@ struct SignWindow : QueryStringBaseWindo
 
		} else {
 
			GetString(this->edit_str_buf, STR_EMPTY, last_of);
 
		}
 
		*last_of = '\0';
 

	
 
		this->cur_sign = si->index;
 
		InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, this->max_chars, MAX_LENGTH_SIGN_NAME_PIXELS);
 
		InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, this->max_chars, 0);
 

	
 
		this->SetWidgetDirty(QUERY_EDIT_SIGN_WIDGET_TEXT);
 
		this->SetFocusedWidget(QUERY_EDIT_SIGN_WIDGET_TEXT);
 
	}
 

	
 
	/**
src/station_gui.cpp
Show inline comments
 
@@ -1188,13 +1188,13 @@ struct StationViewWindow : public Window
 
				this->ReInit(0, height_change * FONT_HEIGHT_NORMAL);
 
				break;
 
			}
 

	
 
			case SVW_RENAME:
 
				SetDParam(0, this->window_number);
 
				ShowQueryString(STR_STATION_NAME, STR_STATION_VIEW_RENAME_STATION_CAPTION, MAX_LENGTH_STATION_NAME_CHARS, MAX_LENGTH_STATION_NAME_PIXELS,
 
				ShowQueryString(STR_STATION_NAME, STR_STATION_VIEW_RENAME_STATION_CAPTION, MAX_LENGTH_STATION_NAME_CHARS,
 
						this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				break;
 

	
 
			case SVW_TRAINS:   // Show list of scheduled trains to this station
 
			case SVW_ROADVEHS: // Show list of scheduled road-vehicles to this station
 
			case SVW_SHIPS:    // Show list of scheduled ships to this station
src/station_type.h
Show inline comments
 
@@ -82,14 +82,13 @@ enum CatchmentArea {
 

	
 
	CA_UNMODIFIED      =  4, ///< Catchment for all stations with "modified catchment" disabled
 

	
 
	MAX_CATCHMENT      = 10, ///< Maximum catchment for airports with "modified catchment" enabled
 
};
 

	
 
static const uint MAX_LENGTH_STATION_NAME_CHARS  =  32; ///< The maximum length of a station name in characters including '\0'
 
static const uint MAX_LENGTH_STATION_NAME_PIXELS = 180; ///< The maximum length of a station name in pixels
 
static const uint MAX_LENGTH_STATION_NAME_CHARS = 32; ///< The maximum length of a station name in characters including '\0'
 

	
 
/** List of stations */
 
typedef SmallVector<Station *, 2> StationList;
 

	
 
/**
 
 * Structure contains cached list of stations nearby. The list
src/textbuf_gui.h
Show inline comments
 
@@ -52,13 +52,13 @@ enum QueryStringFlags {
 

	
 
DECLARE_ENUM_AS_BIT_SET(QueryStringFlags)
 

	
 

	
 
typedef void QueryCallbackProc(Window*, bool);
 

	
 
void ShowQueryString(StringID str, StringID caption, uint max_len, uint max_pixels, Window *parent, CharSetFilter afilter, QueryStringFlags flags);
 
void ShowQueryString(StringID str, StringID caption, uint max_len, Window *parent, CharSetFilter afilter, QueryStringFlags flags);
 
void ShowQuery(StringID caption, StringID message, Window *w, QueryCallbackProc *callback);
 

	
 
/** The number of 'characters' on the on-screen keyboard. */
 
static const uint OSK_KEYBOARD_ENTRIES = 50;
 

	
 
/**
src/timetable_gui.cpp
Show inline comments
 
@@ -553,13 +553,13 @@ struct TimetableWindow : Window {
 
					if (time != 0) {
 
						SetDParam(0, time);
 
						current = STR_JUST_INT;
 
					}
 
				}
 

	
 
				ShowQueryString(current, STR_TIMETABLE_CHANGE_TIME, 31, 150, this, CS_NUMERAL, QSF_NONE);
 
				ShowQueryString(current, STR_TIMETABLE_CHANGE_TIME, 31, this, CS_NUMERAL, QSF_NONE);
 
				break;
 
			}
 

	
 
			case TTV_CLEAR_TIME: { // Clear waiting time button.
 
				uint32 p1 = PackTimetableArgs(v, this->sel_index);
 
				DoCommandP(0, p1, 0, CMD_CHANGE_TIMETABLE | CMD_MSG(STR_ERROR_CAN_T_TIMETABLE_VEHICLE));
src/toolbar_gui.cpp
Show inline comments
 
@@ -881,13 +881,13 @@ static CallBackFunction ToolbarSwitchCli
 
/**
 
 * Called when clicking at the date panel of the scenario editor toolbar.
 
 */
 
static CallBackFunction ToolbarScenDatePanel(Window *w)
 
{
 
	SetDParam(0, _settings_game.game_creation.starting_year);
 
	ShowQueryString(STR_JUST_INT, STR_MAPGEN_START_DATE_QUERY_CAPT, 8, 100, w, CS_NUMERAL, QSF_ENABLE_DEFAULT);
 
	ShowQueryString(STR_JUST_INT, STR_MAPGEN_START_DATE_QUERY_CAPT, 8, w, CS_NUMERAL, QSF_ENABLE_DEFAULT);
 
	_left_button_clicked = false;
 
	return CBF_NONE;
 
}
 

	
 
static CallBackFunction ToolbarScenDateBackward(Window *w)
 
{
src/town_gui.cpp
Show inline comments
 
@@ -448,13 +448,13 @@ public:
 
			case TVW_SHOWAUTHORITY: // town authority
 
				ShowTownAuthorityWindow(this->window_number);
 
				break;
 

	
 
			case TVW_CHANGENAME: // rename
 
				SetDParam(0, this->window_number);
 
				ShowQueryString(STR_TOWN_NAME, STR_TOWN_VIEW_RENAME_TOWN_BUTTON, MAX_LENGTH_TOWN_NAME_CHARS, MAX_LENGTH_TOWN_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				ShowQueryString(STR_TOWN_NAME, STR_TOWN_VIEW_RENAME_TOWN_BUTTON, MAX_LENGTH_TOWN_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				break;
 

	
 
			case TVW_EXPAND: { // expand town - only available on Scenario editor
 
				/* Warn the user if towns are not allowed to build roads, but do this only once per OpenTTD run. */
 
				static bool _warn_town_no_roads = false;
 

	
 
@@ -1027,13 +1027,13 @@ public:
 
			QueryStringBaseWindow(MAX_LENGTH_TOWN_NAME_CHARS * MAX_CHAR_LENGTH, MAX_LENGTH_TOWN_NAME_CHARS),
 
			town_size(TSZ_MEDIUM),
 
			town_layout(_settings_game.economy.town_layout),
 
			params(_settings_game.game_creation.town_name)
 
	{
 
		this->InitNested(desc, window_number);
 
		InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, this->max_chars, MAX_LENGTH_TOWN_NAME_PIXELS);
 
		InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, this->max_chars, 0);
 
		this->RandomTownName();
 
		this->UpdateButtons(true);
 
	}
 

	
 
	void RandomTownName()
 
	{
src/town_type.h
Show inline comments
 
@@ -102,10 +102,9 @@ enum TownFounding {
 
	TF_CUSTOM_LAYOUT, ///< Allowed, with custom town layout
 
	TF_END,           ///< Used for iterations and limit testing
 
};
 
/** It needs to be 8bits, because we save and load it as such */
 
typedef SimpleTinyEnumT<TownFounding, byte> TownFoundingByte;
 

	
 
static const uint MAX_LENGTH_TOWN_NAME_CHARS  =  32; ///< The maximum length of a town name in characters including '\0'
 
static const uint MAX_LENGTH_TOWN_NAME_PIXELS = 130; ///< The maximum length of a town name in pixels
 
static const uint MAX_LENGTH_TOWN_NAME_CHARS = 32; ///< The maximum length of a town name in characters including '\0'
 

	
 
#endif /* TOWN_TYPE_H */
src/vehicle_gui.cpp
Show inline comments
 
@@ -2049,13 +2049,13 @@ struct VehicleDetailsWindow : Window {
 
	{
 
		switch (widget) {
 
			case VLD_WIDGET_RENAME_VEHICLE: { // rename
 
				const Vehicle *v = Vehicle::Get(this->window_number);
 
				SetDParam(0, v->index);
 
				ShowQueryString(STR_VEHICLE_NAME, STR_QUERY_RENAME_TRAIN_CAPTION + v->type,
 
						MAX_LENGTH_VEHICLE_NAME_CHARS, MAX_LENGTH_VEHICLE_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
						MAX_LENGTH_VEHICLE_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				break;
 
			}
 

	
 
			case VLD_WIDGET_INCREASE_SERVICING_INTERVAL:   // increase int
 
			case VLD_WIDGET_DECREASE_SERVICING_INTERVAL: { // decrease int
 
				int mod = _ctrl_pressed ? 5 : 10;
src/vehicle_type.h
Show inline comments
 
@@ -61,14 +61,13 @@ enum DepotCommand {
 
	DEPOT_MASS_SEND     = (1U << 29), ///< Tells that it's a mass send to depot command (type in VLW flag)
 
	DEPOT_DONT_CANCEL   = (1U << 30), ///< Don't cancel current goto depot command if any
 
	DEPOT_LOCATE_HANGAR = (1U << 31), ///< Find another airport if the target one lacks a hangar
 
	DEPOT_COMMAND_MASK  = 0xFU << 28,
 
};
 

	
 
static const uint MAX_LENGTH_VEHICLE_NAME_CHARS  =  32; ///< The maximum length of a vehicle name in characters including '\0'
 
static const uint MAX_LENGTH_VEHICLE_NAME_PIXELS = 150; ///< The maximum length of a vehicle name in pixels
 
static const uint MAX_LENGTH_VEHICLE_NAME_CHARS = 32; ///< The maximum length of a vehicle name in characters including '\0'
 

	
 
/** The length of a vehicle in tile units. */
 
static const uint VEHICLE_LENGTH = 8;
 

	
 
/** Vehicle acceleration models. */
 
enum AccelerationModel {
src/waypoint_gui.cpp
Show inline comments
 
@@ -102,13 +102,13 @@ public:
 
					ScrollMainWindowToTile(this->GetCenterTile());
 
				}
 
				break;
 

	
 
			case WAYPVW_RENAME: // rename
 
				SetDParam(0, this->wp->index);
 
				ShowQueryString(STR_WAYPOINT_NAME, STR_EDIT_WAYPOINT_NAME, MAX_LENGTH_STATION_NAME_CHARS, MAX_LENGTH_STATION_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				ShowQueryString(STR_WAYPOINT_NAME, STR_EDIT_WAYPOINT_NAME, MAX_LENGTH_STATION_NAME_CHARS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT | QSF_LEN_IN_CHARS);
 
				break;
 

	
 
			case WAYPVW_SHOW_VEHICLES: // show list of vehicles having this waypoint in their orders
 
				ShowVehicleListWindow(this->owner, this->vt, this->wp->index);
 
				break;
 
		}
0 comments (0 inline, 0 general)