Merge branch 'master' into jgrpp
# Conflicts: # src/newgrf_station.cpp
This commit is contained in:
@@ -58,6 +58,11 @@ macro(compile_flags)
|
|||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_compile_options(/W3)
|
add_compile_options(/W3)
|
||||||
|
if(MSVC_VERSION GREATER 1929)
|
||||||
|
# Starting with version 19.30, there is an optimisation bug, see #9966 for details
|
||||||
|
# This flag disables the broken optimisation to work around the bug
|
||||||
|
add_compile_options(/d2ssa-rse-)
|
||||||
|
endif()
|
||||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
-W
|
-W
|
||||||
|
@@ -6,6 +6,6 @@ Name=OpenTTD
|
|||||||
Icon=${BINARY_NAME}
|
Icon=${BINARY_NAME}
|
||||||
Exec=${BINARY_NAME}
|
Exec=${BINARY_NAME}
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Categories=Game;
|
Categories=Game;Simulation;
|
||||||
Keywords=game;simulation;transport;tycoon;deluxe;economics;multiplayer;money;train;ship;bus;truck;aircraft;cargo;
|
Keywords=game;simulation;transport;tycoon;deluxe;economics;multiplayer;money;train;ship;bus;truck;aircraft;cargo;
|
||||||
@Comment_STR_DESKTOP_SHORTCUT_COMMENT@
|
@Comment_STR_DESKTOP_SHORTCUT_COMMENT@
|
||||||
|
@@ -842,7 +842,7 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, const char *st
|
|||||||
for (const auto &line : layout) {
|
for (const auto &line : layout) {
|
||||||
|
|
||||||
int line_height = line->GetLeading();
|
int line_height = line->GetLeading();
|
||||||
if (y >= top && y < bottom) {
|
if (y >= top && y + line_height - 1 <= bottom) {
|
||||||
last_line = y + line_height;
|
last_line = y + line_height;
|
||||||
if (first_line > y) first_line = y;
|
if (first_line > y) first_line = y;
|
||||||
|
|
||||||
|
@@ -230,9 +230,9 @@ STR_UNITS_HEIGHT_METRIC :{COMMA}{NBSP}m
|
|||||||
STR_UNITS_HEIGHT_SI :{COMMA}{NBSP}m
|
STR_UNITS_HEIGHT_SI :{COMMA}{NBSP}m
|
||||||
|
|
||||||
# Common window strings
|
# Common window strings
|
||||||
STR_LIST_FILTER_TITLE :{BLACK}Filter string:
|
STR_LIST_FILTER_TITLE :{BLACK}Filter:
|
||||||
STR_LIST_FILTER_OSKTITLE :{BLACK}Enter filter string
|
STR_LIST_FILTER_OSKTITLE :{BLACK}Enter one or more keywords to filter the list for
|
||||||
STR_LIST_FILTER_TOOLTIP :{BLACK}Enter a keyword to filter the list for
|
STR_LIST_FILTER_TOOLTIP :{BLACK}Enter one or more keywords to filter the list for
|
||||||
|
|
||||||
STR_TOOLTIP_GROUP_ORDER :{BLACK}Select grouping order
|
STR_TOOLTIP_GROUP_ORDER :{BLACK}Select grouping order
|
||||||
STR_TOOLTIP_SORT_ORDER :{BLACK}Select sorting order (descending/ascending)
|
STR_TOOLTIP_SORT_ORDER :{BLACK}Select sorting order (descending/ascending)
|
||||||
@@ -1214,7 +1214,7 @@ STR_WARNING_NO_SUITABLE_AI :{WHITE}No suita
|
|||||||
|
|
||||||
# Settings tree window
|
# Settings tree window
|
||||||
STR_CONFIG_SETTING_TREE_CAPTION :{WHITE}Settings
|
STR_CONFIG_SETTING_TREE_CAPTION :{WHITE}Settings
|
||||||
STR_CONFIG_SETTING_FILTER_TITLE :{BLACK}Filter string:
|
STR_CONFIG_SETTING_FILTER_TITLE :{BLACK}Filter:
|
||||||
STR_CONFIG_SETTING_EXPAND_ALL :{BLACK}Expand all
|
STR_CONFIG_SETTING_EXPAND_ALL :{BLACK}Expand all
|
||||||
STR_CONFIG_SETTING_COLLAPSE_ALL :{BLACK}Collapse all
|
STR_CONFIG_SETTING_COLLAPSE_ALL :{BLACK}Collapse all
|
||||||
STR_CONFIG_SETTING_RESET_ALL :{BLACK}Reset all values
|
STR_CONFIG_SETTING_RESET_ALL :{BLACK}Reset all values
|
||||||
@@ -4075,7 +4075,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Game Det
|
|||||||
STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}No information available
|
STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}No information available
|
||||||
STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING1}
|
STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING1}
|
||||||
STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING}
|
STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING}
|
||||||
STR_SAVELOAD_FILTER_TITLE :{BLACK}Filter string:
|
STR_SAVELOAD_FILTER_TITLE :{BLACK}Filter:
|
||||||
STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Overwrite File
|
STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Overwrite File
|
||||||
STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Are you sure you want to overwrite the existing file?
|
STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Are you sure you want to overwrite the existing file?
|
||||||
STR_SAVELOAD_DIRECTORY :{RAW_STRING} (Directory)
|
STR_SAVELOAD_DIRECTORY :{RAW_STRING} (Directory)
|
||||||
@@ -4181,7 +4181,7 @@ STR_NEWGRF_SETTINGS_INFO_TITLE :{WHITE}Detailed
|
|||||||
STR_NEWGRF_SETTINGS_ACTIVE_LIST :{WHITE}Active NewGRF files
|
STR_NEWGRF_SETTINGS_ACTIVE_LIST :{WHITE}Active NewGRF files
|
||||||
STR_NEWGRF_SETTINGS_INACTIVE_LIST :{WHITE}Inactive NewGRF files
|
STR_NEWGRF_SETTINGS_INACTIVE_LIST :{WHITE}Inactive NewGRF files
|
||||||
STR_NEWGRF_SETTINGS_SELECT_PRESET :{ORANGE}Select preset:
|
STR_NEWGRF_SETTINGS_SELECT_PRESET :{ORANGE}Select preset:
|
||||||
STR_NEWGRF_FILTER_TITLE :{ORANGE}Filter string:
|
STR_NEWGRF_FILTER_TITLE :{ORANGE}Filter:
|
||||||
STR_NEWGRF_SETTINGS_PRESET_LIST_TOOLTIP :{BLACK}Load the selected preset
|
STR_NEWGRF_SETTINGS_PRESET_LIST_TOOLTIP :{BLACK}Load the selected preset
|
||||||
STR_NEWGRF_SETTINGS_PRESET_SAVE :{BLACK}Save preset
|
STR_NEWGRF_SETTINGS_PRESET_SAVE :{BLACK}Save preset
|
||||||
STR_NEWGRF_SETTINGS_PRESET_SAVE_TOOLTIP :{BLACK}Save the current list as a preset
|
STR_NEWGRF_SETTINGS_PRESET_SAVE_TOOLTIP :{BLACK}Save the current list as a preset
|
||||||
|
@@ -230,9 +230,9 @@ STR_UNITS_HEIGHT_METRIC :{COMMA}{NBSP}m
|
|||||||
STR_UNITS_HEIGHT_SI :{COMMA}{NBSP}m
|
STR_UNITS_HEIGHT_SI :{COMMA}{NBSP}m
|
||||||
|
|
||||||
# Common window strings
|
# Common window strings
|
||||||
STR_LIST_FILTER_TITLE :{BLACK}Filter string:
|
STR_LIST_FILTER_TITLE :{BLACK}Filter:
|
||||||
STR_LIST_FILTER_OSKTITLE :{BLACK}Enter filter string
|
STR_LIST_FILTER_OSKTITLE :{BLACK}Enter one or more keywords to filter the list for
|
||||||
STR_LIST_FILTER_TOOLTIP :{BLACK}Enter a keyword to filter the list for
|
STR_LIST_FILTER_TOOLTIP :{BLACK}Enter one or more keywords to filter the list for
|
||||||
|
|
||||||
STR_TOOLTIP_GROUP_ORDER :{BLACK}Select grouping order
|
STR_TOOLTIP_GROUP_ORDER :{BLACK}Select grouping order
|
||||||
STR_TOOLTIP_SORT_ORDER :{BLACK}Select sorting order (descending/ascending)
|
STR_TOOLTIP_SORT_ORDER :{BLACK}Select sorting order (descending/ascending)
|
||||||
@@ -1175,7 +1175,7 @@ STR_WARNING_NO_SUITABLE_AI :{WHITE}No suita
|
|||||||
|
|
||||||
# Settings tree window
|
# Settings tree window
|
||||||
STR_CONFIG_SETTING_TREE_CAPTION :{WHITE}Settings
|
STR_CONFIG_SETTING_TREE_CAPTION :{WHITE}Settings
|
||||||
STR_CONFIG_SETTING_FILTER_TITLE :{BLACK}Filter string:
|
STR_CONFIG_SETTING_FILTER_TITLE :{BLACK}Filter:
|
||||||
STR_CONFIG_SETTING_EXPAND_ALL :{BLACK}Expand all
|
STR_CONFIG_SETTING_EXPAND_ALL :{BLACK}Expand all
|
||||||
STR_CONFIG_SETTING_COLLAPSE_ALL :{BLACK}Collapse all
|
STR_CONFIG_SETTING_COLLAPSE_ALL :{BLACK}Collapse all
|
||||||
STR_CONFIG_SETTING_RESET_ALL :{BLACK}Reset all values
|
STR_CONFIG_SETTING_RESET_ALL :{BLACK}Reset all values
|
||||||
@@ -3162,7 +3162,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Game Det
|
|||||||
STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}No information available
|
STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}No information available
|
||||||
STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING}
|
STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING}
|
||||||
STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING}
|
STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING}
|
||||||
STR_SAVELOAD_FILTER_TITLE :{BLACK}Filter string:
|
STR_SAVELOAD_FILTER_TITLE :{BLACK}Filter:
|
||||||
STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Overwrite File
|
STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Overwrite File
|
||||||
STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Are you sure you want to overwrite the existing file?
|
STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Are you sure you want to overwrite the existing file?
|
||||||
STR_SAVELOAD_DIRECTORY :{STRING} (Directory)
|
STR_SAVELOAD_DIRECTORY :{STRING} (Directory)
|
||||||
@@ -3258,7 +3258,7 @@ STR_NEWGRF_SETTINGS_INFO_TITLE :{WHITE}Detailed
|
|||||||
STR_NEWGRF_SETTINGS_ACTIVE_LIST :{WHITE}Active NewGRF files
|
STR_NEWGRF_SETTINGS_ACTIVE_LIST :{WHITE}Active NewGRF files
|
||||||
STR_NEWGRF_SETTINGS_INACTIVE_LIST :{WHITE}Inactive NewGRF files
|
STR_NEWGRF_SETTINGS_INACTIVE_LIST :{WHITE}Inactive NewGRF files
|
||||||
STR_NEWGRF_SETTINGS_SELECT_PRESET :{ORANGE}Select preset:
|
STR_NEWGRF_SETTINGS_SELECT_PRESET :{ORANGE}Select preset:
|
||||||
STR_NEWGRF_FILTER_TITLE :{ORANGE}Filter string:
|
STR_NEWGRF_FILTER_TITLE :{ORANGE}Filter:
|
||||||
STR_NEWGRF_SETTINGS_PRESET_LIST_TOOLTIP :{BLACK}Load the selected preset
|
STR_NEWGRF_SETTINGS_PRESET_LIST_TOOLTIP :{BLACK}Load the selected preset
|
||||||
STR_NEWGRF_SETTINGS_PRESET_SAVE :{BLACK}Save preset
|
STR_NEWGRF_SETTINGS_PRESET_SAVE :{BLACK}Save preset
|
||||||
STR_NEWGRF_SETTINGS_PRESET_SAVE_TOOLTIP :{BLACK}Save the current list as a preset
|
STR_NEWGRF_SETTINGS_PRESET_SAVE_TOOLTIP :{BLACK}Save the current list as a preset
|
||||||
|
@@ -231,9 +231,9 @@ STR_UNITS_HEIGHT_METRIC :{COMMA} m
|
|||||||
STR_UNITS_HEIGHT_SI :{COMMA} m
|
STR_UNITS_HEIGHT_SI :{COMMA} m
|
||||||
|
|
||||||
# Common window strings
|
# Common window strings
|
||||||
STR_LIST_FILTER_TITLE :{BLACK}Chave de filtragem:
|
STR_LIST_FILTER_TITLE :{BLACK}Filtro:
|
||||||
STR_LIST_FILTER_OSKTITLE :{BLACK}Insira uma frase para filtrar por
|
STR_LIST_FILTER_OSKTITLE :{BLACK}Insira uma ou mais palavras-chave para filtrar a lista
|
||||||
STR_LIST_FILTER_TOOLTIP :{BLACK}Insira uma palavra-chave para filtrar a lista por
|
STR_LIST_FILTER_TOOLTIP :{BLACK}Insira uma ou mais palavras-chave para filtrar a lista
|
||||||
|
|
||||||
STR_TOOLTIP_GROUP_ORDER :{BLACK}Seleccionar ordem de agrupamento
|
STR_TOOLTIP_GROUP_ORDER :{BLACK}Seleccionar ordem de agrupamento
|
||||||
STR_TOOLTIP_SORT_ORDER :{BLACK}Seleccione forma de ordenação (descendente/ascendente)
|
STR_TOOLTIP_SORT_ORDER :{BLACK}Seleccione forma de ordenação (descendente/ascendente)
|
||||||
@@ -1176,7 +1176,7 @@ STR_WARNING_NO_SUITABLE_AI :{WHITE}Não exi
|
|||||||
|
|
||||||
# Settings tree window
|
# Settings tree window
|
||||||
STR_CONFIG_SETTING_TREE_CAPTION :{WHITE}Definições
|
STR_CONFIG_SETTING_TREE_CAPTION :{WHITE}Definições
|
||||||
STR_CONFIG_SETTING_FILTER_TITLE :{BLACK}Filtrar frase:
|
STR_CONFIG_SETTING_FILTER_TITLE :{BLACK}Filtro:
|
||||||
STR_CONFIG_SETTING_EXPAND_ALL :{BLACK}Expandir todas
|
STR_CONFIG_SETTING_EXPAND_ALL :{BLACK}Expandir todas
|
||||||
STR_CONFIG_SETTING_COLLAPSE_ALL :{BLACK}Colapsar todas
|
STR_CONFIG_SETTING_COLLAPSE_ALL :{BLACK}Colapsar todas
|
||||||
STR_CONFIG_SETTING_RESET_ALL :{BLACK}Repor todos os valores
|
STR_CONFIG_SETTING_RESET_ALL :{BLACK}Repor todos os valores
|
||||||
@@ -3137,7 +3137,7 @@ STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Detalhes
|
|||||||
STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Nenhuma informação disponível
|
STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}Nenhuma informação disponível
|
||||||
STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING}
|
STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING}
|
||||||
STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING}
|
STR_SAVELOAD_DETAIL_GRFSTATUS :{SILVER}NewGRF: {WHITE}{STRING}
|
||||||
STR_SAVELOAD_FILTER_TITLE :{BLACK}Filtro de sequência:
|
STR_SAVELOAD_FILTER_TITLE :{BLACK}Filtro:
|
||||||
STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Substituir Ficheiro
|
STR_SAVELOAD_OVERWRITE_TITLE :{WHITE}Substituir Ficheiro
|
||||||
STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Tem a certeza que deseja substituir o ficheiro existente?
|
STR_SAVELOAD_OVERWRITE_WARNING :{YELLOW}Tem a certeza que deseja substituir o ficheiro existente?
|
||||||
STR_SAVELOAD_DIRECTORY :{STRING} (Diretório)
|
STR_SAVELOAD_DIRECTORY :{STRING} (Diretório)
|
||||||
@@ -3233,7 +3233,7 @@ STR_NEWGRF_SETTINGS_INFO_TITLE :{WHITE}Informa
|
|||||||
STR_NEWGRF_SETTINGS_ACTIVE_LIST :{WHITE}Ficheiros NewGRF activos
|
STR_NEWGRF_SETTINGS_ACTIVE_LIST :{WHITE}Ficheiros NewGRF activos
|
||||||
STR_NEWGRF_SETTINGS_INACTIVE_LIST :{WHITE}Ficheiros NewGRF inactivos
|
STR_NEWGRF_SETTINGS_INACTIVE_LIST :{WHITE}Ficheiros NewGRF inactivos
|
||||||
STR_NEWGRF_SETTINGS_SELECT_PRESET :{ORANGE}Seleccionar predefinição:
|
STR_NEWGRF_SETTINGS_SELECT_PRESET :{ORANGE}Seleccionar predefinição:
|
||||||
STR_NEWGRF_FILTER_TITLE :{ORANGE}Filtro de sequência:
|
STR_NEWGRF_FILTER_TITLE :{ORANGE}Filtro:
|
||||||
STR_NEWGRF_SETTINGS_PRESET_LIST_TOOLTIP :{BLACK}Carrega a predefinição seleccionada
|
STR_NEWGRF_SETTINGS_PRESET_LIST_TOOLTIP :{BLACK}Carrega a predefinição seleccionada
|
||||||
STR_NEWGRF_SETTINGS_PRESET_SAVE :{BLACK}Guardar
|
STR_NEWGRF_SETTINGS_PRESET_SAVE :{BLACK}Guardar
|
||||||
STR_NEWGRF_SETTINGS_PRESET_SAVE_TOOLTIP :{BLACK}Guarda a lista numa predefinição
|
STR_NEWGRF_SETTINGS_PRESET_SAVE_TOOLTIP :{BLACK}Guarda a lista numa predefinição
|
||||||
|
@@ -357,8 +357,8 @@ STR_UNITS_HEIGHT_SI :{COMMA}{NBSP}м
|
|||||||
|
|
||||||
# Common window strings
|
# Common window strings
|
||||||
STR_LIST_FILTER_TITLE :{BLACK}Фильтр:
|
STR_LIST_FILTER_TITLE :{BLACK}Фильтр:
|
||||||
STR_LIST_FILTER_OSKTITLE :{BLACK}Введите строку фильтра
|
STR_LIST_FILTER_OSKTITLE :{BLACK}Введите ключевые слова для фильтрации списка
|
||||||
STR_LIST_FILTER_TOOLTIP :{BLACK}Введите ключевое слово для фильтрации списка
|
STR_LIST_FILTER_TOOLTIP :{BLACK}Введите ключевые слова для фильтрации списка
|
||||||
|
|
||||||
STR_TOOLTIP_GROUP_ORDER :{BLACK}Выбор порядка группировки
|
STR_TOOLTIP_GROUP_ORDER :{BLACK}Выбор порядка группировки
|
||||||
STR_TOOLTIP_SORT_ORDER :{BLACK}Смена направления сортировки (убывание/возрастание)
|
STR_TOOLTIP_SORT_ORDER :{BLACK}Смена направления сортировки (убывание/возрастание)
|
||||||
|
@@ -1791,9 +1791,11 @@ public:
|
|||||||
SetDParam(0, STR_NETWORK_CLIENT_LIST_SERVER_CONNECTION_TYPE_UNKNOWN + _network_server_connection_type);
|
SetDParam(0, STR_NETWORK_CLIENT_LIST_SERVER_CONNECTION_TYPE_UNKNOWN + _network_server_connection_type);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WID_CL_CLIENT_NAME:
|
case WID_CL_CLIENT_NAME: {
|
||||||
SetDParamStr(0, _settings_client.network.client_name);
|
const NetworkClientInfo *own_ci = NetworkClientInfo::GetByClientID(_network_own_client_id);
|
||||||
|
SetDParamStr(0, own_ci != nullptr ? own_ci->client_name : _settings_client.network.client_name);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case WID_CL_CLIENT_COMPANY_COUNT:
|
case WID_CL_CLIENT_COMPANY_COUNT:
|
||||||
SetDParam(0, NetworkClientInfo::GetNumItems());
|
SetDParam(0, NetworkClientInfo::GetNumItems());
|
||||||
@@ -1813,12 +1815,13 @@ public:
|
|||||||
ShowQueryString(STR_JUST_RAW_STRING, STR_NETWORK_CLIENT_LIST_SERVER_NAME_QUERY_CAPTION, NETWORK_NAME_LENGTH, this, CS_ALPHANUMERAL, QSF_LEN_IN_CHARS);
|
ShowQueryString(STR_JUST_RAW_STRING, STR_NETWORK_CLIENT_LIST_SERVER_NAME_QUERY_CAPTION, NETWORK_NAME_LENGTH, this, CS_ALPHANUMERAL, QSF_LEN_IN_CHARS);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WID_CL_CLIENT_NAME_EDIT:
|
case WID_CL_CLIENT_NAME_EDIT: {
|
||||||
|
const NetworkClientInfo *own_ci = NetworkClientInfo::GetByClientID(_network_own_client_id);
|
||||||
this->query_widget = WID_CL_CLIENT_NAME_EDIT;
|
this->query_widget = WID_CL_CLIENT_NAME_EDIT;
|
||||||
SetDParamStr(0, _settings_client.network.client_name);
|
SetDParamStr(0, own_ci != nullptr ? own_ci->client_name : _settings_client.network.client_name);
|
||||||
ShowQueryString(STR_JUST_RAW_STRING, STR_NETWORK_CLIENT_LIST_PLAYER_NAME_QUERY_CAPTION, NETWORK_CLIENT_NAME_LENGTH, this, CS_ALPHANUMERAL, QSF_LEN_IN_CHARS);
|
ShowQueryString(STR_JUST_RAW_STRING, STR_NETWORK_CLIENT_LIST_PLAYER_NAME_QUERY_CAPTION, NETWORK_CLIENT_NAME_LENGTH, this, CS_ALPHANUMERAL, QSF_LEN_IN_CHARS);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case WID_CL_SERVER_VISIBILITY:
|
case WID_CL_SERVER_VISIBILITY:
|
||||||
if (!_network_server) break;
|
if (!_network_server) break;
|
||||||
|
|
||||||
|
@@ -1889,6 +1889,12 @@ static ChangeInfoResult StationChangeInfo(uint stid, int numinfo, int prop, cons
|
|||||||
}
|
}
|
||||||
dts->Clone(tmp_layout.data());
|
dts->Clone(tmp_layout.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Number of layouts must be even, alternating X and Y */
|
||||||
|
if (statspec->renderdata.size() & 1) {
|
||||||
|
grfmsg(1, "StationChangeInfo: Station %u defines an odd number of sprite layouts, dropping the last item", stid + i);
|
||||||
|
statspec->renderdata.pop_back();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2011,6 +2017,12 @@ static ChangeInfoResult StationChangeInfo(uint stid, int numinfo, int prop, cons
|
|||||||
/* On error, bail out immediately. Temporary GRF data was already freed */
|
/* On error, bail out immediately. Temporary GRF data was already freed */
|
||||||
if (ReadSpriteLayout(buf, num_building_sprites, false, GSF_STATIONS, true, false, dts)) return CIR_DISABLED;
|
if (ReadSpriteLayout(buf, num_building_sprites, false, GSF_STATIONS, true, false, dts)) return CIR_DISABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Number of layouts must be even, alternating X and Y */
|
||||||
|
if (statspec->renderdata.size() & 1) {
|
||||||
|
grfmsg(1, "StationChangeInfo: Station %u defines an odd number of sprite layouts, dropping the last item", stid + i);
|
||||||
|
statspec->renderdata.pop_back();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -794,8 +794,8 @@ bool DrawStationTile(int x, int y, RailType railtype, Axis axis, StationClassID
|
|||||||
if (statspec == nullptr) return false;
|
if (statspec == nullptr) return false;
|
||||||
|
|
||||||
if (HasBit(statspec->callback_mask, CBM_STATION_SPRITE_LAYOUT)) {
|
if (HasBit(statspec->callback_mask, CBM_STATION_SPRITE_LAYOUT)) {
|
||||||
uint16 callback = GetStationCallback(CBID_STATION_SPRITE_LAYOUT, 0x2110000, 0, statspec, nullptr, INVALID_TILE, railtype);
|
uint16 callback = GetStationCallback(CBID_STATION_SPRITE_LAYOUT, 0, 0, statspec, nullptr, INVALID_TILE, railtype);
|
||||||
if (callback != CALLBACK_FAILED) tile = callback;
|
if (callback != CALLBACK_FAILED) tile = callback & ~1;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 total_offset = rti->GetRailtypeSpriteOffset();
|
uint32 total_offset = rti->GetRailtypeSpriteOffset();
|
||||||
|
@@ -691,7 +691,9 @@ static const NWidgetPart _nested_build_object_widgets[] = {
|
|||||||
NWidget(NWID_HORIZONTAL),
|
NWidget(NWID_HORIZONTAL),
|
||||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_OBJECT_BUILD_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_OBJECT_BUILD_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||||
|
NWidget(WWT_SHADEBOX, COLOUR_DARK_GREEN),
|
||||||
NWidget(WWT_DEFSIZEBOX, COLOUR_DARK_GREEN),
|
NWidget(WWT_DEFSIZEBOX, COLOUR_DARK_GREEN),
|
||||||
|
NWidget(WWT_STICKYBOX, COLOUR_DARK_GREEN),
|
||||||
EndContainer(),
|
EndContainer(),
|
||||||
NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
|
NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
|
||||||
NWidget(NWID_HORIZONTAL), SetPadding(2, 0, 0, 2),
|
NWidget(NWID_HORIZONTAL), SetPadding(2, 0, 0, 2),
|
||||||
|
Reference in New Issue
Block a user