Changeset - r17569:79cc833a8f35
[Not reviewed]
src/ai/ai_gui.cpp
Show inline comments
 
@@ -397,7 +397,7 @@ struct AISettingsWindow : public Window 
 
					/* 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();
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -1211,7 +1211,7 @@ struct BuildVehicleWindow : Window {
 
				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
 
@@ -334,7 +334,7 @@ struct CheatWindow : Window {
 
		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;
 
		}
 

	
src/company_gui.cpp
Show inline comments
 
@@ -1455,7 +1455,7 @@ public:
 
			/* '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 */
 
@@ -1952,13 +1952,13 @@ struct CompanyWindow : Window
 
			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: {
 
@@ -2007,7 +2007,7 @@ struct CompanyWindow : Window
 
					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);
src/company_type.h
Show inline comments
 
@@ -37,12 +37,10 @@ enum Owner {
 
};
 
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> {};
src/depot_gui.cpp
Show inline comments
 
@@ -732,7 +732,7 @@ struct DepotWindow : Window {
 
			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:
src/depot_type.h
Show inline comments
 
@@ -15,7 +15,6 @@
 
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
 
@@ -154,8 +154,7 @@ enum EngineFlags {
 
	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.
 

	
src/genworld_gui.cpp
Show inline comments
 
@@ -633,7 +633,7 @@ struct GenerateLandscapeWindow : public 
 
			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:
 
@@ -651,7 +651,7 @@ struct GenerateLandscapeWindow : public 
 
			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
 
@@ -759,7 +759,7 @@ struct GenerateLandscapeWindow : public 
 
				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;
 
@@ -780,7 +780,7 @@ struct GenerateLandscapeWindow : public 
 
				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;
 
@@ -1031,7 +1031,7 @@ struct CreateScenarioWindow : public Win
 
			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:
 
@@ -1049,7 +1049,7 @@ struct CreateScenarioWindow : public Win
 
			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;
 
		}
 
	}
src/group_gui.cpp
Show inline comments
 
@@ -631,7 +631,7 @@ public:
 
			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);
 
	}
 

	
 
	/**
src/group_type.h
Show inline comments
 
@@ -18,8 +18,7 @@ static const GroupID ALL_GROUP     = 0xF
 
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;
 

	
src/industry_gui.cpp
Show inline comments
 
@@ -883,12 +883,12 @@ public:
 
					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();
src/main_gui.cpp
Show inline comments
 
@@ -123,7 +123,7 @@ void ShowNetworkGiveMoneyWindow(CompanyI
 
{
 
	_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 */
 

	
src/misc_gui.cpp
Show inline comments
 
@@ -1365,7 +1365,7 @@ struct QueryStringWindow : public QueryS
 
{
 
	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]);
 
@@ -1382,7 +1382,7 @@ struct QueryStringWindow : public QueryS
 
		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);
 

	
 
@@ -1508,16 +1508,15 @@ static const WindowDesc _query_string_de
 
 * @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);
 
}
 

	
 

	
src/network/network_gui.cpp
Show inline comments
 
@@ -749,7 +749,6 @@ public:
 
					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;
 

	
 
@@ -1121,7 +1120,7 @@ struct NetworkStartServerWindow : public
 
			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
 
@@ -1154,19 +1153,19 @@ struct NetworkStartServerWindow : public
 
			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
 
@@ -2204,7 +2203,7 @@ void ShowNetworkNeedPassword(NetworkPass
 
		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);
 
}
 

	
 

	
src/newgrf_debug_gui.cpp
Show inline comments
 
@@ -441,7 +441,7 @@ struct NewGRFInspectWindow : Window {
 
					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);
 
				}
 
			}
 
		}
 
@@ -699,7 +699,7 @@ struct SpriteAlignerWindow : Window {
 
				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:
src/newgrf_gui.cpp
Show inline comments
 
@@ -342,7 +342,7 @@ struct NewGRFParametersWindow : public W
 
				} 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();
 
@@ -786,7 +786,7 @@ struct NewGRFWindow : public QueryString
 
			}
 

	
 
			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:
src/order_gui.cpp
Show inline comments
 
@@ -1237,7 +1237,7 @@ public:
 
				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;
 
			}
 

	
src/settings_gui.cpp
Show inline comments
 
@@ -1740,7 +1740,7 @@ struct GameSettingsWindow : Window {
 

	
 
				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);
 
			}
 
		}
 
	}
 
@@ -1993,7 +1993,7 @@ struct CustomCurrencyWindow : Window {
 

	
 
		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;
src/signs_gui.cpp
Show inline comments
 
@@ -155,7 +155,7 @@ struct SignListWindow : QueryStringBaseW
 

	
 
		/* 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 */
 
@@ -502,7 +502,7 @@ struct SignWindow : QueryStringBaseWindo
 
		*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
 
@@ -1191,7 +1191,7 @@ struct StationViewWindow : public Window
 

	
 
			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;
 

	
src/station_type.h
Show inline comments
 
@@ -85,8 +85,7 @@ enum CatchmentArea {
 
	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;
src/textbuf_gui.h
Show inline comments
 
@@ -55,7 +55,7 @@ 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. */
src/timetable_gui.cpp
Show inline comments
 
@@ -556,7 +556,7 @@ struct TimetableWindow : Window {
 
					}
 
				}
 

	
 
				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;
 
			}
 

	
src/toolbar_gui.cpp
Show inline comments
 
@@ -884,7 +884,7 @@ static CallBackFunction ToolbarSwitchCli
 
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;
 
}
src/town_gui.cpp
Show inline comments
 
@@ -451,7 +451,7 @@ public:
 

	
 
			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
 
@@ -1030,7 +1030,7 @@ public:
 
			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);
 
	}
src/town_type.h
Show inline comments
 
@@ -105,7 +105,6 @@ enum TownFounding {
 
/** 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
 
@@ -2052,7 +2052,7 @@ struct VehicleDetailsWindow : Window {
 
				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;
 
			}
 

	
src/vehicle_type.h
Show inline comments
 
@@ -64,8 +64,7 @@ enum DepotCommand {
 
	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;
src/waypoint_gui.cpp
Show inline comments
 
@@ -105,7 +105,7 @@ public:
 

	
 
			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
0 comments (0 inline, 0 general)