Merge branch 'master' into jgrpp

# Conflicts:
#	.github/workflows/release-macos.yml
#	os/macosx/Info.plist.in
#	src/base_media_base.h
#	src/blitter/32bpp_optimized.cpp
#	src/blitter/null.hpp
#	src/bridge_gui.cpp
#	src/build_vehicle_gui.cpp
#	src/cheat_gui.cpp
#	src/command_type.h
#	src/company_cmd.cpp
#	src/company_cmd.h
#	src/date_gui.cpp
#	src/dropdown.cpp
#	src/error_gui.cpp
#	src/fontcache/truetypefontcache.cpp
#	src/genworld_gui.cpp
#	src/gfx.cpp
#	src/gfx_func.h
#	src/gfx_layout.cpp
#	src/graph_gui.cpp
#	src/group_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/misc_gui.cpp
#	src/network/core/network_game_info.cpp
#	src/network/network_chat_gui.cpp
#	src/network/network_gui.cpp
#	src/newgrf.cpp
#	src/newgrf.h
#	src/newgrf_debug_gui.cpp
#	src/newgrf_text.h
#	src/news_gui.cpp
#	src/openttd.cpp
#	src/order_base.h
#	src/order_gui.cpp
#	src/os/macosx/font_osx.cpp
#	src/pathfinder/yapf/yapf_costcache.hpp
#	src/rail_gui.cpp
#	src/road_cmd.cpp
#	src/roadstop_base.h
#	src/screenshot.cpp
#	src/script/api/script_cargolist.cpp
#	src/script/api/script_order.cpp
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/spritecache.cpp
#	src/spritecache.h
#	src/station_gui.cpp
#	src/table/settings/gui_settings.ini
#	src/tests/mock_spritecache.cpp
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
#	src/vehicle_gui.cpp
#	src/video/opengl.cpp
#	src/video/opengl.h
#	src/widget.cpp
#	src/widget_type.h
#	src/window.cpp
#	src/window_gui.h
pull/741/head
Jonathan G Rennison 3 weeks ago
commit f7de298042

@ -81,7 +81,7 @@ jobs:
- name: Import code signing certificates
if: ${{ false }} # disable for now
uses: Apple-Actions/import-codesign-certs@v2
uses: Apple-Actions/import-codesign-certs@v3
with:
# The certificates in a PKCS12 file encoded as a base64 string
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}

@ -254,6 +254,40 @@ int Func();
* If you are writing one or more template class in the dedicated header file, use file.hpp for its name instead of file.h. This will let others know that it is template library (includes also implementation), not just header with declarations.
### Code Comment Vertical Alignment
When adding code or comments to an existing formatted section, follow the existing style if possible without editing the preexisting lines.
If your addition cannot be aligned with existing code, do not align the comments with anything and use only a single space between the code and the comment.
Good:
```c++
enum Vehicle {
BUS, ///< Take the bus.
+ CAR, ///< Drive your car.
BIKE, ///< Ride your bike
+ TRAIN, ///< Catch the train.
}
```
"Car" is shorter than Bike which allows you to easily align the new comment. "Train" is longer. It is *NOT* desirable to change the vertical comment alignment of this enum.
Bad:
```c++
enum Vehicle {
- BUS, ///< Take the bus.
- BIKE, ///< Ride your bike
+ BUS, ///< Take the bus.
+ CAR, ///< Drive your car.
+ BIKE, ///< Ride your bike
+ TRAIN, ///< Catch the train.
}
```
OpenTTD used to vertically-align inline Doxygen comments as shown above. OpenTTD has since stopped strictly following this rule to keep diffs smaller and reduce pollution to the git blame history for non-functional changes.
### Other important rules
* Put a space before and after binary operators: "a + b", "a == b", "a & b", "a <<= b", etc.. Exceptions are ".", "->" and "[]" (no spaces) and "," (just space after it).
* Put parenthesis where it improves readability: "*(b++)" instead of "*b++", and "if ((a & b) && c == 2)" instead of "if (a & b && c == 2)".

@ -4,6 +4,7 @@ set(CPACK_BUNDLE_NAME "OpenTTD")
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/os/macosx/openttd.icns")
set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/os/macosx/splash.png")
set(CPACK_BUNDLE_APPLE_ENTITLEMENTS "${CMAKE_SOURCE_DIR}/os/macosx/openttd.entitlements")
set(CPACK_DMG_FORMAT "UDBZ")
# Create a temporary Info.plist.in, where we will fill in the version via

@ -215,16 +215,6 @@ Entry- and exit signals are not dragged [#4378]:
for all other signal types where several in a row can serve one
purpose or another.
Station build date is incorrect [#4415]:
The tile query tool will show the date of the last (re)construction
at the station and not the date of the first construction. This is
due to compatibility reasons with NewGRFs and the fact that it is
wrong to say that the station is built in a particular year when it
was completely destroyed/rebuilt later on.
The tile query tool can be fixed by changing the "Build date" text
to "Date at which the last (re)construction took place" but this is
deemed too specific and long for that window.
(Temporary) wrong colours when switching to full screen [#4511]:
On Windows it can happen that you temporarily see wrong colours
when switching to full screen OpenTTD, either by starting

@ -31,5 +31,9 @@
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
<key>LSMinimumSystemVersion</key>
<string>10.13.0</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.simulation-games</string>
</dict>
</plist>

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- As requested in https://partner.steamgames.com/doc/store/application/platforms, allows arbitrary plugin loads on hardened runtime -->
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>

@ -330,6 +330,7 @@ add_files(
newgrf_storage.h
newgrf_text.cpp
newgrf_text.h
newgrf_text_type.h
newgrf_town.cpp
newgrf_town.h
newgrf_townname.cpp

@ -85,7 +85,7 @@ static WindowDesc _ai_config_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_GAME_OPTIONS, WC_NONE,
0,
std::begin(_nested_ai_config_widgets), std::end(_nested_ai_config_widgets)
_nested_ai_config_widgets
);
/**
@ -96,7 +96,7 @@ struct AIConfigWindow : public Window {
int line_height; ///< Height of a single AI-name line.
Scrollbar *vscroll; ///< Cache of the vertical scrollbar.
AIConfigWindow() : Window(&_ai_config_desc)
AIConfigWindow() : Window(_ai_config_desc)
{
this->InitNested(WN_GAME_OPTIONS_AI); // Initializes 'this->line_height' as a side effect.
this->vscroll = this->GetScrollbar(WID_AIC_SCROLLBAR);

@ -71,7 +71,7 @@ static void PlaceAirport(TileIndex tile)
struct BuildAirToolbarWindow : Window {
int last_user_action; // Last started user action.
BuildAirToolbarWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
BuildAirToolbarWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->InitNested(window_number);
this->OnInvalidateData();
@ -203,7 +203,7 @@ static WindowDesc _air_toolbar_desc(__FILE__, __LINE__,
WDP_ALIGN_TOOLBAR, "toolbar_air", 0, 0,
WC_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_air_toolbar_widgets), std::end(_nested_air_toolbar_widgets),
_nested_air_toolbar_widgets,
&BuildAirToolbarWindow::hotkeys
);
@ -219,7 +219,7 @@ Window *ShowBuildAirToolbar()
if (!Company::IsValidID(_local_company)) return nullptr;
CloseWindowByClass(WC_BUILD_TOOLBAR);
return AllocateWindowDescFront<BuildAirToolbarWindow>(&_air_toolbar_desc, TRANSPORT_AIR);
return AllocateWindowDescFront<BuildAirToolbarWindow>(_air_toolbar_desc, TRANSPORT_AIR);
}
class BuildAirportWindow : public PickerWindowBase {
@ -240,7 +240,7 @@ class BuildAirportWindow : public PickerWindowBase {
}
public:
BuildAirportWindow(WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
BuildAirportWindow(WindowDesc &desc, Window *parent) : PickerWindowBase(desc, parent)
{
this->CreateNestedTree();
@ -609,12 +609,12 @@ static WindowDesc _build_airport_desc(__FILE__, __LINE__,
WDP_AUTO, nullptr, 0, 0,
WC_BUILD_STATION, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION,
std::begin(_nested_build_airport_widgets), std::end(_nested_build_airport_widgets)
_nested_build_airport_widgets
);
static void ShowBuildAirportPicker(Window *parent)
{
new BuildAirportWindow(&_build_airport_desc, parent);
new BuildAirportWindow(_build_airport_desc, parent);
}
void InitializeAirportGui()

@ -263,7 +263,7 @@ class ReplaceVehicleWindow : public Window {
}
public:
ReplaceVehicleWindow(WindowDesc *desc, VehicleType vehicletype, GroupID id_g) : Window(desc)
ReplaceVehicleWindow(WindowDesc &desc, VehicleType vehicletype, GroupID id_g) : Window(desc)
{
this->sel_railtype = INVALID_RAILTYPE;
this->sel_roadtype = INVALID_ROADTYPE;
@ -715,10 +715,10 @@ static constexpr NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_VEHICLES_IN_USE, STR_REPLACE_VEHICLE_VEHICLES_IN_USE_TOOLTIP), SetFill(1, 1), SetMinimalSize(0, 12), SetResize(1, 0),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_VEHICLES_IN_USE, STR_REPLACE_VEHICLE_VEHICLES_IN_USE_TOOLTIP), SetFill(1, 1), SetMinimalTextLines(1, WidgetDimensions::unscaled.framerect.Vertical()), SetResize(1, 0),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES, STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES_TOOLTIP), SetFill(1, 1), SetMinimalSize(0, 12), SetResize(1, 0),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES, STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES_TOOLTIP), SetFill(1, 1), SetMinimalTextLines(1, WidgetDimensions::unscaled.framerect.Vertical()), SetResize(1, 0),
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
@ -766,7 +766,7 @@ static WindowDesc _replace_rail_vehicle_desc(__FILE__, __LINE__,
WDP_AUTO, "replace_vehicle_train", 500, 140,
WC_REPLACE_VEHICLE, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_replace_rail_vehicle_widgets), std::end(_nested_replace_rail_vehicle_widgets)
_nested_replace_rail_vehicle_widgets
);
static constexpr NWidgetPart _nested_replace_road_vehicle_widgets[] = {
@ -779,10 +779,10 @@ static constexpr NWidgetPart _nested_replace_road_vehicle_widgets[] = {
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_VEHICLES_IN_USE, STR_REPLACE_VEHICLE_VEHICLES_IN_USE_TOOLTIP), SetFill(1, 1), SetMinimalSize(0, 12), SetResize(1, 0),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_VEHICLES_IN_USE, STR_REPLACE_VEHICLE_VEHICLES_IN_USE_TOOLTIP), SetFill(1, 1), SetMinimalTextLines(1, WidgetDimensions::unscaled.framerect.Vertical()), SetResize(1, 0),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES, STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES_TOOLTIP), SetFill(1, 1), SetMinimalSize(0, 12), SetResize(1, 0),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES, STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES_TOOLTIP), SetFill(1, 1), SetMinimalTextLines(1, WidgetDimensions::unscaled.framerect.Vertical()), SetResize(1, 0),
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
@ -824,7 +824,7 @@ static WindowDesc _replace_road_vehicle_desc(__FILE__, __LINE__,
WDP_AUTO, "replace_vehicle_road", 500, 140,
WC_REPLACE_VEHICLE, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_replace_road_vehicle_widgets), std::end(_nested_replace_road_vehicle_widgets)
_nested_replace_road_vehicle_widgets
);
static constexpr NWidgetPart _nested_replace_vehicle_widgets[] = {
@ -837,10 +837,10 @@ static constexpr NWidgetPart _nested_replace_vehicle_widgets[] = {
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_VEHICLES_IN_USE, STR_REPLACE_VEHICLE_VEHICLES_IN_USE_TOOLTIP), SetFill(1, 1), SetMinimalSize(0, 12), SetResize(1, 0),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_VEHICLES_IN_USE, STR_REPLACE_VEHICLE_VEHICLES_IN_USE_TOOLTIP), SetFill(1, 1), SetMinimalTextLines(1, WidgetDimensions::unscaled.framerect.Vertical()), SetResize(1, 0),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES, STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES_TOOLTIP), SetFill(1, 1), SetMinimalSize(0, 12), SetResize(1, 0),
NWidget(WWT_LABEL, COLOUR_GREY), SetDataTip(STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES, STR_REPLACE_VEHICLE_AVAILABLE_VEHICLES_TOOLTIP), SetFill(1, 1), SetMinimalTextLines(1, WidgetDimensions::unscaled.framerect.Vertical()), SetResize(1, 0),
EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
@ -878,7 +878,7 @@ static WindowDesc _replace_vehicle_desc(__FILE__, __LINE__,
WDP_AUTO, "replace_vehicle", 456, 118,
WC_REPLACE_VEHICLE, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_replace_vehicle_widgets), std::end(_nested_replace_vehicle_widgets)
_nested_replace_vehicle_widgets
);
/**
@ -889,11 +889,9 @@ static WindowDesc _replace_vehicle_desc(__FILE__, __LINE__,
void ShowReplaceGroupVehicleWindow(GroupID id_g, VehicleType vehicletype)
{
CloseWindowById(WC_REPLACE_VEHICLE, vehicletype);
WindowDesc *desc;
switch (vehicletype) {
case VEH_TRAIN: desc = &_replace_rail_vehicle_desc; break;
case VEH_ROAD: desc = &_replace_road_vehicle_desc; break;
default: desc = &_replace_vehicle_desc; break;
case VEH_TRAIN: new ReplaceVehicleWindow(_replace_rail_vehicle_desc, vehicletype, id_g); break;
case VEH_ROAD: new ReplaceVehicleWindow(_replace_road_vehicle_desc, vehicletype, id_g); break;
default: new ReplaceVehicleWindow(_replace_vehicle_desc, vehicletype, id_g); break;
}
new ReplaceVehicleWindow(desc, vehicletype, id_g);
}

@ -158,8 +158,8 @@ struct BaseSet {
*/
const char *GetTextfile(TextfileType type) const
{
for (uint i = 0; i < NUM_FILES; i++) {
const char *textfile = ::GetTextfile(type, BASESET_DIR, this->files[i].filename.c_str());
for (const auto &file : this->files) {
const char *textfile = ::GetTextfile(type, BASESET_DIR, file.filename.c_str());
if (textfile != nullptr) {
return textfile;
}

@ -328,8 +328,8 @@ template <class Tbase_set> const char *TryGetBaseSetFile(const ContentInfo *ci,
if (!md5sum) return s->files[0].filename.c_str();
MD5Hash md5;
for (uint i = 0; i < Tbase_set::NUM_FILES; i++) {
md5 ^= s->files[i].hash;
for (const auto &file : s->files) {
md5 ^= file.hash;
}
if (md5 == ci->md5sum) return s->files[0].filename.c_str();
}

@ -46,7 +46,7 @@ public:
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent, bool animated>
void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator) override {
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override {
return Blitter_32bppSSE_Base::Encode(sprite, allocator);
}
const char *GetName() override { return "32bpp-sse4-anim"; }

@ -295,7 +295,7 @@ void Blitter_32bppOptimized::Draw(Blitter::BlitterParams *bp, BlitterMode mode,
this->Draw<false>(bp, mode, zoom);
}
template <bool Tpal_to_rgb> Sprite *Blitter_32bppOptimized::EncodeInternal(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator)
template <bool Tpal_to_rgb> Sprite *Blitter_32bppOptimized::EncodeInternal(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator)
{
/* streams of pixels (a, r, g, b channels)
*
@ -471,7 +471,7 @@ template <bool Tpal_to_rgb> Sprite *Blitter_32bppOptimized::EncodeInternal(const
len += lengths[z][0] + lengths[z][1];
}
Sprite *dest_sprite = (Sprite *)allocator(sizeof(Sprite) + sizeof(SpriteData) + len);
Sprite *dest_sprite = allocator.Allocate<Sprite>(sizeof(Sprite) + sizeof(SpriteData) + len);
if (len == 0) {
/* Mark sprite as having no levels at all, and therefore replaceable */
@ -507,10 +507,10 @@ template <bool Tpal_to_rgb> Sprite *Blitter_32bppOptimized::EncodeInternal(const
return dest_sprite;
}
template Sprite *Blitter_32bppOptimized::EncodeInternal<true>(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator);
template Sprite *Blitter_32bppOptimized::EncodeInternal<false>(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator);
template Sprite *Blitter_32bppOptimized::EncodeInternal<true>(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator);
template Sprite *Blitter_32bppOptimized::EncodeInternal<false>(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator);
Sprite *Blitter_32bppOptimized::Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator)
Sprite *Blitter_32bppOptimized::Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator)
{
return this->EncodeInternal<true>(sprite, allocator);
}

@ -28,7 +28,7 @@ public:
}
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override;
const char *GetName() override { return "32bpp-optimized"; }
@ -36,7 +36,7 @@ public:
protected:
template <bool Tpal_to_rgb> void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
template <bool Tpal_to_rgb> Sprite *EncodeInternal(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator);
template <bool Tpal_to_rgb> Sprite *EncodeInternal(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator);
};
/** Factory for the optimised 32 bpp blitter (without palette animation). */

@ -134,10 +134,10 @@ void Blitter_32bppSimple::DrawColourMappingRect(void *dst, int width, int height
DEBUG(misc, 0, "32bpp blitter doesn't know how to draw this colour table ('%d')", pal);
}
Sprite *Blitter_32bppSimple::Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator)
Sprite *Blitter_32bppSimple::Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator)
{
Blitter_32bppSimple::Pixel *dst;
Sprite *dest_sprite = static_cast<Sprite *>(allocator(sizeof(*dest_sprite) + static_cast<size_t>(sprite[ZOOM_LVL_MIN].height) * static_cast<size_t>(sprite[ZOOM_LVL_MIN].width) * sizeof(*dst)));
Sprite *dest_sprite = allocator.Allocate<Sprite>(sizeof(*dest_sprite) + static_cast<size_t>(sprite[ZOOM_LVL_MIN].height) * static_cast<size_t>(sprite[ZOOM_LVL_MIN].width) * sizeof(*dst));
dest_sprite->height = sprite[ZOOM_LVL_MIN].height;
dest_sprite->width = sprite[ZOOM_LVL_MIN].width;

@ -26,7 +26,7 @@ class Blitter_32bppSimple : public Blitter_32bppBase {
public:
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override;
const char *GetName() override { return "32bpp-simple"; }
};

@ -20,7 +20,7 @@
/** Instantiation of the SSE2 32bpp blitter factory. */
static FBlitter_32bppSSE2 iFBlitter_32bppSSE2;
Sprite *Blitter_32bppSSE_Base::Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator)
Sprite *Blitter_32bppSSE_Base::Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator)
{
/* First uint32_t of a line = the number of transparent pixels from the left.
* Second uint32_t of a line = the number of transparent pixels from the right.
@ -61,7 +61,7 @@ Sprite *Blitter_32bppSSE_Base::Encode(const SpriteLoader::SpriteCollection &spri
all_sprites_size += rgba_size + mv_size;
}
Sprite *dst_sprite = (Sprite *) allocator(sizeof(Sprite) + sizeof(SpriteData) + all_sprites_size);
Sprite *dst_sprite = allocator.Allocate<Sprite>(sizeof(Sprite) + sizeof(SpriteData) + all_sprites_size);
dst_sprite->height = sprite[ZOOM_LVL_MIN].height;
dst_sprite->width = sprite[ZOOM_LVL_MIN].width;
dst_sprite->x_offs = sprite[ZOOM_LVL_MIN].x_offs;

@ -65,7 +65,7 @@ public:
uint8_t data[]; ///< Data, all zoomlevels.
};
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator);
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator);
};
/** The SSE2 32 bpp blitter (without palette animation). */
@ -80,7 +80,7 @@ public:
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent>
void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator) override {
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override {
return Blitter_32bppSSE_Base::Encode(sprite, allocator);
}

@ -486,7 +486,7 @@ void Blitter_40bppAnim::DrawColourMappingRect(void *dst, int width, int height,
}
}
Sprite *Blitter_40bppAnim::Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator)
Sprite *Blitter_40bppAnim::Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator)
{
return this->EncodeInternal<false>(sprite, allocator);
}

@ -32,7 +32,7 @@ public:
void ScrollBuffer(void *video, int left, int top, int width, int height, int scroll_x, int scroll_y) override;
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override;
size_t BufferSize(uint width, uint height) override;
Blitter::PaletteAnimation UsePaletteAnimation() override;
bool NeedsAnimationBuffer() override;

@ -121,7 +121,7 @@ void Blitter_8bppOptimized::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Z
}
}
Sprite *Blitter_8bppOptimized::Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator)
Sprite *Blitter_8bppOptimized::Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator)
{
/* Make memory for all zoom-levels */
uint memory = sizeof(SpriteData);
@ -220,7 +220,7 @@ Sprite *Blitter_8bppOptimized::Encode(const SpriteLoader::SpriteCollection &spri
assert(size < memory);
/* Allocate the exact amount of memory we need */
Sprite *dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite) + size);
Sprite *dest_sprite = allocator.Allocate<Sprite>(sizeof(*dest_sprite) + size);
dest_sprite->height = sprite[ZOOM_LVL_MIN].height;
dest_sprite->width = sprite[ZOOM_LVL_MIN].width;

@ -23,7 +23,7 @@ public:
};
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override;
const char *GetName() override { return "8bpp-optimized"; }
};

@ -62,10 +62,10 @@ void Blitter_8bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoom
}
}
Sprite *Blitter_8bppSimple::Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator)
Sprite *Blitter_8bppSimple::Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator)
{
Sprite *dest_sprite;
dest_sprite = static_cast<Sprite *>(allocator(sizeof(*dest_sprite) + static_cast<size_t>(sprite[ZOOM_LVL_MIN].height) * static_cast<size_t>(sprite[ZOOM_LVL_MIN].width)));
dest_sprite = allocator.Allocate<Sprite>(sizeof(*dest_sprite) + static_cast<size_t>(sprite[ZOOM_LVL_MIN].height) * static_cast<size_t>(sprite[ZOOM_LVL_MIN].width));
dest_sprite->height = sprite[ZOOM_LVL_MIN].height;
dest_sprite->width = sprite[ZOOM_LVL_MIN].width;

@ -18,7 +18,7 @@ class Blitter_8bppSimple final : public Blitter_8bppBase {
public:
using Blitter_8bppBase::Blitter_8bppBase;
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override;
const char *GetName() override { return "8bpp-simple"; }
};

@ -15,10 +15,10 @@
/** Instantiation of the null blitter factory. */
static FBlitter_Null iFBlitter_Null;
Sprite *Blitter_Null::Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator)
Sprite *Blitter_Null::Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator)
{
Sprite *dest_sprite;
dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite));
dest_sprite = allocator.Allocate<Sprite>(sizeof(*dest_sprite));
dest_sprite->height = sprite[ZOOM_LVL_MIN].height;
dest_sprite->width = sprite[ZOOM_LVL_MIN].width;

@ -23,7 +23,7 @@ public:
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override {};
void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal) override {};
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, AllocatorProc *allocator) override;
Sprite *Encode(const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override;
void *MoveTo(void *video, int x, int y) override { return nullptr; };
void SetPixel(void *video, int x, int y, uint8_t colour) override {};
void SetPixel32(void *video, int x, int y, uint8_t colour, uint32_t colour32) override {};

@ -43,13 +43,13 @@ static WindowDesc _background_desc(__FILE__, __LINE__,
WDP_MANUAL, nullptr, 0, 0,
WC_BOOTSTRAP, WC_NONE,
WDF_NO_CLOSE,
std::begin(_background_widgets), std::end(_background_widgets)
_background_widgets
);
/** The background for the game. */
class BootstrapBackground : public Window {
public:
BootstrapBackground() : Window(&_background_desc)
BootstrapBackground() : Window(_background_desc)
{
this->InitNested(0);
CLRBITS(this->flags, WF_WHITE_BORDER);
@ -79,13 +79,13 @@ static WindowDesc _bootstrap_errmsg_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_BOOTSTRAP, WC_NONE,
WDF_MODAL | WDF_NO_CLOSE,
std::begin(_nested_bootstrap_errmsg_widgets), std::end(_nested_bootstrap_errmsg_widgets)
_nested_bootstrap_errmsg_widgets
);
/** The window for a failed bootstrap. */
class BootstrapErrorWindow : public Window {
public:
BootstrapErrorWindow() : Window(&_bootstrap_errmsg_desc)
BootstrapErrorWindow() : Window(_bootstrap_errmsg_desc)
{
this->InitNested(1);
}
@ -136,7 +136,7 @@ static WindowDesc _bootstrap_download_status_window_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_NETWORK_STATUS_WINDOW, WC_NONE,
WDF_MODAL | WDF_NO_CLOSE,
std::begin(_nested_bootstrap_download_status_window_widgets), std::end(_nested_bootstrap_download_status_window_widgets)
_nested_bootstrap_download_status_window_widgets
);
@ -144,7 +144,7 @@ static WindowDesc _bootstrap_download_status_window_desc(__FILE__, __LINE__,
struct BootstrapContentDownloadStatusWindow : public BaseNetworkContentDownloadStatusWindow {
public:
/** Simple call the constructor of the superclass. */
BootstrapContentDownloadStatusWindow() : BaseNetworkContentDownloadStatusWindow(&_bootstrap_download_status_window_desc)
BootstrapContentDownloadStatusWindow() : BaseNetworkContentDownloadStatusWindow(_bootstrap_download_status_window_desc)
{
}
@ -188,7 +188,7 @@ static WindowDesc _bootstrap_query_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_CONFIRM_POPUP_QUERY, WC_NONE,
WDF_NO_CLOSE,
std::begin(_bootstrap_query_widgets), std::end(_bootstrap_query_widgets)
_bootstrap_query_widgets
);
/** The window for the query. It can't use the generic query window as that uses sprites that don't exist yet. */
@ -197,7 +197,7 @@ class BootstrapAskForDownloadWindow : public Window, ContentCallback {
public:
/** Start listening to the content client events. */
BootstrapAskForDownloadWindow() : Window(&_bootstrap_query_desc)
BootstrapAskForDownloadWindow() : Window(_bootstrap_query_desc)
{
this->InitNested(WN_CONFIRM_POPUP_QUERY_BOOTSTRAP);
_network_content_client.AddCallback(this);

@ -166,7 +166,7 @@ private:
}
public:
BuildBridgeWindow(WindowDesc *desc, TileIndex start, TileIndex end, uint32_t br_type, GUIBridgeList &&bl) : Window(desc),
BuildBridgeWindow(WindowDesc &desc, TileIndex start, TileIndex end, uint32_t br_type, GUIBridgeList &&bl) : Window(desc),
start_tile(start),
end_tile(end),
type(br_type),
@ -353,7 +353,7 @@ static WindowDesc _build_bridge_desc(__FILE__, __LINE__,
WDP_AUTO, "build_bridge", 200, 114,
WC_BUILD_BRIDGE, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION,
std::begin(_nested_build_bridge_widgets), std::end(_nested_build_bridge_widgets)
_nested_build_bridge_widgets
);
/**
@ -461,7 +461,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
}
if (!bl.empty()) {
new BuildBridgeWindow(&_build_bridge_desc, start, end, type, std::move(bl));
new BuildBridgeWindow(_build_bridge_desc, start, end, type, std::move(bl));
} else {
ShowErrorMessage(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, errmsg, WL_INFO, TileX(end) * TILE_SIZE, TileY(end) * TILE_SIZE);
}

@ -1398,7 +1398,7 @@ struct BuildVehicleWindowBase : Window {
Train **virtual_train_out; ///< Virtual train ptr
bool listview_mode; ///< If set, only display the available vehicles and do not show a 'build' button.
BuildVehicleWindowBase(WindowDesc *desc, TileIndex tile, VehicleType type, Train **virtual_train_out) : Window(desc)
BuildVehicleWindowBase(WindowDesc &desc, TileIndex tile, VehicleType type, Train **virtual_train_out) : Window(desc)
{
this->vehicle_type = type;
this->tile = tile;
@ -1602,7 +1602,7 @@ struct BuildVehicleWindow : BuildVehicleWindowBase {
}
}
BuildVehicleWindow(WindowDesc *desc, TileIndex tile, VehicleType type, Train **virtual_train_out) : BuildVehicleWindowBase(desc, tile, type, virtual_train_out), vehicle_editbox(MAX_LENGTH_VEHICLE_NAME_CHARS * MAX_CHAR_LENGTH, MAX_LENGTH_VEHICLE_NAME_CHARS)
BuildVehicleWindow(WindowDesc &desc, TileIndex tile, VehicleType type, Train **virtual_train_out) : BuildVehicleWindowBase(desc, tile, type, virtual_train_out), vehicle_editbox(MAX_LENGTH_VEHICLE_NAME_CHARS * MAX_CHAR_LENGTH, MAX_LENGTH_VEHICLE_NAME_CHARS)
{
this->sel_engine = INVALID_ENGINE;
@ -2454,7 +2454,7 @@ struct BuildVehicleWindowTrainAdvanced final : BuildVehicleWindowBase {
}
}
BuildVehicleWindowTrainAdvanced(WindowDesc *desc, TileIndex tile, Train **virtual_train_out) : BuildVehicleWindowBase(desc, tile, VEH_TRAIN, virtual_train_out)
BuildVehicleWindowTrainAdvanced(WindowDesc &desc, TileIndex tile, Train **virtual_train_out) : BuildVehicleWindowBase(desc, tile, VEH_TRAIN, virtual_train_out)
{
this->loco.sel_engine = INVALID_ENGINE;
this->loco.sort_criteria = _last_sort_criteria_loco;
@ -3299,7 +3299,7 @@ static WindowDesc _build_vehicle_desc(__FILE__, __LINE__,
WDP_AUTO, "build_vehicle", 240, 268,
WC_BUILD_VEHICLE, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_build_vehicle_widgets), std::end(_nested_build_vehicle_widgets),
_nested_build_vehicle_widgets,
&BuildVehicleWindow::hotkeys
);
@ -3307,7 +3307,7 @@ static WindowDesc _build_template_vehicle_desc(__FILE__, __LINE__,
WDP_AUTO, "build_template_vehicle", 240, 268,
WC_BUILD_VIRTUAL_TRAIN, WC_CREATE_TEMPLATE,
WDF_CONSTRUCTION,
std::begin(_nested_build_vehicle_widgets), std::end(_nested_build_vehicle_widgets),
_nested_build_vehicle_widgets,
&BuildVehicleWindow::hotkeys, &_build_vehicle_desc
);
@ -3315,7 +3315,7 @@ static WindowDesc _build_vehicle_desc_train_advanced(__FILE__, __LINE__,
WDP_AUTO, "build_vehicle_dual", 480, 268,
WC_BUILD_VEHICLE, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_build_vehicle_widgets_train_advanced), std::end(_nested_build_vehicle_widgets_train_advanced),
_nested_build_vehicle_widgets_train_advanced,
&BuildVehicleWindow::hotkeys
);
@ -3323,7 +3323,7 @@ static WindowDesc _build_template_vehicle_desc_advanced(__FILE__, __LINE__,
WDP_AUTO, "build_template_vehicle_dual", 480, 268,
WC_BUILD_VIRTUAL_TRAIN, WC_CREATE_TEMPLATE,
WDF_CONSTRUCTION,
std::begin(_nested_build_vehicle_widgets_train_advanced), std::end(_nested_build_vehicle_widgets_train_advanced),
_nested_build_vehicle_widgets_train_advanced,
&BuildVehicleWindow::hotkeys, &_build_vehicle_desc_train_advanced
);
@ -3341,9 +3341,9 @@ void ShowBuildVehicleWindow(const TileIndex tile, const VehicleType type)
CloseWindowById(WC_BUILD_VEHICLE, num);
if (type == VEH_TRAIN && _settings_client.gui.dual_pane_train_purchase_window) {
new BuildVehicleWindowTrainAdvanced(&_build_vehicle_desc_train_advanced, tile, nullptr);
new BuildVehicleWindowTrainAdvanced(_build_vehicle_desc_train_advanced, tile, nullptr);
} else {
new BuildVehicleWindow(&_build_vehicle_desc, tile, type, nullptr);
new BuildVehicleWindow(_build_vehicle_desc, tile, type, nullptr);
}
}
@ -3354,8 +3354,8 @@ void ShowTemplateTrainBuildVehicleWindow(Train **virtual_train)
CloseWindowById(WC_BUILD_VIRTUAL_TRAIN, 0);
if (_settings_client.gui.dual_pane_train_purchase_window) {
new BuildVehicleWindowTrainAdvanced(&_build_template_vehicle_desc_advanced, INVALID_TILE, virtual_train);
new BuildVehicleWindowTrainAdvanced(_build_template_vehicle_desc_advanced, INVALID_TILE, virtual_train);
} else {
new BuildVehicleWindow(&_build_template_vehicle_desc, INVALID_TILE, VEH_TRAIN, virtual_train);
new BuildVehicleWindow(_build_template_vehicle_desc, INVALID_TILE, VEH_TRAIN, virtual_train);
}
}

@ -244,7 +244,7 @@ struct CheatWindow : Window {
Dimension box; ///< Dimension of box sprite
Dimension icon; ///< Dimension of company icon sprite
CheatWindow(WindowDesc *desc) : Window(desc)
CheatWindow(WindowDesc &desc) : Window(desc)
{
this->InitNested();
}
@ -526,7 +526,7 @@ static WindowDesc _cheats_desc(__FILE__, __LINE__,
WDP_AUTO, "cheats", 0, 0,
WC_CHEATS, WC_NONE,
0,
std::begin(_nested_cheat_widgets), std::end(_nested_cheat_widgets)
_nested_cheat_widgets
);
bool CheatWindowMayBeShown()
@ -539,6 +539,6 @@ void ShowCheatWindow()
{
CloseWindowById(WC_CHEATS, 0);
if (CheatWindowMayBeShown()) {
new CheatWindow(&_cheats_desc);
new CheatWindow(_cheats_desc);
}
}

@ -189,7 +189,7 @@ CommandProc CmdBuildLock;
CommandProc CmdCreateSubsidy;
CommandProc CmdCompanyCtrl;
CommandProc CmdCompanyAddAllowList;
CommandProc CmdCompanyAllowListCtrl;
CommandProc CmdCustomNewsItem;
CommandProc CmdCreateGoal;
CommandProc CmdRemoveGoal;
@ -454,7 +454,7 @@ static const Command _command_proc_table[] = {
DEF_CMD(CmdBuildCanal, CMD_DEITY | CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_BUILD_CANAL
DEF_CMD(CmdCreateSubsidy, CMD_DEITY, CMDT_OTHER_MANAGEMENT ), // CMD_CREATE_SUBSIDY
DEF_CMD(CmdCompanyCtrl, CMD_SPECTATOR | CMD_CLIENT_ID | CMD_NO_EST, CMDT_SERVER_SETTING ), // CMD_COMPANY_CTRL
DEF_CMD(CmdCompanyAddAllowList, CMD_NO_TEST, CMDT_SERVER_SETTING ), // CMD_COMPANY_ADD_ALLOW_LIST
DEF_CMD(CmdCompanyAllowListCtrl, CMD_NO_TEST, CMDT_SERVER_SETTING ), // CMD_COMPANY_ALLOW_LIST_CTRL
DEF_CMD(CmdCustomNewsItem, CMD_STR_CTRL | CMD_DEITY | CMD_LOG_AUX, CMDT_OTHER_MANAGEMENT ), // CMD_CUSTOM_NEWS_ITEM
DEF_CMD(CmdCreateGoal, CMD_STR_CTRL | CMD_DEITY | CMD_LOG_AUX, CMDT_OTHER_MANAGEMENT ), // CMD_CREATE_GOAL
DEF_CMD(CmdRemoveGoal, CMD_DEITY | CMD_LOG_AUX, CMDT_OTHER_MANAGEMENT ), // CMD_REMOVE_GOAL

@ -399,7 +399,7 @@ enum Commands {
CMD_CREATE_SUBSIDY, ///< create a new subsidy
CMD_COMPANY_CTRL, ///< used in multiplayer to create a new companies etc.
CMD_COMPANY_ADD_ALLOW_LIST, ///< Used in multiplayer to add a client's public key to the company's allow list.
CMD_COMPANY_ALLOW_LIST_CTRL, ///< Used in multiplayer to add/remove a client's public key to/from the company's allow list.
CMD_CUSTOM_NEWS_ITEM, ///< create a custom news message
CMD_CREATE_GOAL, ///< create a new goal
CMD_REMOVE_GOAL, ///< remove a goal

@ -1116,26 +1116,58 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32_t p1, uin
return CommandCost();
}
static bool ExecuteAllowListCtrlAction(CompanyAllowListCtrlAction action, Company *c, const std::string &public_key)
{
switch (action) {
case CALCA_ADD:
return c->allow_list.Add(public_key);
case CALCA_REMOVE:
return c->allow_list.Remove(public_key);
default:
NOT_REACHED();
}
}
/**
* Add the given public key to the allow list of this company.
* Add or remove the given public key to the allow list of this company.
* @param flags Operation to perform.
* @param public_key The public key of the client to add.
* @param action The action to perform.
* @param public_key The public key of the client to add or remove.
* @return The cost of this operation or an error.
*/
CommandCost CmdCompanyAddAllowList(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
CommandCost CmdCompanyAllowListCtrl(DoCommandFlag flags, CompanyAllowListCtrlAction action, const std::string &public_key)
{
return CMD_ERROR; // Not implemented at this time
Company *c = Company::GetIfValid(_current_company);
if (c == nullptr) return CMD_ERROR;
/* The public key length includes the '\0'. */
if (public_key.size() != NETWORK_PUBLIC_KEY_LENGTH - 1) return CMD_ERROR;
switch (action) {
case CALCA_ADD:
case CALCA_REMOVE:
break;
default:
return CMD_ERROR;
}
/*
if (flags & DC_EXEC) {
if (Company::Get(_current_company)->allow_list.Add(public_key)) {
if (ExecuteAllowListCtrlAction(action, c, public_key)) {
InvalidateWindowData(WC_CLIENT_LIST, 0);
SetWindowDirty(WC_COMPANY, _current_company);
}
}
return CommandCost();
*/
}
CommandCost CmdCompanyAllowListCtrl(TileIndex tile, DoCommandFlag flags, uint32_t p1, uint32_t p2, const char *text)
{
if (StrEmpty(text)) return CMD_ERROR;
return CmdCompanyAllowListCtrl(flags, static_cast<CompanyAllowListCtrlAction>(p1), std::string{text});
}
/**

@ -332,7 +332,7 @@ struct CompanyFinancesWindow : Window {
bool small; ///< Window is toggled to 'small'.
int query_widget; ///< The widget associated with the current text query input.
CompanyFinancesWindow(WindowDesc *desc, CompanyID company) : Window(desc)
CompanyFinancesWindow(WindowDesc &desc, CompanyID company) : Window(desc)
{
const Company *c = Company::Get(company);
this->max_money = std::max<Money>(abs(c->money) * 2, INT32_MAX);
@ -577,7 +577,7 @@ static WindowDesc _company_finances_desc(__FILE__, __LINE__,
WDP_AUTO, "company_finances", 0, 0,
WC_FINANCES, WC_NONE,
0,
std::begin(_nested_company_finances_widgets), std::end(_nested_company_finances_widgets)
_nested_company_finances_widgets
);
/**
@ -590,7 +590,7 @@ void ShowCompanyFinances(CompanyID company)
if (!Company::IsValidID(company)) return;
if (BringWindowToFrontById(WC_FINANCES, company)) return;
new CompanyFinancesWindow(&_company_finances_desc, company);
new CompanyFinancesWindow(_company_finances_desc, company);
}
/* Association of liveries to livery classes */
@ -713,7 +713,7 @@ private:
}
public:
SelectCompanyLiveryWindow(WindowDesc *desc, CompanyID company, GroupID group) : Window(desc)
SelectCompanyLiveryWindow(WindowDesc &desc, CompanyID company, GroupID group) : Window(desc)
{
this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_SCL_MATRIX_SCROLLBAR);
@ -1125,14 +1125,14 @@ static WindowDesc _select_company_livery_desc(__FILE__, __LINE__,
WDP_AUTO, "company_color_scheme", 0, 0,
WC_COMPANY_COLOUR, WC_NONE,
0,
std::begin(_nested_select_company_livery_widgets), std::end(_nested_select_company_livery_widgets)
_nested_select_company_livery_widgets
);
void ShowCompanyLiveryWindow(CompanyID company, GroupID group)
{
SelectCompanyLiveryWindow *w = (SelectCompanyLiveryWindow *)BringWindowToFrontById(WC_COMPANY_COLOUR, company);
if (w == nullptr) {
new SelectCompanyLiveryWindow(&_select_company_livery_desc, company, group);
new SelectCompanyLiveryWindow(_select_company_livery_desc, company, group);
} else if (group != INVALID_GROUP) {
w->SetSelectedGroup(company, group);
}
@ -1392,7 +1392,7 @@ class SelectCompanyManagerFaceWindow : public Window
}
public:
SelectCompanyManagerFaceWindow(WindowDesc *desc, Window *parent) : Window(desc)
SelectCompanyManagerFaceWindow(WindowDesc &desc, Window *parent) : Window(desc)
{
this->advanced = false;
this->CreateNestedTree();
@ -1750,7 +1750,7 @@ static WindowDesc _select_company_manager_face_desc(__FILE__, __LINE__,
WDP_AUTO, nullptr, 0, 0,
WC_COMPANY_MANAGER_FACE, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_select_company_manager_face_widgets), std::end(_nested_select_company_manager_face_widgets)
_nested_select_company_manager_face_widgets
);
/**
@ -1763,7 +1763,7 @@ static void DoSelectCompanyManagerFace(Window *parent)
if (!Company::IsValidID((CompanyID)parent->window_number)) return;
if (BringWindowToFrontById(WC_COMPANY_MANAGER_FACE, parent->window_number)) return;
new SelectCompanyManagerFaceWindow(&_select_company_manager_face_desc, parent);
new SelectCompanyManagerFaceWindow(_select_company_manager_face_desc, parent);
}
static constexpr NWidgetPart _nested_company_infrastructure_widgets[] = {
@ -1802,7 +1802,7 @@ struct CompanyInfrastructureWindow : Window
Scrollbar *vscroll; ///< Scrollbar
CompanyInfrastructureWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
CompanyInfrastructureWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->UpdateRailRoadTypes();
@ -2130,7 +2130,7 @@ struct CompanyInfrastructureWindow : Window
void FindWindowPlacementAndResize(int def_width, int def_height) override
{
if (this->window_desc->GetPreferences().pref_height == 0) {
if (this->window_desc.GetPreferences().pref_height == 0) {
def_height = this->nested_root->smallest_y + this->height_extra;
}
Window::FindWindowPlacementAndResize(def_width, def_height);
@ -2154,7 +2154,7 @@ static WindowDesc _company_infrastructure_desc(__FILE__, __LINE__,
WDP_AUTO, "company_infrastructure", 0, 0,
WC_COMPANY_INFRASTRUCTURE, WC_NONE,
0,
std::begin(_nested_company_infrastructure_widgets), std::end(_nested_company_infrastructure_widgets)
_nested_company_infrastructure_widgets
);
/**
@ -2164,7 +2164,7 @@ static WindowDesc _company_infrastructure_desc(__FILE__, __LINE__,
static void ShowCompanyInfrastructure(CompanyID company)
{
if (!Company::IsValidID(company)) return;
AllocateWindowDescFront<CompanyInfrastructureWindow>(&_company_infrastructure_desc, company);
AllocateWindowDescFront<CompanyInfrastructureWindow>(_company_infrastructure_desc, company);
}
static constexpr NWidgetPart _nested_company_widgets[] = {
@ -2297,7 +2297,7 @@ struct CompanyWindow : Window
CWP_BUTTONS_OTHER, ///< Buttons of the other companies.
};
CompanyWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
CompanyWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->InitNested(window_number);
this->owner = (Owner)this->window_number;
@ -2754,7 +2754,7 @@ static WindowDesc _company_desc(__FILE__, __LINE__,
WDP_AUTO, "company", 0, 0,
WC_COMPANY, WC_NONE,
0,
std::begin(_nested_company_widgets), std::end(_nested_company_widgets)
_nested_company_widgets
);
/**
@ -2765,7 +2765,7 @@ void ShowCompany(CompanyID company)
{
if (!Company::IsValidID(company)) return;
AllocateWindowDescFront<CompanyWindow>(&_company_desc, company);
AllocateWindowDescFront<CompanyWindow>(_company_desc, company);
}
/**
@ -2788,7 +2788,7 @@ void DirtyAllCompanyInfrastructureWindows()
}
struct BuyCompanyWindow : Window {
BuyCompanyWindow(WindowDesc *desc, WindowNumber window_number, bool hostile_takeover) : Window(desc), hostile_takeover(hostile_takeover)
BuyCompanyWindow(WindowDesc &desc, WindowNumber window_number, bool hostile_takeover) : Window(desc), hostile_takeover(hostile_takeover)
{
this->InitNested(window_number);
this->owner = _local_company;
@ -2907,7 +2907,7 @@ static WindowDesc _buy_company_desc(__FILE__, __LINE__,
WDP_AUTO, nullptr, 0, 0,
WC_BUY_COMPANY, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_buy_company_widgets), std::end(_nested_buy_company_widgets)
_nested_buy_company_widgets
);
/**
@ -2919,6 +2919,6 @@ void ShowBuyCompanyDialog(CompanyID company, bool hostile_takeover)
{
auto window = BringWindowToFrontById(WC_BUY_COMPANY, company);
if (window == nullptr) {
new BuyCompanyWindow(&_buy_company_desc, company, hostile_takeover);
new BuyCompanyWindow(_buy_company_desc, company, hostile_takeover);
}
}

@ -76,4 +76,12 @@ enum CompanyCtrlAction {
CCA_END, ///< Sentinel for end.
};
/** The action to do with CMD_COMPANY_ALLOW_LIST_CTRL. */
enum CompanyAllowListCtrlAction : uint8_t {
CALCA_ADD, ///< Create a public key.
CALCA_REMOVE, ///< Remove a public key.
CALCA_END, ///< Sentinel for end.
};
#endif /* COMPANY_TYPE_H */

@ -65,6 +65,7 @@
#include "object_base.h"
#include "newgrf_newsignals.h"
#include "roadstop_base.h"
#include "core/backup_type.hpp"
#include "3rdparty/fmt/chrono.h"
#include <time.h>
@ -2178,6 +2179,52 @@ static std::vector<std::pair<std::string_view, NetworkAuthorizedKeys *>> _consol
{ "settings", &_settings_client.network.settings_authorized_keys },
};
enum ConNetworkAuthorizedKeyAction {
CNAKA_LIST,
CNAKA_ADD,
CNAKA_REMOVE,
};
static void PerformNetworkAuthorizedKeyAction(std::string_view name, NetworkAuthorizedKeys *authorized_keys, ConNetworkAuthorizedKeyAction action, const std::string &authorized_key, CompanyID company = INVALID_COMPANY)
{
switch (action) {
case CNAKA_LIST:
IConsolePrint(CC_WHITE, "The authorized keys for {} are:", name);
for (auto &ak : *authorized_keys) IConsolePrint(CC_INFO, " {}", ak);
return;
case CNAKA_ADD:
if (authorized_keys->Contains(authorized_key)) {
IConsolePrint(CC_WARNING, "Not added {} to {} as it already exists.", authorized_key, name);
return;
}
if (company == INVALID_COMPANY) {
authorized_keys->Add(authorized_key);
} else {
AutoRestoreBackup backup(_current_company, company);
DoCommandP(0, CALCA_ADD, 0, CMD_COMPANY_ALLOW_LIST_CTRL, nullptr, authorized_key.c_str());
}
IConsolePrint(CC_INFO, "Added {} to {}.", authorized_key, name);
return;
case CNAKA_REMOVE:
if (!authorized_keys->Contains(authorized_key)) {
IConsolePrint(CC_WARNING, "Not removed {} from {} as it does not exist.", authorized_key, name);
return;
}
if (company == INVALID_COMPANY) {
authorized_keys->Remove(authorized_key);
} else {
AutoRestoreBackup backup(_current_company, company);
DoCommandP(0, CALCA_REMOVE, 0, CMD_COMPANY_ALLOW_LIST_CTRL, nullptr, authorized_key.c_str());
}
IConsolePrint(CC_INFO, "Removed {} from {}.", authorized_key, name);
return;
}
}
DEF_CONSOLE_CMD(ConNetworkAuthorizedKey)
{
if (argc <= 2) {
@ -2189,29 +2236,31 @@ DEF_CONSOLE_CMD(ConNetworkAuthorizedKey)
std::string buffer;
for (auto [name, _] : _console_cmd_authorized_keys) fmt::format_to(std::back_inserter(buffer), ", {}", name);
IConsolePrint(CC_HELP, "The supported types are: all{}.", buffer);
IConsolePrint(CC_HELP, "The supported types are: all{} and company:<id>.", buffer);
return true;
}
bool valid_type = false; ///< Whether a valid type was given.
for (auto [name, authorized_keys] : _console_cmd_authorized_keys) {
if (!StrEqualsIgnoreCase(argv[2], name) && !StrEqualsIgnoreCase(argv[2], "all")) continue;
valid_type = true;
if (StrEqualsIgnoreCase(argv[1], "list")) {
IConsolePrint(CC_WHITE, "The authorized keys for {} are:", name);
for (auto &authorized_key : *authorized_keys) IConsolePrint(CC_INFO, " {}", authorized_key);
continue;
}
ConNetworkAuthorizedKeyAction action;
std::string_view action_string = argv[1];
if (StrEqualsIgnoreCase(action_string, "list")) {
action = CNAKA_LIST;
} else if (StrEqualsIgnoreCase(action_string, "add")) {
action = CNAKA_ADD;
} else if (StrEqualsIgnoreCase(action_string, "remove") || StrEqualsIgnoreCase(action_string, "delete")) {
action = CNAKA_REMOVE;
} else {
IConsolePrint(CC_WARNING, "No valid action was given.");
return false;
}
std::string authorized_key;
if (action != CNAKA_LIST) {
if (argc <= 3) {
IConsolePrint(CC_ERROR, "You must enter the key.");
return false;
}
std::string authorized_key = argv[3];
authorized_key = argv[3];
if (StrStartsWithIgnoreCase(authorized_key, "client:")) {
std::string id_string(authorized_key.substr(7));
authorized_key = NetworkGetPublicKeyOfClient(static_cast<ClientID>(std::stoi(id_string)));
@ -2221,34 +2270,40 @@ DEF_CONSOLE_CMD(ConNetworkAuthorizedKey)
}
}
if (StrEqualsIgnoreCase(argv[1], "add")) {
if (authorized_keys->Add(authorized_key)) {
IConsolePrint(CC_INFO, "Added {} to {}.", authorized_key, name);
} else {
IConsolePrint(CC_WARNING, "Not added {} to {} as it already exists.", authorized_key, name);
}
continue;
if (authorized_key.size() != NETWORK_PUBLIC_KEY_LENGTH - 1) {
IConsolePrint(CC_ERROR, "You must enter a valid authorized key.");
return false;
}
}
if (StrEqualsIgnoreCase(argv[1], "remove")) {
if (authorized_keys->Remove(authorized_key)) {
IConsolePrint(CC_INFO, "Removed {} from {}.", authorized_key, name);
} else {
IConsolePrint(CC_WARNING, "Not removed {} from {} as it does not exist.", authorized_key, name);
}
continue;
std::string_view type = argv[2];
if (StrEqualsIgnoreCase(type, "all")) {
for (auto [name, authorized_keys] : _console_cmd_authorized_keys) PerformNetworkAuthorizedKeyAction(name, authorized_keys, action, authorized_key);
for (Company *c : Company::Iterate()) PerformNetworkAuthorizedKeyAction(fmt::format("company:{}", c->index + 1), &c->allow_list, action, authorized_key, c->index);
return true;
}
if (StrStartsWithIgnoreCase(type, "company:")) {
std::string id_string(type.substr(8));
Company *c = Company::GetIfValid(std::stoi(id_string) - 1);
if (c == nullptr) {
IConsolePrint(CC_ERROR, "You must enter a valid company id; see 'companies'.");
return false;
}
IConsolePrint(CC_WARNING, "No valid action was given.");
return false;
PerformNetworkAuthorizedKeyAction(type, &c->allow_list, action, authorized_key, c->index);
return true;
}
if (!valid_type) {
IConsolePrint(CC_WARNING, "No valid type was given.");
return false;
for (auto [name, authorized_keys] : _console_cmd_authorized_keys) {
if (StrEqualsIgnoreCase(type, name)) continue;
PerformNetworkAuthorizedKeyAction(name, authorized_keys, action, authorized_key);
return true;
}
return true;
IConsolePrint(CC_WARNING, "No valid type was given.");
return false;
}
DEF_CONSOLE_CMD(ConCompanyPasswordHash)

@ -17,6 +17,7 @@
#include "string_func.h"
#include "strings_func.h"
#include "gfx_func.h"
#include "gfx_layout.h"
#include "settings_type.h"
#include "console_func.h"
#include "rev.h"
@ -108,7 +109,7 @@ static WindowDesc _console_window_desc(__FILE__, __LINE__,
WDP_MANUAL, nullptr, 0, 0,
WC_CONSOLE, WC_NONE,
0,
std::begin(_nested_console_window_widgets), std::end(_nested_console_window_widgets)
_nested_console_window_widgets
);
struct IConsoleWindow : Window
@ -119,7 +120,7 @@ struct IConsoleWindow : Window
int cursor_width;
GUITimer truncate_timer;
IConsoleWindow() : Window(&_console_window_desc)
IConsoleWindow() : Window(_console_window_desc)
{
_iconsole_mode = ICONSOLE_OPENED;
@ -309,10 +310,10 @@ struct IConsoleWindow : Window
{
int delta = std::min<int>(this->width - this->line_offset - _iconsole_cmdline.pixels - ICON_RIGHT_BORDERWIDTH, 0);
Point p1 = GetCharPosInString(_iconsole_cmdline.buf, from, FS_NORMAL);
Point p2 = from != to ? GetCharPosInString(_iconsole_cmdline.buf, to, FS_NORMAL) : p1;
const auto p1 = GetCharPosInString(_iconsole_cmdline.buf, from, FS_NORMAL);
const auto p2 = from != to ? GetCharPosInString(_iconsole_cmdline.buf, to, FS_NORMAL) : p1;
Rect r = {this->line_offset + delta + p1.x, this->height - this->line_height, this->line_offset + delta + p2.x, this->height};
Rect r = {this->line_offset + delta + p1.left, this->height - this->line_height, this->line_offset + delta + p2.right, this->height};
return r;
}

@ -40,7 +40,7 @@ struct SetDateWindow : Window {
* @param max_year the maximum year (inclusive) to show in the year dropdown
* @param callback the callback to call once a date has been selected
*/
SetDateWindow(WindowDesc *desc, WindowNumber window_number, Window *parent, EconTime::Date initial_date, EconTime::Year min_year, EconTime::Year max_year,
SetDateWindow(WindowDesc &desc, WindowNumber window_number, Window *parent, EconTime::Date initial_date, EconTime::Year min_year, EconTime::Year max_year,
SetTickCallback *callback, StringID button_text, StringID button_tooltip) :
Window(desc),
callback(callback),
@ -185,7 +185,7 @@ struct SetMinutesWindow : SetDateWindow
TickMinutes minutes;
/** Constructor. */
SetMinutesWindow(WindowDesc *desc, WindowNumber window_number, Window *parent, StateTicks initial_tick, EconTime::Year min_year, EconTime::Year max_year,
SetMinutesWindow(WindowDesc &desc, WindowNumber window_number, Window *parent, StateTicks initial_tick, EconTime::Year min_year, EconTime::Year max_year,
SetTickCallback *callback, StringID button_text, StringID button_tooltip) :
SetDateWindow(desc, window_number, parent, 0, min_year, max_year, callback, button_text, button_tooltip),
minutes(_settings_time.ToTickMinutes(initial_tick))
@ -348,14 +348,14 @@ static WindowDesc _set_date_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_SET_DATE, WC_NONE,
0,
std::begin(_nested_set_date_widgets), std::end(_nested_set_date_widgets)
_nested_set_date_widgets
);
static WindowDesc _set_minutes_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_SET_DATE, WC_NONE,
0,
std::begin(_nested_set_minutes_widgets), std::end(_nested_set_minutes_widgets)
_nested_set_minutes_widgets
);
/**
@ -373,8 +373,8 @@ void ShowSetDateWindow(Window *parent, int window_number, StateTicks initial_tic
CloseWindowByClass(WC_SET_DATE);
if (!_settings_time.time_in_minutes) {
new SetDateWindow(&_set_date_desc, window_number, parent, StateTicksToDate(initial_tick), min_year, max_year, callback, button_text, button_tooltip);
new SetDateWindow(_set_date_desc, window_number, parent, StateTicksToDate(initial_tick), min_year, max_year, callback, button_text, button_tooltip);
} else {
new SetMinutesWindow(&_set_minutes_desc, window_number, parent, initial_tick, min_year, max_year, callback, button_text, button_tooltip);
new SetMinutesWindow(_set_minutes_desc, window_number, parent, initial_tick, min_year, max_year, callback, button_text, button_tooltip);
}
}

@ -70,7 +70,7 @@ static WindowDesc _departures_desc(__FILE__, __LINE__,
WDP_AUTO, "depatures", 260, 246,
WC_DEPARTURES_BOARD, WC_NONE,
0,
std::begin(_nested_departures_list), std::end(_nested_departures_list)
_nested_departures_list
);
static uint cached_date_width = 0; ///< The cached maximum width required to display a date.
@ -86,7 +86,7 @@ void FlushDeparturesWindowTextCaches()
InvalidateWindowClassesData(WC_DEPARTURES_BOARD, 1);
}
template<bool Twaypoint = false>
template<bool Twaypoint>
struct DeparturesWindow : public Window {
protected:
StationID station; ///< The station whose departures we're showing.
@ -233,7 +233,7 @@ protected:
public:
DeparturesWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc),
DeparturesWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc),
station(window_number),
departures_invalid(true),
vehicles_invalid(true),
@ -570,7 +570,7 @@ public:
*/
void ShowStationDepartures(StationID station)
{
AllocateWindowDescFront<DeparturesWindow<> >(&_departures_desc, station);
AllocateWindowDescFront<DeparturesWindow<false>>(_departures_desc, station);
}
/**
@ -579,7 +579,7 @@ void ShowStationDepartures(StationID station)
*/
void ShowWaypointDepartures(StationID waypoint)
{
AllocateWindowDescFront<DeparturesWindow<true> >(&_departures_desc, waypoint);
AllocateWindowDescFront<DeparturesWindow<true>>(_departures_desc, waypoint);
}
template<bool Twaypoint>

@ -88,28 +88,28 @@ static WindowDesc _train_depot_desc(__FILE__, __LINE__,
WDP_AUTO, "depot_train", 362, 123,
WC_VEHICLE_DEPOT, WC_NONE,
0,
std::begin(_nested_train_depot_widgets), std::end(_nested_train_depot_widgets)
_nested_train_depot_widgets
);
static WindowDesc _road_depot_desc(__FILE__, __LINE__,
WDP_AUTO, "depot_roadveh", 316, 97,
WC_VEHICLE_DEPOT, WC_NONE,
0,
std::begin(_nested_train_depot_widgets), std::end(_nested_train_depot_widgets)
_nested_train_depot_widgets
);
static WindowDesc _ship_depot_desc(__FILE__, __LINE__,
WDP_AUTO, "depot_ship", 306, 99,
WC_VEHICLE_DEPOT, WC_NONE,
0,
std::begin(_nested_train_depot_widgets), std::end(_nested_train_depot_widgets)
_nested_train_depot_widgets
);
static WindowDesc _aircraft_depot_desc(__FILE__, __LINE__,
WDP_AUTO, "depot_aircraft", 332, 99,
WC_VEHICLE_DEPOT, WC_NONE,
0,
std::begin(_nested_train_depot_widgets), std::end(_nested_train_depot_widgets)
_nested_train_depot_widgets
);
extern void DepotSortList(VehicleList *list);
@ -269,7 +269,7 @@ struct DepotWindow : Window {
Scrollbar *hscroll; ///< Only for trains.
Scrollbar *vscroll;
DepotWindow(WindowDesc *desc, TileIndex tile, VehicleType type) : Window(desc)
DepotWindow(WindowDesc &desc, TileIndex tile, VehicleType type) : Window(desc)
{
assert(IsCompanyBuildableVehicleType(type)); // ensure that we make the call with a valid type
@ -1174,16 +1174,13 @@ void ShowDepotWindow(TileIndex tile, VehicleType type)
{
if (BringWindowToFrontById(WC_VEHICLE_DEPOT, tile) != nullptr) return;
WindowDesc *desc;
switch (type) {
default: NOT_REACHED();
case VEH_TRAIN: desc = &_train_depot_desc; break;
case VEH_ROAD: desc = &_road_depot_desc; break;
case VEH_SHIP: desc = &_ship_depot_desc; break;
case VEH_AIRCRAFT: desc = &_aircraft_depot_desc; break;
case VEH_TRAIN: new DepotWindow(_train_depot_desc, tile, type); break;
case VEH_ROAD: new DepotWindow(_road_depot_desc, tile, type); break;
case VEH_SHIP: new DepotWindow(_ship_depot_desc, tile, type); break;
case VEH_AIRCRAFT: new DepotWindow(_aircraft_depot_desc, tile, type); break;
}
new DepotWindow(desc, tile, type);
}
/**

@ -94,7 +94,7 @@ static TileIndex GetOtherAqueductEnd(TileIndex tile_from, TileIndex *tile_to = n
struct BuildDocksToolbarWindow : Window {
DockToolbarWidgets last_clicked_widget; ///< Contains the last widget that has been clicked on this toolbar.
BuildDocksToolbarWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
BuildDocksToolbarWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->last_clicked_widget = WID_DT_INVALID;
this->CreateNestedTree();
@ -350,7 +350,7 @@ static WindowDesc _build_docks_toolbar_desc(__FILE__, __LINE__,
WDP_ALIGN_TOOLBAR, "toolbar_water", 0, 0,
WC_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_build_docks_toolbar_widgets), std::end(_nested_build_docks_toolbar_widgets),
_nested_build_docks_toolbar_widgets,
&BuildDocksToolbarWindow::hotkeys
);
@ -366,7 +366,7 @@ Window *ShowBuildDocksToolbar()
if (!Company::IsValidID(_local_company)) return nullptr;
CloseWindowByClass(WC_BUILD_TOOLBAR);
return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_toolbar_desc, TRANSPORT_WATER);
return AllocateWindowDescFront<BuildDocksToolbarWindow>(_build_docks_toolbar_desc, TRANSPORT_WATER);
}
/**
@ -394,7 +394,7 @@ static WindowDesc _build_docks_scen_toolbar_desc(__FILE__, __LINE__,
WDP_AUTO, "toolbar_water_scen", 0, 0,
WC_SCEN_BUILD_TOOLBAR, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_build_docks_scen_toolbar_widgets), std::end(_nested_build_docks_scen_toolbar_widgets)
_nested_build_docks_scen_toolbar_widgets
);
/**
@ -404,7 +404,7 @@ static WindowDesc _build_docks_scen_toolbar_desc(__FILE__, __LINE__,
*/
Window *ShowBuildDocksScenToolbar()
{
return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_scen_toolbar_desc, TRANSPORT_WATER);
return AllocateWindowDescFront<BuildDocksToolbarWindow>(_build_docks_scen_toolbar_desc, TRANSPORT_WATER);
}
/** Widget numbers of the build-dock GUI. */
@ -418,7 +418,7 @@ enum BuildDockStationWidgets {
struct BuildDocksStationWindow : public PickerWindowBase {
public:
BuildDocksStationWindow(WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
BuildDocksStationWindow(WindowDesc &desc, Window *parent) : PickerWindowBase(desc, parent)
{
this->InitNested(TRANSPORT_WATER);
this->LowerWidget(_settings_client.gui.station_show_coverage + BDSW_LT_OFF);
@ -501,12 +501,12 @@ static WindowDesc _build_dock_station_desc(__FILE__, __LINE__,
WDP_AUTO, nullptr, 0, 0,
WC_BUILD_STATION, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION,
std::begin(_nested_build_dock_station_widgets), std::end(_nested_build_dock_station_widgets)
_nested_build_dock_station_widgets
);
static void ShowBuildDockStationPicker(Window *parent)
{
new BuildDocksStationWindow(&_build_dock_station_desc, parent);
new BuildDocksStationWindow(_build_dock_station_desc, parent);
}
struct BuildDocksDepotWindow : public PickerWindowBase {
@ -521,7 +521,7 @@ private:
}
public:
BuildDocksDepotWindow(WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
BuildDocksDepotWindow(WindowDesc &desc, Window *parent) : PickerWindowBase(desc, parent)
{
this->InitNested(TRANSPORT_WATER);
this->LowerWidget(WID_BDD_X + _ship_depot_direction);
@ -597,13 +597,13 @@ static WindowDesc _build_docks_depot_desc(__FILE__, __LINE__,
WDP_AUTO, nullptr, 0, 0,
WC_BUILD_DEPOT, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION,
std::begin(_nested_build_docks_depot_widgets), std::end(_nested_build_docks_depot_widgets)
_nested_build_docks_depot_widgets
);
static void ShowBuildDocksDepotPicker(Window *parent)
{
new BuildDocksDepotWindow(&_build_docks_depot_desc, parent);
new BuildDocksDepotWindow(_build_docks_depot_desc, parent);
}

@ -65,7 +65,7 @@ static WindowDesc _dropdown_desc(__FILE__, __LINE__,
WDP_MANUAL, nullptr, 0, 0,
WC_DROPDOWN_MENU, WC_NONE,
WDF_NO_FOCUS,
std::begin(_nested_dropdown_menu_widgets), std::end(_nested_dropdown_menu_widgets)
_nested_dropdown_menu_widgets
);
/** Drop-down menu window */
@ -98,7 +98,7 @@ struct DropdownWindow : Window {
* @param persist
*/
DropdownWindow(Window *parent, DropDownList &&list, int selected, WidgetID button, const Rect wi_rect, DropDownModeFlags mode_flags, Colours wi_colour, DropDownSyncFocus sync_parent_focus)
: Window(&_dropdown_desc)
: Window(_dropdown_desc)
, parent_button(button)
, wi_rect(wi_rect)
, list(std::move(list))

@ -69,7 +69,7 @@ static constexpr NWidgetPart _nested_engine_preview_widgets[] = {
struct EnginePreviewWindow : Window {
int vehicle_space; // The space to show the vehicle image
EnginePreviewWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
EnginePreviewWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->InitNested(window_number);
@ -147,13 +147,13 @@ static WindowDesc _engine_preview_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_ENGINE_PREVIEW, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_engine_preview_widgets), std::end(_nested_engine_preview_widgets)
_nested_engine_preview_widgets
);
void ShowEnginePreviewWindow(EngineID engine)
{
AllocateWindowDescFront<EnginePreviewWindow>(&_engine_preview_desc, engine);
AllocateWindowDescFront<EnginePreviewWindow>(_engine_preview_desc, engine);
}
/**

@ -46,7 +46,7 @@ static WindowDesc _errmsg_desc(__FILE__, __LINE__,
WDP_MANUAL, nullptr, 0, 0,
WC_ERRMSG, WC_NONE,
0,
std::begin(_nested_errmsg_widgets), std::end(_nested_errmsg_widgets)
_nested_errmsg_widgets
);
static constexpr NWidgetPart _nested_errmsg_face_widgets[] = {
@ -66,7 +66,7 @@ static WindowDesc _errmsg_face_desc(__FILE__, __LINE__,
WDP_MANUAL, nullptr, 0, 0,
WC_ERRMSG, WC_NONE,
0,
std::begin(_nested_errmsg_face_widgets), std::end(_nested_errmsg_face_widgets)
_nested_errmsg_face_widgets
);
/**
@ -173,7 +173,7 @@ private:
uint height_extra; ///< Height of the #extra_msg string in pixels in the #WID_EM_MESSAGE widget.
public:
ErrmsgWindow(const ErrorMessageData &data) : Window(data.HasFace() ? &_errmsg_face_desc : &_errmsg_desc), ErrorMessageData(data)
ErrmsgWindow(const ErrorMessageData &data) : Window(data.HasFace() ? _errmsg_face_desc : _errmsg_desc), ErrorMessageData(data)
{
this->InitNested();
}

@ -40,6 +40,8 @@ enum DetailedFileType {
DFT_FIOS_DIR, ///< A directory entry.
DFT_FIOS_DIRECT, ///< Direct filename.
DFT_END, ///< End of this enum. Supports a compile time size check against _fios_colours in fios_gui.cpp
DFT_INVALID = 255, ///< Unknown or invalid file.
};

@ -77,7 +77,8 @@ static constexpr NWidgetPart _nested_load_dialog_widgets[] = {
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
EndContainer(),
/* Current directory and free space */
NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_BACKGROUND), SetFill(1, 0), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_BACKGROUND), SetFill(1, 0), SetResize(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
/* Left side : filter box and available files */
@ -85,9 +86,9 @@ static constexpr NWidgetPart _nested_load_dialog_widgets[] = {
/* Filter box with label */
NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_HORIZONTAL), SetPadding(WidgetDimensions::unscaled.framerect.top, 0, WidgetDimensions::unscaled.framerect.bottom, 0),
SetPIP(WidgetDimensions::unscaled.frametext.left, WidgetDimensions::unscaled.frametext.right, 0),
NWidget(WWT_TEXT, COLOUR_GREY), SetFill(0, 1), SetDataTip(STR_SAVELOAD_FILTER_TITLE , STR_NULL),
NWidget(WWT_EDITBOX, COLOUR_GREY, WID_SL_FILTER), SetFill(1, 0), SetMinimalSize(50, 12), SetResize(1, 0),
SetPIP(WidgetDimensions::unscaled.frametext.left, WidgetDimensions::unscaled.frametext.right, 0),
NWidget(WWT_TEXT, COLOUR_GREY), SetFill(0, 1), SetDataTip(STR_SAVELOAD_FILTER_TITLE , STR_NULL),
NWidget(WWT_EDITBOX, COLOUR_GREY, WID_SL_FILTER), SetFill(1, 0), SetResize(1, 0),
SetDataTip(STR_LIST_FILTER_OSKTITLE, STR_LIST_FILTER_TOOLTIP),
EndContainer(),
EndContainer(),
@ -103,7 +104,8 @@ static constexpr NWidgetPart _nested_load_dialog_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_FILE_BACKGROUND),
NWidget(WWT_INSET, COLOUR_GREY, WID_SL_DRIVES_DIRECTORIES_LIST), SetFill(1, 1), SetPadding(2, 2, 2, 2),
SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(1, 10), SetScrollbar(WID_SL_SCROLLBAR), EndContainer(),
SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(1, 10), SetScrollbar(WID_SL_SCROLLBAR),
EndContainer(),
EndContainer(),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_SL_SCROLLBAR),
EndContainer(),
@ -138,14 +140,15 @@ static constexpr NWidgetPart _nested_load_heightmap_dialog_widgets[] = {
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
EndContainer(),
/* Current directory and free space */
NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_BACKGROUND), SetFill(1, 0), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_BACKGROUND), SetFill(1, 0), SetResize(1, 0),
EndContainer(),
/* Filter box with label */
NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_HORIZONTAL), SetPadding(WidgetDimensions::unscaled.framerect.top, 0, WidgetDimensions::unscaled.framerect.bottom, 0),
SetPIP(WidgetDimensions::unscaled.frametext.left, WidgetDimensions::unscaled.frametext.right, 0),
NWidget(WWT_TEXT, COLOUR_GREY), SetFill(0, 1), SetDataTip(STR_SAVELOAD_FILTER_TITLE , STR_NULL),
NWidget(WWT_EDITBOX, COLOUR_GREY, WID_SL_FILTER), SetFill(1, 0), SetMinimalSize(50, 12), SetResize(1, 0),
SetPIP(WidgetDimensions::unscaled.frametext.left, WidgetDimensions::unscaled.frametext.right, 0),
NWidget(WWT_TEXT, COLOUR_GREY), SetFill(0, 1), SetDataTip(STR_SAVELOAD_FILTER_TITLE , STR_NULL),
NWidget(WWT_EDITBOX, COLOUR_GREY, WID_SL_FILTER), SetFill(1, 0), SetResize(1, 0),
SetDataTip(STR_LIST_FILTER_OSKTITLE, STR_LIST_FILTER_TOOLTIP),
EndContainer(),
EndContainer(),
@ -161,7 +164,8 @@ static constexpr NWidgetPart _nested_load_heightmap_dialog_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_FILE_BACKGROUND),
NWidget(WWT_INSET, COLOUR_GREY, WID_SL_DRIVES_DIRECTORIES_LIST), SetFill(1, 1), SetPadding(2, 2, 2, 2),
SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(1, 10), SetScrollbar(WID_SL_SCROLLBAR), EndContainer(),
SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(1, 10), SetScrollbar(WID_SL_SCROLLBAR),
EndContainer(),
EndContainer(),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_SL_SCROLLBAR),
EndContainer(),
@ -183,17 +187,19 @@ static constexpr NWidgetPart _nested_save_dialog_widgets[] = {
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
EndContainer(),
/* Current directory and free space */
NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_BACKGROUND), SetFill(1, 0), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_BACKGROUND), SetFill(1, 0), SetResize(1, 0),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
/* Left side : filter box and available files */
NWidget(NWID_VERTICAL),
/* Filter box with label */
NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetResize(1, 1),
NWidget(NWID_HORIZONTAL), SetPadding(WidgetDimensions::unscaled.framerect.top, 0, WidgetDimensions::unscaled.framerect.bottom, 0),
SetPIP(WidgetDimensions::unscaled.frametext.left, WidgetDimensions::unscaled.frametext.right, 0),
SetPIP(WidgetDimensions::unscaled.frametext.left, WidgetDimensions::unscaled.frametext.right, 0),
NWidget(WWT_TEXT, COLOUR_GREY), SetFill(0, 1), SetDataTip(STR_SAVELOAD_FILTER_TITLE , STR_NULL),
NWidget(WWT_EDITBOX, COLOUR_GREY, WID_SL_FILTER), SetFill(1, 0), SetMinimalSize(50, 12), SetResize(1, 0),
SetDataTip(STR_LIST_FILTER_OSKTITLE, STR_LIST_FILTER_TOOLTIP),
NWidget(WWT_EDITBOX, COLOUR_GREY, WID_SL_FILTER), SetFill(1, 0), SetResize(1, 0),
SetDataTip(STR_LIST_FILTER_OSKTITLE, STR_LIST_FILTER_TOOLTIP),
EndContainer(),
EndContainer(),
/* Sort buttons */
@ -208,7 +214,8 @@ static constexpr NWidgetPart _nested_save_dialog_widgets[] = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_FILE_BACKGROUND),
NWidget(WWT_INSET, COLOUR_GREY, WID_SL_DRIVES_DIRECTORIES_LIST), SetPadding(2, 2, 2, 2),
SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(1, 10), SetScrollbar(WID_SL_SCROLLBAR), EndContainer(),
SetDataTip(0x0, STR_SAVELOAD_LIST_TOOLTIP), SetResize(1, 10), SetScrollbar(WID_SL_SCROLLBAR),
EndContainer(),
EndContainer(),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_SL_SCROLLBAR),
EndContainer(),
@ -225,9 +232,11 @@ static constexpr NWidgetPart _nested_save_dialog_widgets[] = {
/* Right side : game details */
NWidget(NWID_VERTICAL),
NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_DETAILS), SetResize(1, 1), SetFill(1, 1), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_SL_DETAILS), SetResize(1, 1), SetFill(1, 1),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), SetFill(1, 1), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), SetFill(1, 1),
EndContainer(),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
EndContainer(),
EndContainer(),
@ -245,7 +254,8 @@ static const TextColour _fios_colours[] = {
TC_DARK_GREEN, // DFT_FIOS_DIR
TC_ORANGE, // DFT_FIOS_DIRECT
};
/* This should align with the DetailedFileType enum defined in fileio_type.h */
static_assert(std::size(_fios_colours) == DFT_END);
/**
* Sort the collected list save games prior to displaying it in the save/load gui.
@ -311,7 +321,7 @@ public:
this->filename_editbox.text.Assign(GenerateDefaultSaveName());
}
SaveLoadWindow(WindowDesc *desc, AbstractFileType abstract_filetype, SaveLoadOperation fop)
SaveLoadWindow(WindowDesc &desc, AbstractFileType abstract_filetype, SaveLoadOperation fop)
: Window(desc), filename_editbox(64), abstract_filetype(abstract_filetype), fop(fop), filter_editbox(EDITBOX_MAX_SIZE)
{
assert(this->fop == SLO_SAVE || this->fop == SLO_LOAD);
@ -937,7 +947,7 @@ static WindowDesc _load_dialog_desc(__FILE__, __LINE__,
WDP_CENTER, "load_game", 500, 294,
WC_SAVELOAD, WC_NONE,
0,
std::begin(_nested_load_dialog_widgets), std::end(_nested_load_dialog_widgets)
_nested_load_dialog_widgets
);
/** Load heightmap */
@ -945,7 +955,7 @@ static WindowDesc _load_heightmap_dialog_desc(__FILE__, __LINE__,
WDP_CENTER, "load_heightmap", 257, 320,
WC_SAVELOAD, WC_NONE,
0,
std::begin(_nested_load_heightmap_dialog_widgets), std::end(_nested_load_heightmap_dialog_widgets)
_nested_load_heightmap_dialog_widgets
);
/** Save game/scenario */
@ -953,7 +963,7 @@ static WindowDesc _save_dialog_desc(__FILE__, __LINE__,
WDP_CENTER, "save_game", 500, 294,
WC_SAVELOAD, WC_NONE,
0,
std::begin(_nested_save_dialog_widgets), std::end(_nested_save_dialog_widgets)
_nested_save_dialog_widgets
);
/**
@ -965,13 +975,10 @@ void ShowSaveLoadDialog(AbstractFileType abstract_filetype, SaveLoadOperation fo
{
CloseWindowById(WC_SAVELOAD, 0);
WindowDesc *sld;
if (fop == SLO_SAVE) {
sld = &_save_dialog_desc;
new SaveLoadWindow(_save_dialog_desc, abstract_filetype, fop);
} else {
/* Dialogue for loading a file. */
sld = (abstract_filetype == FT_HEIGHTMAP) ? &_load_heightmap_dialog_desc : &_load_dialog_desc;
new SaveLoadWindow((abstract_filetype == FT_HEIGHTMAP) ? _load_heightmap_dialog_desc : _load_dialog_desc, abstract_filetype, fop);
}
new SaveLoadWindow(sld, abstract_filetype, fop);
}

@ -121,52 +121,59 @@ void SetFont(FontSize fontsize, const std::string &font, uint size)
#ifdef WITH_FREETYPE
extern void LoadFreeTypeFont(FontSize fs);
extern void LoadFreeTypeFont(FontSize fs, const std::string &file_name, uint size);
extern void UninitFreeType();
#elif defined(_WIN32)
extern void LoadWin32Font(FontSize fs);
extern void LoadWin32Font(FontSize fs, const std::string &file_name, uint size);
#elif defined(WITH_COCOA)
extern void LoadCoreTextFont(FontSize fs);
extern void LoadCoreTextFont(FontSize fs, const std::string &file_name, uint size);
#endif
static void TryLoadDefaultTrueTypeFont([[maybe_unused]] FontSize fs)
{
#if defined(WITH_FREETYPE) || defined(_WIN32) || defined(WITH_COCOA)
std::string font_name{};
/**
* Get name of default font file for a given font size.
* @param fs Font size.
* @return Name of default font file.
*/
static std::string GetDefaultTruetypeFont(FontSize fs)
{
switch (fs) {
case FS_NORMAL:
font_name = "OpenTTD-Sans.ttf";
break;
case FS_SMALL:
font_name = "OpenTTD-Small.ttf";
break;
case FS_LARGE:
font_name = "OpenTTD-Serif.ttf";
break;
case FS_MONO:
font_name = "OpenTTD-Mono.ttf";
break;
case FS_NORMAL: return "OpenTTD-Sans.ttf";
case FS_SMALL: return "OpenTTD-Small.ttf";
case FS_LARGE: return "OpenTTD-Serif.ttf";
case FS_MONO: return "OpenTTD-Mono.ttf";
default: NOT_REACHED();
}
}
#endif /* defined(WITH_FREETYPE) || defined(_WIN32) || defined(WITH_COCOA) */
/**
* Get path of default font file for a given font size.
* @param fs Font size.
* @return Full path of default font file.
*/
static std::string GetDefaultTruetypeFontFile([[maybe_unused]] FontSize fs)
{
#if defined(WITH_FREETYPE) || defined(_WIN32) || defined(WITH_COCOA)
/* Find font file. */
std::string full_font = FioFindFullPath(BASESET_DIR, font_name);
if (!full_font.empty()) {
int size = FontCache::GetDefaultFontHeight(fs);
#ifdef WITH_FREETYPE
LoadFreeTypeFont(fs, full_font, size);
#elif defined(_WIN32)
LoadWin32Font(fs, full_font, size);
#elif defined(WITH_COCOA)
LoadCoreTextFont(fs, full_font, size);
#endif
}
return FioFindFullPath(BASESET_DIR, GetDefaultTruetypeFont(fs));
#else
return {};
#endif /* defined(WITH_FREETYPE) || defined(_WIN32) || defined(WITH_COCOA) */
}
/**
* Get font to use for a given font size.
* @param fs Font size.
* @return If configured, the font name to use, or the path of the default TrueType font if sprites are not preferred.
*/
std::string GetFontCacheFontName(FontSize fs)
{
const FontCacheSubSetting *settings = GetFontCacheSubSetting(fs);
if (!settings->font.empty()) return settings->font;
if (_fcsettings.prefer_sprite) return {};
return GetDefaultTruetypeFontFile(fs);
}
/**
* (Re)initialize the font cache related things, i.e. load the non-sprite fonts.
* @param monospace Whether to initialise the monospace or regular fonts.
@ -181,17 +188,13 @@ void InitFontCache(bool monospace)
FontCache *fc = FontCache::Get(fs);
if (fc->HasParent()) delete fc;
if (!_fcsettings.prefer_sprite && GetFontCacheSubSetting(fs)->font.empty()) {
TryLoadDefaultTrueTypeFont(fs);
} else {
#ifdef WITH_FREETYPE
LoadFreeTypeFont(fs);
LoadFreeTypeFont(fs);
#elif defined(_WIN32)
LoadWin32Font(fs);
LoadWin32Font(fs);
#elif defined(WITH_COCOA)
LoadCoreTextFont(fs);
LoadCoreTextFont(fs);
#endif
}
}
}

@ -228,6 +228,7 @@ inline FontCacheSubSetting *GetFontCacheSubSetting(FontSize fs)
}
}
std::string GetFontCacheFontName(FontSize fs);
void InitFontCache(bool monospace);
void UninitFontCache();

@ -163,7 +163,8 @@ void LoadFreeTypeFont(FontSize fs)
{
FontCacheSubSetting *settings = GetFontCacheSubSetting(fs);
if (settings->font.empty()) return;
std::string font = GetFontCacheFontName(fs);
if (font.empty()) return;
if (_library == nullptr) {
if (FT_Init_FreeType(&_library) != FT_Err_Ok) {
@ -174,7 +175,7 @@ void LoadFreeTypeFont(FontSize fs)
DEBUG(fontcache, 2, "Initialized");
}
const char *font_name = settings->font.c_str();
const char *font_name = font.c_str();
FT_Face face = nullptr;
/* If font is an absolute path to a ttf, try loading that first. */
@ -203,34 +204,6 @@ void LoadFreeTypeFont(FontSize fs)
}
}
/**
* Load a TrueType font from a file.
* @param fs The font size to load.
* @param file_name Path to the font file.
* @param size Requested font size.
*/
void LoadFreeTypeFont(FontSize fs, const std::string &file_name, uint size)
{
if (_library == nullptr) {
if (FT_Init_FreeType(&_library) != FT_Err_Ok) {
ShowInfo("Unable to initialize FreeType, using sprite fonts instead");
return;
}
Debug(fontcache, 2, "Initialized");
}
FT_Face face = nullptr;
int32_t index = 0;
FT_Error error = FT_New_Face(_library, file_name.c_str(), index, &face);
if (error == FT_Err_Ok) {
LoadFont(fs, face, file_name.c_str(), size);
} else {
FT_Done_Face(face);
}
}
/**
* Free everything that was allocated for this font cache.
*/
@ -303,13 +276,14 @@ const Sprite *FreeTypeFontCache::InternalGetGlyph(GlyphID key, bool aa)
}
}
GlyphEntry new_glyph;
new_glyph.sprite = BlitterFactory::GetCurrentBlitter()->Encode(spritecollection, SimpleSpriteAlloc);
new_glyph.width = slot->advance.x >> 6;
UniquePtrSpriteAllocator allocator;
BlitterFactory::GetCurrentBlitter()->Encode(spritecollection, allocator);
this->SetGlyphPtr(key, &new_glyph);
GlyphEntry new_glyph;
new_glyph.data = std::move(allocator.data);
new_glyph.width = slot->advance.x >> 6;
return new_glyph.sprite;
return this->SetGlyphPtr(key, std::move(new_glyph)).GetSprite();
}

@ -35,7 +35,7 @@ static int ScaleFontTrad(int value)
* Create a new sprite font cache.
* @param fs The font size to create the cache for.
*/
SpriteFontCache::SpriteFontCache(FontSize fs) : FontCache(fs), glyph_to_spriteid_map(nullptr)
SpriteFontCache::SpriteFontCache(FontSize fs) : FontCache(fs)
{
this->InitializeUnicodeGlyphMap();
this->height = ScaleGUITrad(FontCache::GetDefaultFontHeight(this->fs));
@ -43,30 +43,26 @@ SpriteFontCache::SpriteFontCache(FontSize fs) : FontCache(fs), glyph_to_spriteid
}
/**
* Free everything we allocated.
* Get SpriteID associated with a GlyphID.
* @param key Glyph to find.
* @return SpriteID of glyph, or 0 if not present.
*/
SpriteFontCache::~SpriteFontCache()
SpriteID SpriteFontCache::GetUnicodeGlyph(GlyphID key)
{
this->ClearGlyphToSpriteMap();
}
SpriteID SpriteFontCache::GetUnicodeGlyph(char32_t key)
{
if (this->glyph_to_spriteid_map[GB(key, 8, 8)] == nullptr) return 0;
return this->glyph_to_spriteid_map[GB(key, 8, 8)][GB(key, 0, 8)];
const auto found = this->glyph_to_spriteid_map.find(key & ~SPRITE_GLYPH);
if (found == std::end(this->glyph_to_spriteid_map)) return 0;
return found->second;
}
void SpriteFontCache::SetUnicodeGlyph(char32_t key, SpriteID sprite)
{
if (this->glyph_to_spriteid_map == nullptr) this->glyph_to_spriteid_map = CallocT<SpriteID*>(256);
if (this->glyph_to_spriteid_map[GB(key, 8, 8)] == nullptr) this->glyph_to_spriteid_map[GB(key, 8, 8)] = CallocT<SpriteID>(256);
this->glyph_to_spriteid_map[GB(key, 8, 8)][GB(key, 0, 8)] = sprite;
this->glyph_to_spriteid_map[key] = sprite;
}
void SpriteFontCache::InitializeUnicodeGlyphMap()
{
/* Clear out existing glyph map if it exists */
this->ClearGlyphToSpriteMap();
this->glyph_to_spriteid_map.clear();
SpriteID base;
switch (this->fs) {
@ -99,20 +95,6 @@ void SpriteFontCache::InitializeUnicodeGlyphMap()
font_height_cache[this->fs] = this->GetHeight();
}
/**
* Clear the glyph to sprite mapping.
*/
void SpriteFontCache::ClearGlyphToSpriteMap()
{
if (this->glyph_to_spriteid_map == nullptr) return;
for (uint i = 0; i < 256; i++) {
free(this->glyph_to_spriteid_map[i]);
}
free(this->glyph_to_spriteid_map);
this->glyph_to_spriteid_map = nullptr;
}
void SpriteFontCache::ClearFontCache()
{
Layouter::ResetFontCache(this->fs);
@ -122,14 +104,14 @@ void SpriteFontCache::ClearFontCache()
const Sprite *SpriteFontCache::GetGlyph(GlyphID key)
{
SpriteID sprite = this->GetUnicodeGlyph(key);
SpriteID sprite = this->GetUnicodeGlyph(static_cast<char32_t>(key & ~SPRITE_GLYPH));
if (sprite == 0) sprite = this->GetUnicodeGlyph('?');
return GetSprite(sprite, SpriteType::Font, 0);
}
uint SpriteFontCache::GetGlyphWidth(GlyphID key)
{
SpriteID sprite = this->GetUnicodeGlyph(key);
SpriteID sprite = this->GetUnicodeGlyph(static_cast<char32_t>(key & ~SPRITE_GLYPH));
if (sprite == 0) sprite = this->GetUnicodeGlyph('?');
return SpriteExists(sprite) ? GetSprite(sprite, SpriteType::Font, 0)->width + ScaleFontTrad(this->fs != FS_NORMAL ? 1 : 0) : 0;
}

@ -12,17 +12,12 @@
#include "../string_func.h"
#include "../fontcache.h"
#include "../3rdparty/robin_hood/robin_hood.h"
/** Font cache for fonts that are based on a freetype font. */
class SpriteFontCache : public FontCache {
private:
SpriteID **glyph_to_spriteid_map; ///< Mapping of glyphs to sprite IDs.
SpriteID GetUnicodeGlyph(char32_t key);
void ClearGlyphToSpriteMap();
public:
SpriteFontCache(FontSize fs);
~SpriteFontCache();
void SetUnicodeGlyph(char32_t key, SpriteID sprite) override;
void InitializeUnicodeGlyphMap() override;
void ClearFontCache() override;
@ -32,6 +27,10 @@ public:
GlyphID MapCharToGlyph(char32_t key, [[maybe_unused]] bool allow_fallback = true) override { assert(IsPrintable(key)); return SPRITE_GLYPH | key; }
std::string GetFontName() override { return "sprite"; }
bool IsBuiltInFont() override { return true; }
private:
robin_hood::unordered_map<GlyphID, SpriteID> glyph_to_spriteid_map{}; ///< Mapping of glyphs to sprite IDs.
SpriteID GetUnicodeGlyph(GlyphID key);
};
#endif /* SPRITEFONTCACHE_H */

@ -10,7 +10,6 @@
#include "../stdafx.h"
#include "../debug.h"
#include "../fontcache.h"
#include "../blitter/factory.hpp"
#include "../core/bitmath_func.hpp"
#include "../gfx_layout.h"
#include "truetypefontcache.h"
@ -22,7 +21,7 @@
* @param fs The font size that is going to be cached.
* @param pixels The number of pixels this font should be high.
*/
TrueTypeFontCache::TrueTypeFontCache(FontSize fs, int pixels) : FontCache(fs), req_size(pixels), glyph_to_sprite(nullptr)
TrueTypeFontCache::TrueTypeFontCache(FontSize fs, int pixels) : FontCache(fs), req_size(pixels)
{
}
@ -40,49 +39,22 @@ TrueTypeFontCache::~TrueTypeFontCache()
*/
void TrueTypeFontCache::ClearFontCache()
{
if (this->glyph_to_sprite == nullptr) return;
for (int i = 0; i < 256; i++) {
if (this->glyph_to_sprite[i] == nullptr) continue;
for (int j = 0; j < 256; j++) {
if (this->glyph_to_sprite[i][j].duplicate) continue;
free(this->glyph_to_sprite[i][j].sprite);
}
free(this->glyph_to_sprite[i]);
}
free(this->glyph_to_sprite);
this->glyph_to_sprite = nullptr;
this->glyph_to_sprite_map.clear();
Layouter::ResetFontCache(this->fs);
}
TrueTypeFontCache::GlyphEntry *TrueTypeFontCache::GetGlyphPtr(GlyphID key)
{
if (this->glyph_to_sprite == nullptr) return nullptr;
if (this->glyph_to_sprite[GB(key, 8, 8)] == nullptr) return nullptr;
return &this->glyph_to_sprite[GB(key, 8, 8)][GB(key, 0, 8)];
auto found = this->glyph_to_sprite_map.find(key);
if (found == std::end(this->glyph_to_sprite_map)) return nullptr;
return &found->second;
}
void TrueTypeFontCache::SetGlyphPtr(GlyphID key, const GlyphEntry *glyph, bool duplicate)
TrueTypeFontCache::GlyphEntry &TrueTypeFontCache::SetGlyphPtr(GlyphID key, GlyphEntry &&glyph)
{
if (this->glyph_to_sprite == nullptr) {
DEBUG(fontcache, 3, "Allocating root glyph cache for size %u", this->fs);
this->glyph_to_sprite = CallocT<GlyphEntry*>(256);
}
if (this->glyph_to_sprite[GB(key, 8, 8)] == nullptr) {
DEBUG(fontcache, 3, "Allocating glyph cache for range 0x%02X00, size %u", GB(key, 8, 8), this->fs);
this->glyph_to_sprite[GB(key, 8, 8)] = CallocT<GlyphEntry>(256);
}
DEBUG(fontcache, 4, "Set glyph for unicode character 0x%04X, size %u", key, this->fs);
this->glyph_to_sprite[GB(key, 8, 8)][GB(key, 0, 8)].sprite = glyph->sprite;
this->glyph_to_sprite[GB(key, 8, 8)][GB(key, 0, 8)].width = glyph->width;
this->glyph_to_sprite[GB(key, 8, 8)][GB(key, 0, 8)].duplicate = duplicate;
this->glyph_to_sprite_map[key] = std::move(glyph);
return this->glyph_to_sprite_map[key];
}
bool TrueTypeFontCache::GetDrawGlyphShadow()
@ -95,7 +67,7 @@ uint TrueTypeFontCache::GetGlyphWidth(GlyphID key)
if ((key & SPRITE_GLYPH) != 0) return this->parent->GetGlyphWidth(key);
GlyphEntry *glyph = this->GetGlyphPtr(key);
if (glyph == nullptr || glyph->sprite == nullptr) {
if (glyph == nullptr || glyph->data == nullptr) {
this->GetGlyph(key);
glyph = this->GetGlyphPtr(key);
}
@ -109,54 +81,7 @@ const Sprite *TrueTypeFontCache::GetGlyph(GlyphID key)
/* Check for the glyph in our cache */
GlyphEntry *glyph = this->GetGlyphPtr(key);
if (glyph != nullptr && glyph->sprite != nullptr) return glyph->sprite;
if (key == 0) {
GlyphID question_glyph = this->MapCharToGlyph('?');
if (question_glyph == 0) {
/* The font misses the '?' character. Use built-in sprite.
* Note: We cannot use the baseset as this also has to work in the bootstrap GUI. */
#define CPSET { 0, 0, 0, 0, 1 }
#define CP___ { 0, 0, 0, 0, 0 }
static SpriteLoader::CommonPixel builtin_questionmark_data[10 * 8] = {
CP___, CP___, CPSET, CPSET, CPSET, CPSET, CP___, CP___,
CP___, CPSET, CPSET, CP___, CP___, CPSET, CPSET, CP___,
CP___, CP___, CP___, CP___, CP___, CPSET, CPSET, CP___,
CP___, CP___, CP___, CP___, CPSET, CPSET, CP___, CP___,
CP___, CP___, CP___, CPSET, CPSET, CP___, CP___, CP___,
CP___, CP___, CP___, CPSET, CPSET, CP___, CP___, CP___,
CP___, CP___, CP___, CPSET, CPSET, CP___, CP___, CP___,
CP___, CP___, CP___, CP___, CP___, CP___, CP___, CP___,
CP___, CP___, CP___, CPSET, CPSET, CP___, CP___, CP___,
CP___, CP___, CP___, CPSET, CPSET, CP___, CP___, CP___,
};
#undef CPSET
#undef CP___
static const SpriteLoader::SpriteCollection builtin_questionmark = {{ {
10, // height
8, // width
0, // x_offs
0, // y_offs
SpriteType::Font,
SCC_PAL,
builtin_questionmark_data
} }};
Sprite *spr = BlitterFactory::GetCurrentBlitter()->Encode(builtin_questionmark, SimpleSpriteAlloc);
assert(spr != nullptr);
GlyphEntry new_glyph;
new_glyph.sprite = spr;
new_glyph.width = spr->width + (this->fs != FS_NORMAL);
this->SetGlyphPtr(key, &new_glyph, false);
return new_glyph.sprite;
} else {
/* Use '?' for missing characters. */
this->GetGlyph(question_glyph);
glyph = this->GetGlyphPtr(question_glyph);
this->SetGlyphPtr(key, glyph, true);
return glyph->sprite;
}
}
if (glyph != nullptr && glyph->data != nullptr) return glyph->GetSprite();
return this->InternalGetGlyph(key, GetFontAAState());
}

@ -11,6 +11,7 @@
#define TRUETYPEFONTCACHE_H
#include "../fontcache.h"
#include "../3rdparty/robin_hood/robin_hood.h"
static const int MAX_FONT_SIZE = 72; ///< Maximum font size.
@ -29,28 +30,16 @@ protected:
/** Container for information about a glyph. */
struct GlyphEntry {
Sprite *sprite; ///< The loaded sprite.
uint8_t width; ///< The width of the glyph.
bool duplicate; ///< Whether this glyph entry is a duplicate, i.e. may this be freed?
std::unique_ptr<uint8_t[]> data; ///< The loaded sprite.
uint8_t width = 0; ///< The width of the glyph.
Sprite *GetSprite() { return reinterpret_cast<Sprite *>(data.get()); }
};
/**
* The glyph cache. This is structured to reduce memory consumption.
* 1) There is a 'segment' table for each font size.
* 2) Each segment table is a discrete block of characters.
* 3) Each block contains 256 (aligned) characters sequential characters.
*
* The cache is accessed in the following way:
* For character 0x0041 ('A'): glyph_to_sprite[0x00][0x41]
* For character 0x20AC (Euro): glyph_to_sprite[0x20][0xAC]
*
* Currently only 256 segments are allocated, "limiting" us to 65536 characters.
* This can be simply changed in the two functions Get & SetGlyphPtr.
*/
GlyphEntry **glyph_to_sprite;
robin_hood::unordered_map<GlyphID, GlyphEntry> glyph_to_sprite_map{};
GlyphEntry *GetGlyphPtr(GlyphID key);
void SetGlyphPtr(GlyphID key, const GlyphEntry *glyph, bool duplicate = false);
GlyphEntry &SetGlyphPtr(GlyphID key, GlyphEntry &&glyph);
virtual const Sprite *InternalGetGlyph(GlyphID key, bool aa) = 0;

@ -440,7 +440,7 @@ struct FramerateWindow : Window {
static constexpr int MIN_ELEMENTS = 5; ///< smallest number of elements to display
FramerateWindow(WindowDesc *desc, WindowNumber number) : Window(desc)
FramerateWindow(WindowDesc &desc, WindowNumber number) : Window(desc)
{
this->InitNested(number);
this->small = this->IsShaded();
@ -725,7 +725,7 @@ static WindowDesc _framerate_display_desc(__FILE__, __LINE__,
WDP_AUTO, "framerate_display", 0, 0,
WC_FRAMERATE_DISPLAY, WC_NONE,
0,
std::begin(_framerate_window_widgets), std::end(_framerate_window_widgets)
_framerate_window_widgets
);
@ -751,7 +751,7 @@ struct FrametimeGraphWindow : Window {
PerformanceElement element; ///< what element this window renders graph for
Dimension graph_size; ///< size of the main graph area (excluding axis labels)
FrametimeGraphWindow(WindowDesc *desc, WindowNumber number) : Window(desc)
FrametimeGraphWindow(WindowDesc &desc, WindowNumber number) : Window(desc)
{
this->element = (PerformanceElement)number;
this->horizontal_scale = 4;
@ -1017,7 +1017,7 @@ static WindowDesc _frametime_graph_window_desc(__FILE__, __LINE__,
WDP_AUTO, "frametime_graph", 140, 90,
WC_FRAMETIME_GRAPH, WC_NONE,
0,
std::begin(_frametime_graph_window_widgets), std::end(_frametime_graph_window_widgets)
_frametime_graph_window_widgets
);
@ -1025,14 +1025,14 @@ static WindowDesc _frametime_graph_window_desc(__FILE__, __LINE__,
/** Open the general framerate window */
void ShowFramerateWindow()
{
AllocateWindowDescFront<FramerateWindow>(&_framerate_display_desc, 0);
AllocateWindowDescFront<FramerateWindow>(_framerate_display_desc, 0);
}
/** Open a graph window for a performance element */
void ShowFrametimeGraphWindow(PerformanceElement elem)
{
if (elem < PFE_FIRST || elem >= PFE_MAX) return; // maybe warn?
AllocateWindowDescFront<FrametimeGraphWindow>(&_frametime_graph_window_desc, elem, true);
AllocateWindowDescFront<FrametimeGraphWindow>(_frametime_graph_window_desc, elem, true);
}
/** Print performance statistics to game console */

@ -77,7 +77,7 @@ static WindowDesc _gs_config_desc(__FILE__, __LINE__,
WDP_CENTER, "settings_gs_config", 500, 350,
WC_GAME_OPTIONS, WC_NONE,
0,
std::begin(_nested_gs_config_widgets), std::end(_nested_gs_config_widgets)
_nested_gs_config_widgets
);
bool UserIsAllowedToChangeGameScript()
@ -101,7 +101,7 @@ struct GSConfigWindow : public Window {
typedef std::vector<const ScriptConfigItem *> VisibleSettingsList; ///< typdef for a vector of script settings
VisibleSettingsList visible_settings; ///< List of visible GS settings
GSConfigWindow() : Window(&_gs_config_desc),
GSConfigWindow() : Window(_gs_config_desc),
clicked_button(-1),
clicked_dropdown(false),
closing_dropdown(false),

@ -453,7 +453,7 @@ struct GenerateLandscapeWindow : public Window {
this->GetWidget<NWidgetCore>(WID_GL_MAPSIZE_Y_PULLDOWN)->widget_data = mapsize_valid ? STR_JUST_INT : STR_RED_INT;
}
GenerateLandscapeWindow(WindowDesc *desc, WindowNumber number = 0) : Window(desc)
GenerateLandscapeWindow(WindowDesc &desc, WindowNumber number = 0) : Window(desc)
{
this->InitNested(number);
@ -1145,14 +1145,14 @@ static WindowDesc _generate_landscape_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_GENERATE_LANDSCAPE, WC_NONE,
0,
std::begin(_nested_generate_landscape_widgets), std::end(_nested_generate_landscape_widgets)
_nested_generate_landscape_widgets
);
static WindowDesc _heightmap_load_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_GENERATE_LANDSCAPE, WC_NONE,
0,
std::begin(_nested_heightmap_load_widgets), std::end(_nested_heightmap_load_widgets)
_nested_heightmap_load_widgets
);
static void _ShowGenerateLandscape(GenerateLandscapeWindowMode mode)
@ -1170,7 +1170,7 @@ static void _ShowGenerateLandscape(GenerateLandscapeWindowMode mode)
if (!GetHeightmapDimensions(_file_to_saveload.detail_ftype, _file_to_saveload.name.c_str(), &x, &y)) return;
}
WindowDesc *desc = (mode == GLWM_HEIGHTMAP) ? &_heightmap_load_desc : &_generate_landscape_desc;
WindowDesc &desc = (mode == GLWM_HEIGHTMAP) ? _heightmap_load_desc : _generate_landscape_desc;
GenerateLandscapeWindow *w = AllocateWindowDescFront<GenerateLandscapeWindow>(desc, mode, true);
if (mode == GLWM_HEIGHTMAP) {
@ -1224,7 +1224,7 @@ struct CreateScenarioWindow : public Window
this->GetWidget<NWidgetCore>(WID_CS_MAPSIZE_Y_PULLDOWN)->widget_data = mapsize_valid ? STR_JUST_INT : STR_RED_INT;
}
CreateScenarioWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
CreateScenarioWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->InitNested(window_number);
this->LowerWidget(_settings_newgame.game_creation.landscape + WID_CS_TEMPERATE);
@ -1468,14 +1468,14 @@ static WindowDesc _create_scenario_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_GENERATE_LANDSCAPE, WC_NONE,
0,
std::begin(_nested_create_scenario_widgets), std::end(_nested_create_scenario_widgets)
_nested_create_scenario_widgets
);
/** Show the window to create a scenario. */
void ShowCreateScenario()
{
CloseWindowByClass(WC_GENERATE_LANDSCAPE);
new CreateScenarioWindow(&_create_scenario_desc, GLWM_SCENARIO);
new CreateScenarioWindow(_create_scenario_desc, GLWM_SCENARIO);
}
static constexpr NWidgetPart _nested_generate_progress_widgets[] = {
@ -1494,7 +1494,7 @@ static WindowDesc _generate_progress_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_MODAL_PROGRESS, WC_NONE,
0,
std::begin(_nested_generate_progress_widgets), std::end(_nested_generate_progress_widgets)
_nested_generate_progress_widgets
);
struct GenWorldStatus {
@ -1536,7 +1536,7 @@ static void AbortGeneratingWorldCallback(Window *, bool confirmed)
struct GenerateProgressWindow : public Window {
GenerateProgressWindow() : Window(&_generate_progress_desc)
GenerateProgressWindow() : Window(_generate_progress_desc)
{
this->InitNested();
}

@ -523,11 +523,12 @@ void GfxBlitterCtx::SetColourRemap(TextColour colour)
* will be drawn in the right direction.
* @param underline Whether to underline what has been drawn or not.
* @param truncation Whether to perform string truncation or not.
* @param default_colour Colour of text if not specified within string.
*
* @return In case of left or center alignment the right most pixel we have drawn to.
* In case of right alignment the left most pixel we have drawn to.
*/
static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left, int right, StringAlignment align, bool underline, bool truncation)
static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left, int right, StringAlignment align, bool underline, bool truncation, TextColour default_colour)
{
if (line.CountRuns() == 0) return 0;
@ -623,6 +624,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
FontCache *fc = f->fc;
TextColour colour = f->colour;
if (colour == TC_INVALID) colour = default_colour;
colour_has_shadow = (colour & TC_NO_SHADE) == 0 && (colour & ~TC_FORCED) != TC_BLACK;
ctx.SetColourRemap(do_shadow ? TC_BLACK : colour); // the last run also sets the colour for the truncation dots
if (do_shadow && (!fc->GetDrawGlyphShadow() || !colour_has_shadow)) continue;
@ -637,9 +639,9 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
/* Not a valid glyph (empty) */
if (glyph == 0xFFFF) continue;
int begin_x = positions[i].x + left - offset_x;
int end_x = positions[i + 1].x + left - offset_x - 1;
int top = positions[i].y + y;
int begin_x = positions[i].left + left - offset_x;
int end_x = positions[i].right + left - offset_x;
int top = positions[i].top + y;
/* Truncated away. */
if (truncation && (begin_x < min_x || end_x > max_x)) continue;
@ -699,10 +701,10 @@ int DrawString(int left, int right, int top, std::string_view str, TextColour co
return 0;
}
Layouter layout(str, INT32_MAX, colour, fontsize);
Layouter layout(str, INT32_MAX, fontsize);
if (layout.empty()) return 0;
return DrawLayoutLine(*layout.front(), top, left, right, align, underline, true);
return DrawLayoutLine(*layout.front(), top, left, right, align, underline, true, colour);
}
/**
@ -736,7 +738,7 @@ int DrawString(int left, int right, int top, StringID str, TextColour colour, St
int GetStringHeight(std::string_view str, int maxw, FontSize fontsize)
{
assert(maxw > 0);
Layouter layout(str, maxw, TC_FROMSTRING, fontsize);
Layouter layout(str, maxw, fontsize);
return layout.GetBounds().height;
}
@ -812,7 +814,7 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, std::string_vi
* do we really want to support fonts of 0 or less pixels high? */
if (maxh <= 0) return top;
Layouter layout(str, maxw, colour, fontsize);
Layouter layout(str, maxw, fontsize);
int total_height = layout.GetBounds().height;
int y;
switch (align & SA_VERT_MASK) {
@ -841,7 +843,7 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, std::string_vi
last_line = y + line_height;
if (first_line > y) first_line = y;
DrawLayoutLine(*line, y, left, right, align, underline, false);
DrawLayoutLine(*line, y, left, right, align, underline, false, colour);
}
y += line_height;
}
@ -882,7 +884,7 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str,
*/
Dimension GetStringBoundingBox(std::string_view str, FontSize start_fontsize)
{
Layouter layout(str, INT32_MAX, TC_FROMSTRING, start_fontsize);
Layouter layout(str, INT32_MAX, start_fontsize);
return layout.GetBounds();
}
@ -927,39 +929,6 @@ Dimension GetStringListBoundingBox(std::span<const StringID> list, FontSize font
return d;
}
/**
* Get the leading corner of a character in a single-line string relative
* to the start of the string.
* @param str String containing the character.
* @param ch Pointer to the character in the string.
* @param start_fontsize Font size to start the text with.
* @return Upper left corner of the glyph associated with the character.
*/
Point GetCharPosInString(std::string_view str, const char *ch, FontSize start_fontsize)
{
/* Ensure "ch" is inside "str" or at the exact end. */
assert(ch >= str.data() && (ch - str.data()) <= static_cast<ptrdiff_t>(str.size()));
auto it_ch = str.begin() + (ch - str.data());
Layouter layout(str, INT32_MAX, TC_FROMSTRING, start_fontsize);
return layout.GetCharPosition(it_ch);
}
/**
* Get the character from a string that is drawn at a specific position.
* @param str String to test.
* @param x Position relative to the start of the string.
* @param start_fontsize Font size to start the text with.
* @return Index of the character position or -1 if there is no character at the position.
*/
ptrdiff_t GetCharAtPosition(std::string_view str, int x, FontSize start_fontsize)
{
if (x < 0) return -1;
Layouter layout(str, INT32_MAX, TC_FROMSTRING, start_fontsize);
return layout.GetCharAtPosition(x, 0);
}
/**
* Draw single character horizontally centered around (x,y)
* @param c Character (glyph) to draw

@ -161,8 +161,6 @@ int GetStringLineCount(StringID str, int maxw);
Dimension GetStringMultiLineBoundingBox(StringID str, const Dimension &suggestion);
Dimension GetStringMultiLineBoundingBox(std::string_view str, const Dimension &suggestion);
void LoadStringWidthTable(bool monospace = false);
Point GetCharPosInString(std::string_view str, const char *ch, FontSize start_fontsize = FS_NORMAL);
ptrdiff_t GetCharAtPosition(std::string_view str, int x, FontSize start_fontsize = FS_NORMAL);
void DrawDirtyBlocks();
void SetDirtyBlocks(int left, int top, int right, int bottom);

@ -11,6 +11,7 @@
#include "core/math_func.hpp"
#include "gfx_layout.h"
#include "string_func.h"
#include "strings_func.h"
#include "debug.h"
#include "table/control_codes.h"
@ -124,12 +125,11 @@ static inline void GetLayouter(Layouter::LineCacheItem &line, std::string_view s
* Create a new layouter.
* @param str The string to create the layout for.
* @param maxw The maximum width.
* @param colour The colour of the font.
* @param fontsize The size of font to use.
*/
Layouter::Layouter(std::string_view str, int maxw, TextColour colour, FontSize fontsize) : string(str)
Layouter::Layouter(std::string_view str, int maxw, FontSize fontsize) : string(str)
{
FontState state(colour, fontsize);
FontState state(TC_INVALID, fontsize);
while (true) {
auto line_length = str.find_first_of('\n');
@ -225,17 +225,18 @@ static bool IsConsumedFormattingCode(char32_t ch)
* @return Upper left corner of the character relative to the start of the string.
* @note Will only work right for single-line strings.
*/
Point Layouter::GetCharPosition(std::string_view::const_iterator ch) const
ParagraphLayouter::Position Layouter::GetCharPosition(std::string_view::const_iterator ch) const
{
const auto &line = this->front();
/* Pointer to the end-of-string marker? Return total line width. */
if (ch >= this->string.end()) {
Point p = { line->GetWidth(), 0 };
Point p = {_current_text_dir == TD_LTR ? line->GetWidth() : 0, 0};
return p;
}
if (ch < this->string.begin()) {
return { 0, 0 };
Point p = { 0, 0 };
return p;
}
/* Find the code point index which corresponds to the char
@ -247,34 +248,36 @@ Point Layouter::GetCharPosition(std::string_view::const_iterator ch) const
if (!IsConsumedFormattingCode(c)) index += line->GetInternalCharLength(c);
}
/* We couldn't find the code point index. */
if (str != ch) return {0, 0};
/* Initial position, returned if character not found. */
static const Point zero = {0, 0};
const Point *position = &zero;
const ParagraphLayouter::Position initial_position = Point{_current_text_dir == TD_LTR ? 0 : line->GetWidth(), 0};
const ParagraphLayouter::Position *position = &initial_position;
/* We couldn't find the code point index. */
if (str != ch) return *position;
/* Valid character. */
/* Scan all runs until we've found our code point index. */
size_t best_index = SIZE_MAX;
for (int run_index = 0; run_index < line->CountRuns(); run_index++) {
const ParagraphLayouter::VisualRun &run = line->GetVisualRun(run_index);
const auto &positions = run.GetPositions();
const auto &charmap = run.GetGlyphToCharMap();
/* Run starts after our character, use the last found position. */
if (static_cast<size_t>(charmap.front()) > index) return *position;
position = positions.data();
for (auto it = charmap.begin(); it != charmap.end(); /* nothing */) {
/* Plain honest-to-$deity match. */
if (static_cast<size_t>(*it) == index) return *position;
++it;
if (it == charmap.end()) break;
/* We just passed our character, it's probably a ligature, use the last found position. */
if (static_cast<size_t>(*it) > index) return *position;
++position;
auto itp = positions.begin();
for (auto it = charmap.begin(); it != charmap.end(); ++it, ++itp) {
const size_t cur_index = static_cast<size_t>(*it);
/* Found exact character match? */
if (cur_index == index) return *itp;
/* If the character we are looking for has been combined with other characters to form a ligature then
* we may not be able to find an exact match. We don't actually know if our character is part of a
* ligature. In this case we will aim to select the first character of the ligature instead, so the best
* index is the index nearest to but lower than the desired index. */
if (cur_index < index && (best_index < cur_index || best_index == SIZE_MAX)) {
best_index = cur_index;
position = &*itp;
}
}
}
@ -304,8 +307,8 @@ ptrdiff_t Layouter::GetCharAtPosition(int x, size_t line_index) const
/* Not a valid glyph (empty). */
if (glyphs[i] == 0xFFFF) continue;
int begin_x = positions[i].x;
int end_x = positions[i + 1].x;
int begin_x = positions[i].left;
int end_x = positions[i].right + 1;
if (IsInsideMM(x, begin_x, end_x)) {
/* Found our glyph, now convert to UTF-8 string index. */
@ -410,3 +413,36 @@ void Layouter::ReduceLineCache()
if (linecache->size() > 4096) ResetLineCache();
}
}
/**
* Get the leading corner of a character in a single-line string relative
* to the start of the string.
* @param str String containing the character.
* @param ch Pointer to the character in the string.
* @param start_fontsize Font size to start the text with.
* @return Upper left corner of the glyph associated with the character.
*/
ParagraphLayouter::Position GetCharPosInString(std::string_view str, const char *ch, FontSize start_fontsize)
{
/* Ensure "ch" is inside "str" or at the exact end. */
assert(ch >= str.data() && (ch - str.data()) <= static_cast<ptrdiff_t>(str.size()));
auto it_ch = str.begin() + (ch - str.data());
Layouter layout(str, INT32_MAX, start_fontsize);
return layout.GetCharPosition(it_ch);
}
/**
* Get the character from a string that is drawn at a specific position.
* @param str String to test.
* @param x Position relative to the start of the string.
* @param start_fontsize Font size to start the text with.
* @return Index of the character position or -1 if there is no character at the position.
*/
ptrdiff_t GetCharAtPosition(std::string_view str, int x, FontSize start_fontsize)
{
if (x < 0) return -1;
Layouter layout(str, INT32_MAX, start_fontsize);
return layout.GetCharAtPosition(x, 0);
}

@ -42,7 +42,7 @@ struct FontState {
*/
inline void SetColour(TextColour c)
{
assert((c & TC_COLOUR_MASK) >= TC_BLUE && (c & TC_COLOUR_MASK) <= TC_BLACK);
assert(((c & TC_COLOUR_MASK) >= TC_BLUE && (c & TC_COLOUR_MASK) <= TC_BLACK) || (c & TC_COLOUR_MASK) == TC_INVALID);
assert((c & (TC_COLOUR_MASK | TC_FLAGS_MASK)) == c);
if ((this->cur_colour & TC_FORCED) == 0) this->cur_colour = c;
}
@ -96,16 +96,29 @@ class ParagraphLayouter {
public:
virtual ~ParagraphLayouter() = default;
/** Position of a glyph within a VisualRun. */
class Position {
public:
int16_t left; ///< Left-most position of glyph.
int16_t right; ///< Right-most position of glyph.
int16_t top; ///< Top-most position of glyph.
constexpr inline Position(int16_t left, int16_t right, int16_t top) : left(left), right(right), top(top) { }
/** Conversion from a single point to a Position. */
constexpr inline Position(const Point &pt) : left(pt.x), right(pt.x), top(pt.y) { }
};
/** Visual run contains data about the bit of text with the same font. */
class VisualRun {
public:
virtual ~VisualRun() = default;
virtual const Font *GetFont() const = 0;
virtual int GetGlyphCount() const = 0;
virtual const std::vector<GlyphID> &GetGlyphs() const = 0;
virtual const std::vector<Point> &GetPositions() const = 0;
virtual std::span<const GlyphID> GetGlyphs() const = 0;
virtual std::span<const Position> GetPositions() const = 0;
virtual int GetLeading() const = 0;
virtual const std::vector<int> &GetGlyphToCharMap() const = 0;
virtual std::span<const int> GetGlyphToCharMap() const = 0;
};
/** A single line worth of VisualRuns. */
@ -180,9 +193,9 @@ private:
public:
static Font *GetFont(FontSize size, TextColour colour);
Layouter(std::string_view str, int maxw = INT32_MAX, TextColour colour = TC_FROMSTRING, FontSize fontsize = FS_NORMAL);
Layouter(std::string_view str, int maxw = INT32_MAX, FontSize fontsize = FS_NORMAL);
Dimension GetBounds();
Point GetCharPosition(std::string_view::const_iterator ch) const;
ParagraphLayouter::Position GetCharPosition(std::string_view::const_iterator ch) const;
ptrdiff_t GetCharAtPosition(int x, size_t line_index) const;
static void Initialize();
@ -191,4 +204,7 @@ public:
static void ReduceLineCache();
};
ParagraphLayouter::Position GetCharPosInString(std::string_view str, const char *ch, FontSize start_fontsize = FS_NORMAL);
ptrdiff_t GetCharAtPosition(std::string_view str, int x, FontSize start_fontsize = FS_NORMAL);
#endif /* GFX_LAYOUT_H */

@ -40,7 +40,7 @@ public:
/** Visual run contains data about the bit of text with the same font. */
class FallbackVisualRun : public ParagraphLayouter::VisualRun {
std::vector<GlyphID> glyphs; ///< The glyphs we're drawing.
std::vector<Point> positions; ///< The positions of the glyphs.
std::vector<Position> positions; ///< The positions of the glyphs.
std::vector<int> glyph_to_char; ///< The char index of the glyphs.
Font *font; ///< The font used to layout these.
@ -49,10 +49,10 @@ public:
FallbackVisualRun(Font *font, const char32_t *chars, int glyph_count, int char_offset, int x);
const Font *GetFont() const override { return this->font; }
int GetGlyphCount() const override { return static_cast<int>(this->glyphs.size()); }
const std::vector<GlyphID> &GetGlyphs() const override { return this->glyphs; }
const std::vector<Point> &GetPositions() const override { return this->positions; }
std::span<const GlyphID> GetGlyphs() const override { return this->glyphs; }
std::span<const Position> GetPositions() const override { return this->positions; }
int GetLeading() const override { return this->GetFont()->fc->GetHeight(); }
const std::vector<int> &GetGlyphToCharMap() const override { return this->glyph_to_char; }
std::span<const int> GetGlyphToCharMap() const override { return this->glyph_to_char; }
};
/** A single line worth of VisualRuns. */
@ -116,25 +116,22 @@ FallbackParagraphLayout::FallbackVisualRun::FallbackVisualRun(Font *font, const
this->glyphs.reserve(char_count);
this->glyph_to_char.reserve(char_count);
/* Positions contains the location of the begin of each of the glyphs, and the end of the last one. */
this->positions.reserve(char_count + 1);
this->positions.reserve(char_count);
int advance = x;
for (int i = 0; i < char_count; i++) {
const GlyphID &glyph_id = this->glyphs.emplace_back(font->fc->MapCharToGlyph(chars[i]));
int x_advance = font->fc->GetGlyphWidth(glyph_id);
if (isbuiltin) {
this->positions.emplace_back(advance, font->fc->GetAscender()); // Apply sprite font's ascender.
this->positions.emplace_back(advance, advance + x_advance - 1, font->fc->GetAscender()); // Apply sprite font's ascender.
} else if (chars[i] >= SCC_SPRITE_START && chars[i] <= SCC_SPRITE_END) {
this->positions.emplace_back(advance, (font->fc->GetHeight() - ScaleSpriteTrad(FontCache::GetDefaultFontHeight(font->fc->GetSize()))) / 2); // Align sprite font to centre
this->positions.emplace_back(advance, advance + x_advance - 1, (font->fc->GetHeight() - ScaleSpriteTrad(FontCache::GetDefaultFontHeight(font->fc->GetSize()))) / 2); // Align sprite font to centre
} else {
this->positions.emplace_back(advance, 0); // No ascender adjustment.
this->positions.emplace_back(advance, advance + x_advance - 1, 0); // No ascender adjustment.
}
advance += font->fc->GetGlyphWidth(glyph_id);
advance += x_advance;
this->glyph_to_char.push_back(char_offset + i);
}
/* End-of-run position. */
this->positions.emplace_back(advance, 0);
}
/**
@ -165,7 +162,9 @@ int FallbackParagraphLayout::FallbackLine::GetWidth() const
* the last run gives us the end of the line and thus the width.
*/
const auto &run = this->GetVisualRun(this->CountRuns() - 1);
return run.GetPositions().back().x;
const auto &positions = run.GetPositions();
if (positions.empty()) return 0;
return positions.back().right + 1;
}
/**

@ -45,7 +45,7 @@ public:
std::vector<GlyphID> glyphs; ///< The glyphs of the run. Valid after Shape() is called.
std::vector<int> advance; ///< The advance (width) of the glyphs. Valid after Shape() is called.
std::vector<int> glyph_to_char; ///< The mapping from glyphs to characters. Valid after Shape() is called.
std::vector<Point> positions; ///< The positions of the glyphs. Valid after Shape() is called.
std::vector<ParagraphLayouter::Position> positions; ///< The positions of the glyphs. Valid after Shape() is called.
int total_advance = 0; ///< The total advance of the run. Valid after Shape() is called.
ICURun(int start, int length, UBiDiLevel level, UScriptCode script = USCRIPT_UNKNOWN, Font *font = nullptr) : start(start), length(length), level(level), script(script), font(font) {}
@ -62,7 +62,7 @@ public:
class ICUVisualRun : public ParagraphLayouter::VisualRun {
private:
std::vector<GlyphID> glyphs;
std::vector<Point> positions;
std::vector<Position> positions;
std::vector<int> glyph_to_char;
int total_advance;
@ -71,9 +71,9 @@ public:
public:
ICUVisualRun(const ICURun &run, int x);
const std::vector<GlyphID> &GetGlyphs() const override { return this->glyphs; }
const std::vector<Point> &GetPositions() const override { return this->positions; }
const std::vector<int> &GetGlyphToCharMap() const override { return this->glyph_to_char; }
std::span<const GlyphID> GetGlyphs() const override { return this->glyphs; }
std::span<const Position> GetPositions() const override { return this->positions; }
std::span<const int> GetGlyphToCharMap() const override { return this->glyph_to_char; }
const Font *GetFont() const override { return this->font; }
int GetLeading() const override { return this->font->fc->GetHeight(); }
@ -104,7 +104,7 @@ private:
int partial_offset;
public:
ICUParagraphLayout(std::vector<ICURun> &runs, UChar *buff, size_t buff_length) : runs(runs), buff(buff), buff_length(buff_length)
ICUParagraphLayout(std::vector<ICURun> &&runs, UChar *buff, size_t buff_length) : runs(std::move(runs)), buff(buff), buff_length(buff_length)
{
this->Reflow();
}
@ -136,8 +136,8 @@ ICUParagraphLayout::ICUVisualRun::ICUVisualRun(const ICURun &run, int x) :
this->positions.reserve(run.positions.size());
/* Copy positions, moving x coordinate by x offset. */
for (const Point &pt : run.positions) {
this->positions.emplace_back(pt.x + x, pt.y);
for (const auto &pos : run.positions) {
this->positions.emplace_back(pos.left + x, pos.right + x, pos.top);
}
}
@ -179,7 +179,7 @@ void ICURun::Shape(UChar *buff, size_t buff_length)
/* Reserve space, as we already know the size. */
this->glyphs.reserve(glyph_count);
this->glyph_to_char.reserve(glyph_count);
this->positions.reserve(glyph_count + 1);
this->positions.reserve(glyph_count);
this->advance.reserve(glyph_count);
/* Prepare the glyphs/position. ICUVisualRun will give the position an offset if needed. */
@ -189,14 +189,13 @@ void ICURun::Shape(UChar *buff, size_t buff_length)
if (buff[glyph_info[i].cluster] >= SCC_SPRITE_START && buff[glyph_info[i].cluster] <= SCC_SPRITE_END && glyph_info[i].codepoint == 0) {
auto glyph = this->font->fc->MapCharToGlyph(buff[glyph_info[i].cluster]);
this->glyphs.push_back(glyph);
this->positions.emplace_back(advance, (this->font->fc->GetHeight() - ScaleSpriteTrad(FontCache::GetDefaultFontHeight(this->font->fc->GetSize()))) / 2); // Align sprite font to centre
x_advance = this->font->fc->GetGlyphWidth(glyph);
this->glyphs.push_back(glyph);
this->positions.emplace_back(advance, advance + x_advance - 1, (this->font->fc->GetHeight() - ScaleSpriteTrad(FontCache::GetDefaultFontHeight(this->font->fc->GetSize()))) / 2); // Align sprite font to centre
} else {
this->glyphs.push_back(glyph_info[i].codepoint);
this->positions.emplace_back(glyph_pos[i].x_offset / FONT_SCALE + advance, glyph_pos[i].y_offset / FONT_SCALE);
x_advance = glyph_pos[i].x_advance / FONT_SCALE;
this->glyphs.push_back(glyph_info[i].codepoint);
this->positions.emplace_back(glyph_pos[i].x_offset / FONT_SCALE + advance, glyph_pos[i].x_offset / FONT_SCALE + advance + x_advance - 1, glyph_pos[i].y_offset / FONT_SCALE);
}
this->glyph_to_char.push_back(glyph_info[i].cluster);
@ -204,9 +203,6 @@ void ICURun::Shape(UChar *buff, size_t buff_length)
advance += x_advance;
}
/* End-of-run position. */
this->positions.emplace_back(advance, 0);
/* Track the total advancement we made. */
this->total_advance = advance;
@ -378,7 +374,7 @@ std::vector<ICURun> ItemizeStyle(std::vector<ICURun> &runs_current, FontMap &fon
run.Shape(buff, length);
}
return new ICUParagraphLayout(runs, buff, length);
return new ICUParagraphLayout(std::move(runs), buff, length);
}
/* static */ std::unique_ptr<icu::BreakIterator> ICUParagraphLayoutFactory::break_iterator;

@ -132,9 +132,9 @@ void CheckExternalFiles()
if (used_set->GetNumInvalid() != 0) {
/* Not all files were loaded successfully, see which ones */
fmt::format_to(output_iterator, "Trying to load graphics set '{}', but it is incomplete. The game will probably not run correctly until you properly install this set or select another one. See section 4.1 of README.md.\n\nThe following files are corrupted or missing:\n", used_set->name);
for (uint i = 0; i < GraphicsSet::NUM_FILES; i++) {
MD5File::ChecksumResult res = GraphicsSet::CheckMD5(&used_set->files[i], BASESET_DIR);
if (res != MD5File::CR_MATCH) fmt::format_to(output_iterator, "\t{} is {} ({})\n", used_set->files[i].filename, res == MD5File::CR_MISMATCH ? "corrupt" : "missing", used_set->files[i].missing_warning);
for (const auto &file : used_set->files) {
MD5File::ChecksumResult res = GraphicsSet::CheckMD5(&file, BASESET_DIR);
if (res != MD5File::CR_MATCH) fmt::format_to(output_iterator, "\t{} is {} ({})\n", file.filename, res == MD5File::CR_MISMATCH ? "corrupt" : "missing", file.missing_warning);
}
fmt::format_to(output_iterator, "\n");
}

@ -40,7 +40,7 @@ enum GoalColumn {
struct GoalListWindow : public Window {
Scrollbar *vscroll; ///< Reference to the scrollbar widget.
GoalListWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
GoalListWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_GOAL_SCROLLBAR);
@ -306,7 +306,7 @@ static WindowDesc _goals_list_desc(__FILE__, __LINE__,
WDP_AUTO, "list_goals", 500, 127,
WC_GOALS_LIST, WC_NONE,
0,
std::begin(_nested_goals_list_widgets), std::end(_nested_goals_list_widgets)
_nested_goals_list_widgets
);
/**
@ -317,7 +317,7 @@ void ShowGoalsList(CompanyID company)
{
if (!Company::IsValidID(company)) company = (CompanyID)INVALID_COMPANY;
AllocateWindowDescFront<GoalListWindow>(&_goals_list_desc, company);
AllocateWindowDescFront<GoalListWindow>(_goals_list_desc, company);
}
/** Ask a question about a goal. */
@ -327,7 +327,7 @@ struct GoalQuestionWindow : public Window {
int button[3]; ///< Buttons to display.
TextColour colour; ///< Colour of the question text.
GoalQuestionWindow(WindowDesc *desc, WindowNumber window_number, TextColour colour, uint32_t button_mask, const std::string &question) : Window(desc), colour(colour)
GoalQuestionWindow(WindowDesc &desc, WindowNumber window_number, TextColour colour, uint32_t button_mask, const std::string &question) : Window(desc), colour(colour)
{
this->question = question;
@ -451,28 +451,28 @@ static WindowDesc _goal_question_list_desc[] = {
WDP_CENTER, nullptr, 0, 0,
WC_GOAL_QUESTION, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_goal_question_widgets_question), std::end(_nested_goal_question_widgets_question),
_nested_goal_question_widgets_question,
},
{
__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_GOAL_QUESTION, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_goal_question_widgets_info), std::end(_nested_goal_question_widgets_info),
_nested_goal_question_widgets_info,
},
{
__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_GOAL_QUESTION, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_goal_question_widgets_warning), std::end(_nested_goal_question_widgets_warning),
_nested_goal_question_widgets_warning,
},
{
__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_GOAL_QUESTION, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_goal_question_widgets_error), std::end(_nested_goal_question_widgets_error),
_nested_goal_question_widgets_error,
},
};
@ -486,5 +486,5 @@ static WindowDesc _goal_question_list_desc[] = {
void ShowGoalQuestion(uint16_t id, uint8_t type, uint32_t button_mask, const std::string &question)
{
assert(type < GQT_END);
new GoalQuestionWindow(&_goal_question_list_desc[type], id, type == 3 ? TC_WHITE : TC_BLACK, button_mask, question);
new GoalQuestionWindow(_goal_question_list_desc[type], id, type == 3 ? TC_WHITE : TC_BLACK, button_mask, question);
}

@ -51,7 +51,7 @@ static_assert(static_cast<int64_t>(INT64_MAX_IN_DOUBLE) < INT64_MAX);
/****************/
struct GraphLegendWindow : Window {
GraphLegendWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
GraphLegendWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->InitNested(window_number);
@ -148,12 +148,12 @@ static WindowDesc _graph_legend_desc(__FILE__, __LINE__,
WDP_AUTO, "graph_legend", 0, 0,
WC_GRAPH_LEGEND, WC_NONE,
0,
std::begin(_nested_graph_legend_widgets), std::end(_nested_graph_legend_widgets)
_nested_graph_legend_widgets
);
static void ShowGraphLegend()
{
AllocateWindowDescFront<GraphLegendWindow>(&_graph_legend_desc, 0);
AllocateWindowDescFront<GraphLegendWindow>(_graph_legend_desc, 0);
}
/** Contains the interval of a graph's data. */
@ -507,7 +507,7 @@ protected:
}
BaseGraphWindow(WindowDesc *desc, StringID format_str_y_axis) :
BaseGraphWindow(WindowDesc &desc, StringID format_str_y_axis) :
Window(desc),
format_str_y_axis(format_str_y_axis)
{
@ -674,7 +674,7 @@ public:
/********************/
struct OperatingProfitGraphWindow : BaseGraphWindow {
OperatingProfitGraphWindow(WindowDesc *desc, WindowNumber window_number) :
OperatingProfitGraphWindow(WindowDesc &desc, WindowNumber window_number) :
BaseGraphWindow(desc, STR_JUST_CURRENCY_SHORT)
{
this->num_on_x_axis = GRAPH_NUM_MONTHS;
@ -718,13 +718,13 @@ static WindowDesc _operating_profit_desc(__FILE__, __LINE__,
WDP_AUTO, "graph_operating_profit", 0, 0,
WC_OPERATING_PROFIT, WC_NONE,
0,
std::begin(_nested_operating_profit_widgets), std::end(_nested_operating_profit_widgets)
_nested_operating_profit_widgets
);
void ShowOperatingProfitGraph()
{
AllocateWindowDescFront<OperatingProfitGraphWindow>(&_operating_profit_desc, 0);
AllocateWindowDescFront<OperatingProfitGraphWindow>(_operating_profit_desc, 0);
}
@ -733,7 +733,7 @@ void ShowOperatingProfitGraph()
/****************/
struct IncomeGraphWindow : BaseGraphWindow {
IncomeGraphWindow(WindowDesc *desc, WindowNumber window_number) :
IncomeGraphWindow(WindowDesc &desc, WindowNumber window_number) :
BaseGraphWindow(desc, STR_JUST_CURRENCY_SHORT)
{
this->num_on_x_axis = GRAPH_NUM_MONTHS;
@ -777,12 +777,12 @@ static WindowDesc _income_graph_desc(__FILE__, __LINE__,
WDP_AUTO, "graph_income", 0, 0,
WC_INCOME_GRAPH, WC_NONE,
0,
std::begin(_nested_income_graph_widgets), std::end(_nested_income_graph_widgets)
_nested_income_graph_widgets
);
void ShowIncomeGraph()
{
AllocateWindowDescFront<IncomeGraphWindow>(&_income_graph_desc, 0);
AllocateWindowDescFront<IncomeGraphWindow>(_income_graph_desc, 0);
}
/*******************/
@ -795,7 +795,7 @@ struct ExcludingCargoBaseGraphWindow : BaseGraphWindow {
Scrollbar *vscroll; ///< Cargo list scrollbar.
uint legend_width; ///< Width of legend 'blob'.
ExcludingCargoBaseGraphWindow(WindowDesc *desc, StringID format_str_y_axis):
ExcludingCargoBaseGraphWindow(WindowDesc &desc, StringID format_str_y_axis):
BaseGraphWindow(desc, format_str_y_axis)
{}
@ -911,7 +911,7 @@ struct ExcludingCargoBaseGraphWindow : BaseGraphWindow {
struct DeliveredCargoGraphWindow : ExcludingCargoBaseGraphWindow {
bool graph_by_cargo_mode = false;
DeliveredCargoGraphWindow(WindowDesc *desc, WindowNumber window_number) :
DeliveredCargoGraphWindow(WindowDesc &desc, WindowNumber window_number) :
ExcludingCargoBaseGraphWindow(desc, STR_JUST_COMMA)
{
this->num_on_x_axis = GRAPH_NUM_MONTHS;
@ -1102,12 +1102,12 @@ static WindowDesc _delivered_cargo_graph_desc(__FILE__, __LINE__,
WDP_AUTO, "graph_delivered_cargo", 0, 0,
WC_DELIVERED_CARGO, WC_NONE,
0,
std::begin(_nested_delivered_cargo_graph_widgets), std::end(_nested_delivered_cargo_graph_widgets)
_nested_delivered_cargo_graph_widgets
);
void ShowDeliveredCargoGraph()
{
AllocateWindowDescFront<DeliveredCargoGraphWindow>(&_delivered_cargo_graph_desc, 0);
AllocateWindowDescFront<DeliveredCargoGraphWindow>(_delivered_cargo_graph_desc, 0);
}
/***********************/
@ -1115,7 +1115,7 @@ void ShowDeliveredCargoGraph()
/***********************/
struct PerformanceHistoryGraphWindow : BaseGraphWindow {
PerformanceHistoryGraphWindow(WindowDesc *desc, WindowNumber window_number) :
PerformanceHistoryGraphWindow(WindowDesc &desc, WindowNumber window_number) :
BaseGraphWindow(desc, STR_JUST_COMMA)
{
this->num_on_x_axis = GRAPH_NUM_MONTHS;
@ -1166,12 +1166,12 @@ static WindowDesc _performance_history_desc(__FILE__, __LINE__,
WDP_AUTO, "graph_performance", 0, 0,
WC_PERFORMANCE_HISTORY, WC_NONE,
0,
std::begin(_nested_performance_history_widgets), std::end(_nested_performance_history_widgets)
_nested_performance_history_widgets
);
void ShowPerformanceHistoryGraph()
{
AllocateWindowDescFront<PerformanceHistoryGraphWindow>(&_performance_history_desc, 0);
AllocateWindowDescFront<PerformanceHistoryGraphWindow>(_performance_history_desc, 0);
}
/*****************/
@ -1179,7 +1179,7 @@ void ShowPerformanceHistoryGraph()
/*****************/
struct CompanyValueGraphWindow : BaseGraphWindow {
CompanyValueGraphWindow(WindowDesc *desc, WindowNumber window_number) :
CompanyValueGraphWindow(WindowDesc &desc, WindowNumber window_number) :
BaseGraphWindow(desc, STR_JUST_CURRENCY_SHORT)
{
this->num_on_x_axis = GRAPH_NUM_MONTHS;
@ -1223,12 +1223,12 @@ static WindowDesc _company_value_graph_desc(__FILE__, __LINE__,
WDP_AUTO, "graph_company_value", 0, 0,
WC_COMPANY_VALUE, WC_NONE,
0,
std::begin(_nested_company_value_graph_widgets), std::end(_nested_company_value_graph_widgets)
_nested_company_value_graph_widgets
);
void ShowCompanyValueGraph()
{
AllocateWindowDescFront<CompanyValueGraphWindow>(&_company_value_graph_desc, 0);
AllocateWindowDescFront<CompanyValueGraphWindow>(_company_value_graph_desc, 0);
}
/*****************/
@ -1240,7 +1240,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
Scrollbar *vscroll; ///< Cargo list scrollbar.
uint legend_width; ///< Width of legend 'blob'.
PaymentRatesGraphWindow(WindowDesc *desc, WindowNumber window_number) :
PaymentRatesGraphWindow(WindowDesc &desc, WindowNumber window_number) :
BaseGraphWindow(desc, STR_JUST_CURRENCY_SHORT)
{
this->num_on_x_axis = 20;
@ -1573,13 +1573,13 @@ static WindowDesc _cargo_payment_rates_desc(__FILE__, __LINE__,
WDP_AUTO, "graph_cargo_payment_rates", 0, 0,
WC_PAYMENT_RATES, WC_NONE,
0,
std::begin(_nested_cargo_payment_rates_widgets), std::end(_nested_cargo_payment_rates_widgets)
_nested_cargo_payment_rates_widgets
);
void ShowCargoPaymentRates()
{
AllocateWindowDescFront<PaymentRatesGraphWindow>(&_cargo_payment_rates_desc, 0);
AllocateWindowDescFront<PaymentRatesGraphWindow>(_cargo_payment_rates_desc, 0);
}
/*****************************/
@ -1590,7 +1590,7 @@ struct PerformanceRatingDetailWindow : Window {
static CompanyID company;
int timeout;
PerformanceRatingDetailWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
PerformanceRatingDetailWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->UpdateCompanyStats();
@ -1867,12 +1867,12 @@ static WindowDesc _performance_rating_detail_desc(__FILE__, __LINE__,
WDP_AUTO, "league_details", 0, 0,
WC_PERFORMANCE_DETAIL, WC_NONE,
0,
std::begin(_nested_performance_rating_detail_widgets), std::end(_nested_performance_rating_detail_widgets)
_nested_performance_rating_detail_widgets
);
void ShowPerformanceRatingDetail()
{
AllocateWindowDescFront<PerformanceRatingDetailWindow>(&_performance_rating_detail_desc, 0);
AllocateWindowDescFront<PerformanceRatingDetailWindow>(_performance_rating_detail_desc, 0);
}
void InitializeGraphGui()
@ -1892,7 +1892,7 @@ struct StationCargoGraphWindow final : BaseGraphWindow {
CargoTypes legend_excluded_cargo;
CargoTypes present_cargoes;
StationCargoGraphWindow(WindowDesc *desc, WindowNumber window) :
StationCargoGraphWindow(WindowDesc &desc, WindowNumber window) :
BaseGraphWindow(desc, STR_JUST_COMMA)
{
station_id = static_cast<uint16_t>(window);
@ -2143,12 +2143,12 @@ static WindowDesc _station_cargo_desc(__FILE__, __LINE__,
WDP_AUTO, "graph_station_cargo", 0, 0,
WC_STATION_CARGO, WC_NONE,
0,
std::begin(_nested_station_cargo_widgets), std::end(_nested_station_cargo_widgets)
_nested_station_cargo_widgets
);
void ShowStationCargo(StationID station_id)
{
AllocateWindowDescFront<StationCargoGraphWindow>(&_station_cargo_desc, station_id);
AllocateWindowDescFront<StationCargoGraphWindow>(_station_cargo_desc, station_id);
}

@ -78,21 +78,19 @@ static constexpr NWidgetPart _nested_group_widgets[] = {
/* right part */
NWidget(NWID_VERTICAL),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_VERTICAL),
NWidget(NWID_VERTICAL, NC_EQUALSIZE),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_GL_GROUP_BY_ORDER), SetFill(1, 1), SetMinimalSize(0, 12), SetDataTip(STR_STATION_VIEW_GROUP, STR_TOOLTIP_GROUP_ORDER),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_GL_SORT_BY_ORDER), SetFill(1, 1), SetMinimalSize(0, 12), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_GROUP_BY_DROPDOWN), SetFill(1, 0), SetMinimalSize(0, 12), SetDataTip(0x0, STR_TOOLTIP_GROUP_ORDER),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_SORT_BY_DROPDOWN), SetFill(1, 0), SetMinimalSize(0, 12), SetDataTip(0x0, STR_TOOLTIP_SORT_CRITERIA),
NWidget(NWID_VERTICAL, NC_EQUALSIZE),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_GROUP_BY_DROPDOWN), SetFill(1, 1), SetMinimalSize(0, 12), SetDataTip(0x0, STR_TOOLTIP_GROUP_ORDER),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_SORT_BY_DROPDOWN), SetFill(1, 1), SetMinimalSize(0, 12), SetDataTip(0x0, STR_TOOLTIP_SORT_CRITERIA),
EndContainer(),
NWidget(NWID_VERTICAL),
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(0, 12), SetResize(1, 0), EndContainer(),
NWidget(NWID_VERTICAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalTextLines(1, WidgetDimensions::unscaled.framerect.Vertical()), SetFill(0, 1), SetResize(1, 0), EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_GL_FILTER_BY_CARGO_SEL),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_FILTER_BY_CARGO), SetMinimalSize(167, 12), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_FILTER_CRITERIA),
EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(0, 12), SetResize(1, 0), EndContainer(),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_FILTER_BY_CARGO), SetMinimalSize(0, 12), SetFill(0, 1), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_FILTER_CRITERIA),
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(0, 12), SetFill(0, 1), SetResize(1, 0), EndContainer(),
EndContainer(),
EndContainer(),
EndContainer(),
@ -477,7 +475,7 @@ private:
}
public:
VehicleGroupWindow(WindowDesc *desc, WindowNumber window_number) : BaseVehicleListWindow(desc, window_number)
VehicleGroupWindow(WindowDesc &desc, WindowNumber window_number) : BaseVehicleListWindow(desc, window_number)
{
this->CreateNestedTree();
@ -1315,14 +1313,14 @@ static WindowDesc _other_group_desc(__FILE__, __LINE__,
WDP_AUTO, "list_groups", 460, 246,
WC_INVALID, WC_NONE,
0,
std::begin(_nested_group_widgets), std::end(_nested_group_widgets)
_nested_group_widgets
);
static WindowDesc _train_group_desc(__FILE__, __LINE__,
WDP_AUTO, "list_groups_train", 525, 246,
WC_TRAINS_LIST, WC_NONE,
0,
std::begin(_nested_group_widgets), std::end(_nested_group_widgets)
_nested_group_widgets
);
/**
@ -1339,10 +1337,10 @@ void ShowCompanyGroup(CompanyID company, VehicleType vehicle_type, GroupID group
const WindowNumber num = VehicleListIdentifier(VL_GROUP_LIST, vehicle_type, company).Pack();
VehicleGroupWindow *w;
if (vehicle_type == VEH_TRAIN) {
w = AllocateWindowDescFront<VehicleGroupWindow>(&_train_group_desc, num, need_existing_window);
w = AllocateWindowDescFront<VehicleGroupWindow>(_train_group_desc, num, need_existing_window);
} else {
_other_group_desc.cls = GetWindowClassForVehicleType(vehicle_type);
w = AllocateWindowDescFront<VehicleGroupWindow>(&_other_group_desc, num, need_existing_window);
w = AllocateWindowDescFront<VehicleGroupWindow>(_other_group_desc, num, need_existing_window);
}
if (w != nullptr) w->SelectGroup(group);
}

@ -121,7 +121,7 @@ struct GameManualTextfileWindow : public TextfileWindow {
/** Window class displaying the help window. */
struct HelpWindow : public Window {
HelpWindow(WindowDesc *desc, WindowNumber number) : Window(desc)
HelpWindow(WindowDesc &desc, WindowNumber number) : Window(desc)
{
this->InitNested(number);
@ -197,10 +197,10 @@ static WindowDesc _helpwin_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_HELPWIN, WC_NONE,
0,
std::begin(_nested_helpwin_widgets), std::end(_nested_helpwin_widgets)
_nested_helpwin_widgets
);
void ShowHelpWindow()
{
AllocateWindowDescFront<HelpWindow>(&_helpwin_desc, 0);
AllocateWindowDescFront<HelpWindow>(_helpwin_desc, 0);
}

@ -30,7 +30,7 @@ struct EndGameHighScoreBaseWindow : Window {
uint32_t background_img;
int8_t rank;
EndGameHighScoreBaseWindow(WindowDesc *desc) : Window(desc)
EndGameHighScoreBaseWindow(WindowDesc &desc) : Window(desc)
{
this->InitNested();
CLRBITS(this->flags, WF_WHITE_BORDER);
@ -93,7 +93,7 @@ struct EndGameHighScoreBaseWindow : Window {
/** End game window shown at the end of the game */
struct EndGameWindow : EndGameHighScoreBaseWindow {
EndGameWindow(WindowDesc *desc) : EndGameHighScoreBaseWindow(desc)
EndGameWindow(WindowDesc &desc) : EndGameHighScoreBaseWindow(desc)
{
/* Pause in single-player to have a look at the highscore at your own leisure */
if (!_networking) DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);
@ -155,7 +155,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
struct HighScoreWindow : EndGameHighScoreBaseWindow {
bool game_paused_by_player; ///< True if the game was paused by the player when the highscore window was opened.
HighScoreWindow(WindowDesc *desc, int difficulty, int8_t ranking) : EndGameHighScoreBaseWindow(desc)
HighScoreWindow(WindowDesc &desc, int difficulty, int8_t ranking) : EndGameHighScoreBaseWindow(desc)
{
/* pause game to show the chart */
this->game_paused_by_player = _pause_mode == PM_PAUSED_NORMAL;
@ -215,14 +215,14 @@ static WindowDesc _highscore_desc(__FILE__, __LINE__,
WDP_MANUAL, nullptr, 0, 0,
WC_HIGHSCORE, WC_NONE,
0,
std::begin(_nested_highscore_widgets), std::end(_nested_highscore_widgets)
_nested_highscore_widgets
);
static WindowDesc _endgame_desc(__FILE__, __LINE__,
WDP_MANUAL, nullptr, 0, 0,
WC_ENDSCREEN, WC_NONE,
0,
std::begin(_nested_highscore_widgets), std::end(_nested_highscore_widgets)
_nested_highscore_widgets
);
/**
@ -233,7 +233,7 @@ static WindowDesc _endgame_desc(__FILE__, __LINE__,
void ShowHighscoreTable(int difficulty, int8_t ranking)
{
CloseWindowByClass(WC_HIGHSCORE);
new HighScoreWindow(&_highscore_desc, difficulty, ranking);
new HighScoreWindow(_highscore_desc, difficulty, ranking);
}
/**
@ -247,5 +247,5 @@ void ShowEndGameChart()
HideVitalWindows();
CloseWindowByClass(WC_ENDSCREEN);
new EndGameWindow(&_endgame_desc);
new EndGameWindow(_endgame_desc);
}

@ -320,7 +320,7 @@ static WindowDesc _build_industry_desc(__FILE__, __LINE__,
WDP_AUTO, "build_industry", 170, 212,
WC_BUILD_INDUSTRY, WC_NONE,
WDF_CONSTRUCTION,
std::begin(_nested_build_industry_widgets), std::end(_nested_build_industry_widgets)
_nested_build_industry_widgets
);
/** Build (fund or prospect) a new industry, */
@ -424,7 +424,7 @@ class BuildIndustryWindow : public Window {
}
public:
BuildIndustryWindow() : Window(&_build_industry_desc)
BuildIndustryWindow() : Window(_build_industry_desc)
{
this->selected_type = INVALID_INDUSTRYTYPE;
@ -867,7 +867,7 @@ class IndustryViewWindow : public Window
int cheat_line_height; ///< Height of each line for the #WID_IV_INFO panel
public:
IndustryViewWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
IndustryViewWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->flags |= WF_DISABLE_VP_SCROLL;
this->editbox_line = IL_NONE;
@ -1278,12 +1278,12 @@ static WindowDesc _industry_view_desc(__FILE__, __LINE__,
WDP_AUTO, "view_industry", 260, 120,
WC_INDUSTRY_VIEW, WC_NONE,
0,
std::begin(_nested_industry_view_widgets), std::end(_nested_industry_view_widgets)
_nested_industry_view_widgets
);
void ShowIndustryViewWindow(int industry)
{
AllocateWindowDescFront<IndustryViewWindow>(&_industry_view_desc, industry);
AllocateWindowDescFront<IndustryViewWindow>(_industry_view_desc, industry);
}
/** Widget definition of the industry directory gui */
@ -1693,7 +1693,7 @@ protected:
}
public:
IndustryDirectoryWindow(WindowDesc *desc, WindowNumber) : Window(desc), industry_editbox(MAX_FILTER_LENGTH * MAX_CHAR_LENGTH, MAX_FILTER_LENGTH)
IndustryDirectoryWindow(WindowDesc &desc, WindowNumber) : Window(desc), industry_editbox(MAX_FILTER_LENGTH * MAX_CHAR_LENGTH, MAX_FILTER_LENGTH)
{
this->CreateNestedTree();
this->vscroll = this->GetScrollbar(WID_ID_VSCROLLBAR);
@ -1894,8 +1894,8 @@ public:
void OnResize() override
{
this->vscroll->SetCapacityFromWidget(this, WID_ID_INDUSTRY_LIST);
this->hscroll->SetCapacityFromWidget(this, WID_ID_INDUSTRY_LIST);
this->vscroll->SetCapacityFromWidget(this, WID_ID_INDUSTRY_LIST, WidgetDimensions::scaled.framerect.Vertical());
this->hscroll->SetCapacityFromWidget(this, WID_ID_INDUSTRY_LIST, WidgetDimensions::scaled.framerect.Horizontal());
}
void OnEditboxChanged(WidgetID wid) override
@ -1980,13 +1980,13 @@ static WindowDesc _industry_directory_desc(__FILE__, __LINE__,
WDP_AUTO, "list_industries", 428, 190,
WC_INDUSTRY_DIRECTORY, WC_NONE,
0,
std::begin(_nested_industry_directory_widgets), std::end(_nested_industry_directory_widgets),
_nested_industry_directory_widgets,
&IndustryDirectoryWindow::hotkeys
);
void ShowIndustryDirectory()
{
AllocateWindowDescFront<IndustryDirectoryWindow>(&_industry_directory_desc, 0);
AllocateWindowDescFront<IndustryDirectoryWindow>(_industry_directory_desc, 0);
}
/** Widgets of the industry cargoes window. */
@ -2024,7 +2024,7 @@ static WindowDesc _industry_cargoes_desc(__FILE__, __LINE__,
WDP_AUTO, "industry_cargoes", 300, 210,
WC_INDUSTRY_CARGOES, WC_NONE,
0,
std::begin(_nested_industry_cargoes_widgets), std::end(_nested_industry_cargoes_widgets)
_nested_industry_cargoes_widgets
);
/** Available types of field. */
@ -2608,7 +2608,7 @@ struct IndustryCargoesWindow : public Window {
Dimension ind_textsize; ///< Size to hold any industry type text, as well as STR_INDUSTRY_CARGOES_SELECT_INDUSTRY.
Scrollbar *vscroll;
IndustryCargoesWindow(int id) : Window(&_industry_cargoes_desc)
IndustryCargoesWindow(int id) : Window(_industry_cargoes_desc)
{
this->OnInit();
this->CreateNestedTree();
@ -3275,7 +3275,7 @@ struct IndustryCargoesWindow : public Window {
void OnResize() override
{
this->vscroll->SetCapacityFromWidget(this, WID_IC_PANEL, WidgetDimensions::scaled.framerect.top + CargoesField::small_height);
this->vscroll->SetCapacityFromWidget(this, WID_IC_PANEL, WidgetDimensions::scaled.framerect.Vertical() + CargoesField::small_height);
}
bool IsNewGRFInspectable() const override

@ -176,7 +176,7 @@ struct SelectGameWindow : public Window {
}
}
SelectGameWindow(WindowDesc *desc) : Window(desc)
SelectGameWindow(WindowDesc &desc) : Window(desc)
{
this->CreateNestedTree();
this->FinishInitNested(0);
@ -461,12 +461,12 @@ static WindowDesc _select_game_desc(__FILE__, __LINE__,
WDP_CENTER, nullptr, 0, 0,
WC_SELECT_GAME, WC_NONE,
WDF_NO_CLOSE,
std::begin(_nested_select_game_widgets), std::end(_nested_select_game_widgets)
_nested_select_game_widgets
);
void ShowSelectGameWindow()
{
new SelectGameWindow(&_select_game_desc);
new SelectGameWindow(_select_game_desc);
}
static void AskExitGameCallback(Window *, bool confirmed)

@ -1306,6 +1306,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Waarsku as 'n v
###length 2
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :As dit geaktiveer is, word daar 'n nuus boodskap gestuur wanneer, in 'n kalenderjaar, 'n voertuig nie wins gemaak het nie.
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Voertuie verval nooit nie: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :As dit geaktiveer is, sal voertuig modelle altyd beskikbaar bly, na die bekendstelling daarvan

@ -1277,6 +1277,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :حذر عندم
###length 2
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :عند التمكين ، يتم إرسال رسالة إخبارية عندما لا تحقق السيارة أي ربح خلال سنة تقويمية واحدة
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :المركبات لا تنتهي صلاحيتها ابدا : {STRING}
###length 2

@ -1263,6 +1263,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Ohartarazi ibil
###length 2
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Gaitua dagoenean, mezu bidez urte oso batean irabazirik lortu ez dituzten ibilgailuez ohartaraziko da
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Ibilgailuei inoiz ez zaie epea amaitzen: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Gaitua dagoenean, ibilgailu modelo ezberdinak betirako egongo dira erabilgarri

@ -1795,6 +1795,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Папярэд
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Калі ўключана, вы атрымаеце паведамленьне аб транспартным сродку, які аніразу не атрымаў прыбытак на працягу году.
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Калі ўключана, вы атрымаеце паведамленьне аб транспартным сродку, які аніразу не атрымаў прыбытак на працягу цыклу.
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Транспарт ніколі не выходзіць з ужытку: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Калі ўключана, усе мадэлі транспартных сродкаў пасьля з'яўленьня застануцца даступнымі назаўжды.

@ -311,8 +311,8 @@ STR_BUTTON_CANCEL :{BLACK}Cancelar
STR_BUTTON_OK :{BLACK}OK
# On screen keyboard window
STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :~!@#$%^&*()_+|QWERTYUIOP{{}}ASDFGHJKL:" ZXCVBNM<>? .
STR_OSK_KEYBOARD_LAYOUT :`1234567890-= qwertyuiop[]asdfghjkl;'#\zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :¬!"£$%^&*()_+ QWERTYUIOP{{}}ASDFGHJKL:@~|ZXCVBNM<>? .
# Measurement tooltip
STR_MEASURE_LENGTH :{BLACK}Comprimento: {NUM}
@ -1478,7 +1478,7 @@ STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Avisar se o ve
STR_CONFIG_SETTING_WARN_LOST_VEHICLE_HELPTEXT :Mostrar mensagens sobre veículos que não conseguem encontrar um caminho para o destino programado
STR_CONFIG_SETTING_ORDER_REVIEW :Revisar as ordens dos veículos: {STRING}
STR_CONFIG_SETTING_ORDER_REVIEW_HELPTEXT :Quando ativado, as ordens dos veículos são periodicamente verificadas e alguns problemas evidentes, quando detectados, são relatados com uma mensagem de aviso
STR_CONFIG_SETTING_ORDER_REVIEW_HELPTEXT :Quando ativado, as ordens dos veículos são periodicamente verificadas e alguns problemas obvios, quando detetados, são relatados por meio de uma mensagem
###length 3
STR_CONFIG_SETTING_ORDER_REVIEW_OFF :Não
STR_CONFIG_SETTING_ORDER_REVIEW_EXDEPOT :Sim, mas excluir veículos parados
@ -1486,8 +1486,11 @@ STR_CONFIG_SETTING_ORDER_REVIEW_ON :De todos os ve
STR_CONFIG_SETTING_WARN_INCOME_LESS :Avisar se o rendimento de um veículo está negativo: {STRING}
###length 2
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Quando ativado, uma mensagem de aviso será exibida quando um veículo não gerou lucro durante um ano
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Quando ativado, uma mensagem de aviso será exibida quando um veículo não gerou qualquer lucro durante um período
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Quando ativado, uma mensagem será exibida quando um veículo não gerou lucro durante um ano
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Quando ativado, uma mensagem será exibida quando um veículo não gerou qualquer lucro durante um período
STR_CONFIG_SETTING_WARN_OLD_VEHICLE :Avisar se um veículo está ficando velho: {STRING}
STR_CONFIG_SETTING_WARN_OLD_VEHICLE_HELPTEXT :Quando ativado, uma mensagem será exibida quando um veículo está ficando velho
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Veículos nunca saem de linha: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Quando ativado, todos os modelos de veículos permanecerão disponíveis para sempre após a sua introdução
@ -1499,7 +1502,7 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Calendário
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Relógio de parede
STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minutos por ano: {STRING}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Escolher o número de minutos em um ano do calendário. O padrão é 12 minutos. Defina como 0 para o tempo do calendário não mudar. Essa configuração não afeta a simulação econômica do jogo e só está disponível quando o tempo é baseado em relógio de parede
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Escolher o número de minutos em um ano do calendário. O padrão é 12 minutos. Defina como 0 para o tempo do calendário não mudar. Aumentar a duração do ano do calendário torna mais lenta a introdução de veículos, casas e outras infraestruturas. Isso não afeta a velocidade dos veículos nem a simulação econômica, exceto a inflação. Essa configuração só está disponível quando o tempo é baseado em relógio de parede
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
@ -5053,6 +5056,8 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Não é
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Adjacente a mais de uma estação/local de carga existente
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... estação muito extensa
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}... número de linhas não suportado
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}... comprimento não suportado
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Há estações/locais de carga demais
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Há partes de estação ferroviária demais
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Há paradas de ônibus demais

@ -1372,6 +1372,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Предупр
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Ако тази опция бъде активирана, ще получите съобщение ако някое от вашите ПС не е донесло печалба през изминалата година
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Ако тази опция бъде активирана, ще получите съобщение ако някое от вашите ПС не е донесло печалба през периода
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :ПС не губят валидност: {STRING.n}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Ако тази опция бъде активирана, всички модели на превозните средства, ще бъдат възможни за производство завинаги

@ -311,8 +311,8 @@ STR_BUTTON_CANCEL :{BLACK}Cancel·
STR_BUTTON_OK :{BLACK}D'acord
# On screen keyboard window
STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :~!@#$%^&*()_+|QWERTYUIOP{{}}ASDFGHJKL:" ZXCVBNM<>? .
STR_OSK_KEYBOARD_LAYOUT :`1234567890-= qwertyuiop[]asdfghjkl;'#\zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :¬!"£$%^&*()_+ QWERTYUIOP{{}}ASDFGHJKL:@~|ZXCVBNM<>? .
# Measurement tooltip
STR_MEASURE_LENGTH :{BLACK}Llargada: {NUM}
@ -1489,6 +1489,9 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Avisa si el ben
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Si està activat, s'envia un missatge de notícia quan un vehicle no ha tingut beneficis durant l'any.
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Si està activat, s'envia un missatge de notícia quan un vehicle no ha obtingut benefici durant un període.
STR_CONFIG_SETTING_WARN_OLD_VEHICLE :Avisa si el vehicle és vell: {STRING}
STR_CONFIG_SETTING_WARN_OLD_VEHICLE_HELPTEXT :Si està activat, s'envia un missatge de notícia quan un vehicle és vell.
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Els vehicles mai caduquen: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Si està activat, tots els models de vehicles continuen disponibles per sempre després de la seva introducció.
@ -1499,7 +1502,7 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Calendari
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Rellotge de paret
STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minuts per any: {STRING}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Trieu el nombre de minuts d'un any de calendari. Per defecte són 12 minuts. Establiu-ho a 0 per a parar el temps del calendari. Aquesta opció no afecta a la simulació econòmica de la partida i només està disponible quan es fa servir el temps amb rellotge de paret.
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Trieu el nombre de minuts d'un any de calendari. Per defecte són 12 minuts. Establiu-ho a 0 per a parar el temps del calendari. Si s'augmenta la durada de l'any del calendari s'alenteix la introducció de vehicles, cases i altres tipus d'infraestructures noves. No afecta a la velocitat dels vehicles o de la simulació econòmica, excepte per la inflació. Aquesta opció només està disponible quan es fa servir el temps amb rellotge de paret.
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
@ -5053,6 +5056,8 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Aquí no
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Fusiona més d'una estació/àrea de càrrega existent
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... estació massa extensa
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}... nombre de vies no vàlid
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}... llargada no vàlida
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Massa estacions/àrees de càrrega
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Hi ha massa parts d'estacions de tren
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Massa parades d'autobús

@ -640,6 +640,7 @@ STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Аэропор
###length 2
###length 2

@ -1410,6 +1410,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Upozori ako pri
###length 2
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Kada je uključeno, poruka vijesti se prikazuje kada vozilo nije uprihodilo ništa tijekom kalendarske godine
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vozila ne zastarjevaju: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Kada je uključeno, svi modeli vozila zauvijek ostaju dostupni nakon njihovog uvođenja

@ -1566,6 +1566,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Varovat, pokud
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Pokud je zapnuto, budou zobrazovány zprávy o vozidlech, která v posledním roce neměla žádný zisk.
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Pokud je zapnuto, budou zobrazovány zprávy o vozidlech, která v posledním období neměla žádný zisk.
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vozidlům se nikdy nezastaví výroba ('nezastarají'): {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Pokud je zapnuto, všechny modely vlaků zůstanou po uvedení dostupné napořád. (nezastarají)

@ -1486,6 +1486,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Advar hvis et k
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Når aktiveret, bliver en nyhedsmeddelelse sendt når et køretøj der ikke har haft overskud inden for et år
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Når det er aktiveret, sendes en nyhedsmeddelelse, når et køretøj ikke har tjent noget inden for en periode
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Køretøjernes levealder udløber aldrig: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Når aktiveret, forbliver alle biltyper tilgængelige for evigt efter indførelse
@ -2797,6 +2798,7 @@ STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Vælg l
STR_STATION_BUILD_DRAG_DROP :{BLACK}Træk & slip
STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Byg en station vha. træk & slip
STR_PICKER_MODE_ALL :Alle

@ -310,8 +310,8 @@ STR_BUTTON_CANCEL :{BLACK}Annulere
STR_BUTTON_OK :{BLACK}OK
# On screen keyboard window
STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :~!@#$%^&*()_+|QWERTYUIOP{{}}ASDFGHJKL:" ZXCVBNM<>? .
STR_OSK_KEYBOARD_LAYOUT :`1234567890-= qwertyuiop[]asdfghjkl;'#\zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :¬!"£$%^&*()_+ QWERTYUIOP{{}}ASDFGHJKL:@~|ZXCVBNM<>? .
# Measurement tooltip
STR_MEASURE_LENGTH :{BLACK}Lengte: {NUM}
@ -1488,6 +1488,9 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Waarschuwen als
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Wanneer ingeschakeld, wordt een nieuwsbericht verstuurd wanneer een voertuig geen winst heeft gemaakt in een kalenderjaar
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Wanneer ingeschakeld, krijg je een nieuwsbericht wanneer een voertuig geen winst heeft gemaakt gedurende een periode
STR_CONFIG_SETTING_WARN_OLD_VEHICLE :Waarschuwing als een voertuig oud aan het worden is: {STRING}
STR_CONFIG_SETTING_WARN_OLD_VEHICLE_HELPTEXT :Wanneer ingeschakeld, wordt een nieuwsbericht verzonden wanneer een voertuig oud aan het worden is
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Voertuigen verlopen niet: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Wanneer ingeschakeld, alle voertuig modellen blijven voor altijd beschikbaar na hun introductie
@ -1498,7 +1501,7 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Kalender
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Muurklok
STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minuten per jaar: {STRING}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Kies het aantal minuten in een kalenderjaar. Standaard is 12 minuten. Bij 0 wijzigt de kalendertijd niet. Deze instelling heeft geen invloed op de economische simulatie van het spel en is alleen beschikbaar met tijdbasis Muurklok
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Kies het aantal minuten in een kalenderjaar. Standaard is 12 minuten. Bij 0 wijzigt de kalendertijd niet. Als je het kalenderjaar langer maakt, komen voertuigen, huizen en andere infrastructuur langzamer beschikbaar. Deze instelling heeft geen invloed op voertuigsnelheid en op de economische simulatie van het spel, afgezien van inflatie. Deze instelling is alleen beschikbaar met tijdbasis Muurklok
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
@ -5052,6 +5055,8 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Kan hier
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Voegt meer dan één bestaand (laad)station samen
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... station te omvangrijk
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}... niet-ondersteund aantal sporen
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}... niet-ondersteunde lengte
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Te veel (laad)stations
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Te veel treinstationsdelen
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Te veel bushaltes

@ -310,8 +310,8 @@ STR_BUTTON_CANCEL :{BLACK}Cancel
STR_BUTTON_OK :{BLACK}OK
# On screen keyboard window
STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :~!@#$%^&*()_+|QWERTYUIOP{{}}ASDFGHJKL:" ZXCVBNM<>? .
STR_OSK_KEYBOARD_LAYOUT :`1234567890-= qwertyuiop[]asdfghjkl;'#\zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :¬!"£$%^&*()_+ QWERTYUIOP{{}}ASDFGHJKL:@~|ZXCVBNM<>? .
# Measurement tooltip
STR_MEASURE_LENGTH :{BLACK}Length: {NUM}
@ -1488,6 +1488,9 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Warn if a vehic
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :When enabled, a news message gets sent when a vehicle has not made any profit within a year
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :When enabled, a news message gets sent when a vehicle has not made any profit within a period
STR_CONFIG_SETTING_WARN_OLD_VEHICLE :Warn if a vehicle is getting old: {STRING2}
STR_CONFIG_SETTING_WARN_OLD_VEHICLE_HELPTEXT :When enabled, a news message gets sent when a vehicle is getting old
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vehicles never expire: {STRING2}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :When enabled, all vehicle models remain available forever after their introduction
@ -1498,7 +1501,7 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Calendar
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Wallclock
STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minutes per year: {STRING2}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Choose the number of minutes in a calendar year. The default is 12 minutes. Set to 0 to stop calendar time from changing. This setting does not affect the economic simulation of the game, and is only available when using wallclock timekeeping
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Choose the number of minutes in a calendar year. The default is 12 minutes. Set to 0 to stop calendar time from changing. Increasing the length of the calendar year slows down the introduction of vehicles, houses, and other infrastructure. It does not affect vehicle speed or economic simulation, except for inflation. This setting is only available when using wallclock timekeeping
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
@ -5052,6 +5055,8 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Can't bu
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Adjoins more than one existing station/loading area
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... station too spread out
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}... unsupported number of tracks
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}... unsupported length
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Too many stations/loading areas
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Too many railway station parts
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Too many bus stops

@ -310,8 +310,8 @@ STR_BUTTON_CANCEL :{BLACK}Cancel
STR_BUTTON_OK :{BLACK}OK
# On screen keyboard window
STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :~!@#$%^&*()_+|QWERTYUIOP{{}}ASDFGHJKL:" ZXCVBNM<>? .
STR_OSK_KEYBOARD_LAYOUT :`1234567890-= qwertyuiop[]asdfghjkl;'#\zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :~!@#$%^&*()_+ QWERTYUIOP{{}}ASDFGHJKL:@~|ZXCVBNM<>? .
# Measurement tooltip
STR_MEASURE_LENGTH :{BLACK}Length: {NUM}
@ -1488,6 +1488,9 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Warn if a vehic
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :When enabled, a news message gets sent when a vehicle has not made any profit within a year
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :When enabled, a news message gets sent when a vehicle has not made any profit within a period
STR_CONFIG_SETTING_WARN_OLD_VEHICLE :Warn if a vehicle is getting old: {STRING}
STR_CONFIG_SETTING_WARN_OLD_VEHICLE_HELPTEXT :When enabled, a news message gets sent when a vehicle is getting old
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vehicles never expire: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :When enabled, all vehicle models remain available forever after their introduction
@ -1498,7 +1501,7 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Calendar
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Wallclock
STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minutes per year: {STRING}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Choose the number of minutes in a calendar year. The default is 12 minutes. Set to 0 to stop calendar time from changing. This setting does not affect the economic simulation of the game, and is only available when using wallclock timekeeping
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Choose the number of minutes in a calendar year. The default is 12 minutes. Set to 0 to stop calendar time from changing. Increasing the length of the calendar year slows down the introduction of vehicles, houses, and other infrastructure. It does not affect vehicle speed or economic simulation, except for inflation. This setting is only available when using wallclock timekeeping
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
@ -5052,6 +5055,8 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Can't bu
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Adjoins more than one existing station/loading area
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... station too spread out
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}... unsupported number of tracks
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}... unsupported length
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Too many stations/loading areas
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Too many railway station parts
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Too many bus stops

@ -1488,6 +1488,9 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Warn if a vehic
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :When enabled, a news message gets sent when a vehicle has not made any profit within a year
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :When enabled, a news message gets sent when a vehicle has not made any profit within a period
STR_CONFIG_SETTING_WARN_OLD_VEHICLE :Warn if a vehicle is getting old: {STRING}
STR_CONFIG_SETTING_WARN_OLD_VEHICLE_HELPTEXT :When enabled, a news message gets sent when a vehicle is getting old
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Vehicles never expire: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :When enabled, all vehicle models remain available forever after their introduction
@ -1498,7 +1501,7 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Calendar
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Wallclock
STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minutes per year: {STRING}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Choose the number of minutes in a calendar year. The default is 12 minutes. Set to 0 to stop calendar time from changing. This setting does not affect the economic simulation of the game, and is only available when using wallclock timekeeping
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Choose the number of minutes in a calendar year. The default is 12 minutes. Set to 0 to stop calendar time from changing. Increasing the length of the calendar year slows down the introduction of vehicles, houses, and other infrastructure. It does not affect vehicle speed or economic simulation, except for inflation. This setting is only available when using wallclock timekeeping
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
@ -5052,6 +5055,8 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Can't bu
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Adjoins more than one existing station/loading area
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... station too spread out
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}... unsupported number of tracks
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}... unsupported length
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Too many stations/loading areas
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Too many railroad station parts
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Too many bus stops

@ -1515,6 +1515,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Avertu se gajno
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Kiam tiu ĉi agordo estas aktiva, aperas anonco kiam iu veturilo ne faris profiton dum jaro
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Kiam tiu ĉi agordo estas aktiva, aperas anonco kiam iu veturilo ne faris profiton dum periodo
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Veturiloj neniam eluziĝas: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Se tiu ĉi agordo estas aktiva, ĉiuj modeloj de veturiloj restos aĉeteblaj por ĉiam post ekhaveblo

@ -1541,6 +1541,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Hoiata, kui sõ
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Kui on aktiveeritud, siis teavitatakse mängijat sõidukitest mis ei ole viimase aasta jooksul suutnud kasumit teenida
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Kui aktiveeritud, saadetakse uudis, kui sõiduk ei ole ajavahemikus kasumit teeninud
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Sõidukid ei aegu: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Kui on aktiveeritud, siis jäävad kõik sõidukite tüübid igavesti avatuks
@ -2856,6 +2857,9 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Ehita ja
STR_PICKER_MODE_ALL :Kõik
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Vali, milliseid veoautojaamu näidatakse
STR_PICKER_HOUSE_CLASS_TOOLTIP :Vali näidatud asulaosa
STR_PICKER_HOUSE_TYPE_TOOLTIP :Vali, millist maja ehitada. Ctrl+ klõps lisab või eemaldab salvestatud asjadest
STR_HOUSE_PICKER_CAPTION :Maja valik

@ -1242,6 +1242,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Ávara um eitt
###length 2
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Um gilda, fær tú boð tá eitt flutningstól ikki hevur havt nakran vinning í eitt kalendara ár
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Flutningstól ganga ongantíð út: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Um gilda, eru øll sløg av flutningstólum altíð tøk eftir tey eru komin í nýtslu

@ -310,8 +310,8 @@ STR_BUTTON_CANCEL :{BLACK}Peruuta
STR_BUTTON_OK :{BLACK}OK
# On screen keyboard window
STR_OSK_KEYBOARD_LAYOUT :§1234567890+´ qwertyuiopå¨asdfghjklöä' zxcvbnm,.- .
STR_OSK_KEYBOARD_LAYOUT_CAPS :½!"#¤%&/()=?` QWERTYUIOPÅ^ASDFGHJKLÖÄ* ZXCVBNM;:_ .
STR_OSK_KEYBOARD_LAYOUT :§1234567890+´ qwertyuiopå¨asdfghjklöä'<zxcvbnm,.- .
STR_OSK_KEYBOARD_LAYOUT_CAPS :½!"#¤%&/()=?` QWERTYUIOPÅ^ASDFGHJKLÖÄ*>ZXCVBNM;:_ .
# Measurement tooltip
STR_MEASURE_LENGTH :{BLACK}Pituus: {NUM}
@ -1488,6 +1488,9 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Varoita, jos ku
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Mikäli käytössä, uutisviesti lähetetään, jos kulkuneuvo ei ole tuottanut rahaa vuoden aikana
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Mikäli käytössä, uutisviesti lähetetään, jos kulkuneuvo ei ole tuottanut rahaa jakson aikana
STR_CONFIG_SETTING_WARN_OLD_VEHICLE :Varoita, jos kulkuneuvo on tulossa vanhaksi: {STRING}
STR_CONFIG_SETTING_WARN_OLD_VEHICLE_HELPTEXT :Mikäli käytössä, uutisviesti lähetetään, jos kulkuneuvo on tulossa vanhaksi
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Kulkuneuvot eivät vanhene: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Mikäli käytössä, kaikki kulkuneuvot ovat saatavilla ikuisesti niiden julkistamisen jälkeen
@ -1498,7 +1501,7 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Kalenteri
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Seinäkello
STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minuuttia vuodessa: {STRING}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Valitse minuuttien määrä kalenterivuodessa. Oletusarvo on 12 minuuttia. Aseta arvoksi 0, jos et halua kalenteriajan muuttuvan. Tämä asetus ei vaikuta pelin taloussimulaatioon, ja se on valittavissa vain seinäkelloaikaa käytettäessä
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Valitse minuuttien määrä kalenterivuodessa. Oletusarvo on 12 minuuttia. Aseta arvoksi 0, jos et halua kalenteriajan muuttuvan. Kalenterivuoden pidentäminen hidastaa kulkuneuvojen, talojen ja muun infrastruktuurin käyttöönottoa. Se ei vaikuta kulkuneuvojen nopeuteen eikä taloussimulaatioon inflaatiota lukuun ottamatta. Tämä asetus on valittavissa vain seinäkelloaikaa käytettäessä
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
@ -1511,7 +1514,7 @@ STR_CONFIG_SETTING_INDUSTRY_CARGO_SCALE_HELPTEXT :Skaalaa tuotant
STR_CONFIG_SETTING_CARGO_SCALE_VALUE :{NUM}{NBSP}%
STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Uudista kulkuneuvo automaattisesti, kun se vanhenee: {STRING}
STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Mikäli käytössä, lähellä käyttöikänsä loppua oleva kulkuneuvo korvataan automaattisesti
STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Mikäli käytössä, lähellä käyttöikänsä loppua oleva kulkuneuvo korvataan automaattisesti uudistamisehtojen täyttyessä
STR_CONFIG_SETTING_AUTORENEW_MONTHS :Uudista automaattisesti {STRING}
STR_CONFIG_SETTING_AUTORENEW_MONTHS_HELPTEXT :Suhteellinen ikä, jonka jälkeen kulkuneuvo voidaan uudistaa automaattisesti
@ -5052,6 +5055,8 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Lentoken
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Vieressä on useampi kuin yksi olemassaoleva asema tai kuormausalue.
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... asema liian levittäytynyt
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}… raiteiden lukumäärää ei tueta
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}… pituutta ei tueta
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Liian monta asemaa ja lastausaluetta.
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Rautatieasema on jakautunut liian moneen osaan
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Liian monta linja-autopysäkkiä.

@ -1474,11 +1474,11 @@ STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_SECONDARY_HELPTEXT :Choisir une sec
STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS :Les aéroports n'expirent jamais{NBSP}: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS_HELPTEXT :Activer ce paramètre fait que chaque type d'aéroports reste toujours disponible après son introduction
STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Avertir qu'un véhicule est perdu{NBSP}: {STRING}
STR_CONFIG_SETTING_WARN_LOST_VEHICLE :Alerter en cas de véhicule perdu{NBSP}: {STRING}
STR_CONFIG_SETTING_WARN_LOST_VEHICLE_HELPTEXT :Génère des messages au sujet des véhicules incapables de trouver un chemin vers leur destination
STR_CONFIG_SETTING_ORDER_REVIEW :Vérifier les ordres des véhicules{NBSP}: {STRING}
STR_CONFIG_SETTING_ORDER_REVIEW_HELPTEXT :Quand il est actif, les ordres des véhicules sont vérifiés périodiquement, et les quelques problèmes évidents détectés sont rapportés par un message d'information
STR_CONFIG_SETTING_ORDER_REVIEW_HELPTEXT :Si activé, les ordres des véhicules seront vérifiés périodiquement, et les quelques problèmes évidents détectés seront rapportés par un message d'information
###length 3
STR_CONFIG_SETTING_ORDER_REVIEW_OFF :Non
STR_CONFIG_SETTING_ORDER_REVIEW_EXDEPOT :De tous, sauf de ceux à l'arrêt
@ -1486,11 +1486,14 @@ STR_CONFIG_SETTING_ORDER_REVIEW_ON :De tous les vé
STR_CONFIG_SETTING_WARN_INCOME_LESS :Alerter en cas de revenu négatif pour un véhicule{NBSP}: {STRING}
###length 2
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Quand il est actif, un message d'information est envoyé lorsqu'un véhicule n'a fait aucun bénéfice au cours d'une année
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Quand il est actif, un message d'information est envoyé lorsqu'un véhicule n'a fait aucun bénéfice au cours d'une période
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Si activé, un message d'information sera envoyé lorsqu'un véhicule n'a fait aucun bénéfice au cours d'une année
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Si activé, un message d'information sera envoyé lorsqu'un véhicule n'a fait aucun bénéfice au cours d'une période
STR_CONFIG_SETTING_WARN_OLD_VEHICLE :Alerter si un véhicule devient vieux{NBSP}: {STRING}
STR_CONFIG_SETTING_WARN_OLD_VEHICLE_HELPTEXT :Si activé, un message d'information sera envoyé lorsqu'un véhicule devient vieux
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Les véhicules n'expirent jamais{NBSP}: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Quand il est actif, tous les modèles de véhicule restent disponibles pour toujours après leur introduction
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Si activé, tous les modèles de véhicule restent disponibles pour toujours après leur introduction
STR_CONFIG_SETTING_TIMEKEEPING_UNITS :Mesure du temps{NBSP}: {STRING}
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_HELPTEXT :Sélectionner les unités de mesure du temps pour la partie. Ce choix ne peut pas être modifié par la suite.{}{}"Calendrier" correspond à lexpérience classique d'OpenTTD, avec une année de 12 mois et chaque mois ayant de 28 à 31 jours.{}{}Quand le temps est basé sur la "pendule", la production de marchandises et les finances sont basées sur des incréments d'une minute, équivalent à des mois de 30 jours dans le mode "calendrier". Ceux-ci sont groupés par période de 12 minutes, équivalent à une année dans le mode "calendrier".{}{}Quelque soit le mode, il y a toujours un calendrier classique, utilisé pour les dates d'introduction des véhicules, maisons, et autres infrastructures
@ -1499,7 +1502,7 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Calendrier
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Pendule
STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minutes par année{NBSP}: {STRING}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Sélectionner le nombre de minutes dans une année calendaire. La valeur par défaut est 12 minutes.Régler sur 0 pour arrêter la progression du calendrier. Ce paramètre n'affecte pas la simulation économique du jeu, et il n'est disponible qu'en utilisant le mode "pendule"
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Sélectionner le nombre de minutes dans une année calendaire. La valeur par défaut est 12 minutes. Régler sur 0 pour arrêter la progression du calendrier. Augmenter cette valeur ralentit la mise à disposition de véhicules, maisons, et autres infrastructures. Cela n'affecte ni la vitesse des véhicules, ni la simulation économique, excepté l'inflation. Ce paramètre n'est disponible qu'en utilisant le mode "pendule".
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
@ -1512,7 +1515,7 @@ STR_CONFIG_SETTING_INDUSTRY_CARGO_SCALE_HELPTEXT :Modifier la pro
STR_CONFIG_SETTING_CARGO_SCALE_VALUE :{NUM}%
STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Renouveler automatiquement les véhicules vieillissants{NBSP}: {STRING}
STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Quand il est actif, un véhicule approchant de la fin de sa durée de vie est automatiquement remplacé quand les conditions du renouvellement sont remplies
STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Si activé, un véhicule approchant de la fin de sa durée de vie sera automatiquement remplacé quand les conditions du renouvellement seront remplies
STR_CONFIG_SETTING_AUTORENEW_MONTHS :Renouveler automatiquement quand le véhicule est {STRING} l'âge maximum
STR_CONFIG_SETTING_AUTORENEW_MONTHS_HELPTEXT :Âge relatif pour considérer le renouvellement automatique d'un véhicule
@ -1541,7 +1544,7 @@ STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS_HELPTEXT :Épaisseur de l
STR_CONFIG_SETTING_SHOW_NEWGRF_NAME :Afficher le nom du NewGRF dans la fenêtre d'achat des véhicules{NBSP}: {STRING}
STR_CONFIG_SETTING_SHOW_NEWGRF_NAME_HELPTEXT :Ajoute une ligne à la fenêtre d'achat des véhicules, montrant de quel NewGRF provient le véhicule sélectionné
STR_CONFIG_SETTING_SHOW_CARGO_IN_LISTS :Afficher les cargaisons que peuvent transporter les véhicules dans les fenêtres de liste{NBSP}: {STRING}
STR_CONFIG_SETTING_SHOW_CARGO_IN_LISTS_HELPTEXT :Quand il est actif, ce qu'un véhicule peut transporter est affiché au dessus de lui dans les listes de véhicules
STR_CONFIG_SETTING_SHOW_CARGO_IN_LISTS_HELPTEXT :Si activé, ce qu'un véhicule peut transporter est affiché au dessus de lui dans les listes de véhicules
STR_CONFIG_SETTING_LANDSCAPE :Paysage{NBSP}: {STRING}
STR_CONFIG_SETTING_LANDSCAPE_HELPTEXT :Les paysages définissent les scénarios de jouabilité classique avec différentes marchandises et exigences pour la croissance des villes. Les NewGRFs et les scripts de jeux autorisent cependant un contrôle plus fin
@ -5053,6 +5056,8 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Impossib
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Adjacent à plus d'une gare à la fois
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... gare trop étendue
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}... nombre de voies non supporté
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}... longueur non supportée
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Trop de gares
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Trop de parties de gare
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Trop d'arrêts d'autobus

@ -1298,6 +1298,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Warskôgje at d
###length 2
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :By ynskeakeljen wurdt der berjochte at in fiertúch it ôfrûnne jier gjin winst makke hat
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Fiertugen ferinne nea: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :By ynskeakeljen bliuwe alle fiertugen foar ivich beskikber

@ -1489,6 +1489,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Thoir rabhadh n
###length 2
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Nuair a bhios seo air, thèid brath a chur mur an do rinn carbad prothaid feadh bliadhna
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Chan fhalbh an ùine air carbadan gu bràth: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Ma tha seo air, bidh a h-uile modail dhe charbad ri làimh gu bràth tuilleadh an dèidh an tionnsgnadh

@ -311,8 +311,8 @@ STR_BUTTON_CANCEL :{BLACK}Cancelar
STR_BUTTON_OK :{BLACK}OK
# On screen keyboard window
STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :~!@#$%^&*()_+|QWERTYUIOP{{}}ASDFGHJKL:" ZXCVBNM<>? .
STR_OSK_KEYBOARD_LAYOUT :`1234567890-= qwertyuiop[]asdfghjkl;'#\zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :¬!"£$%^&*()_+ QWERTYUIOP{{}}ASDFGHJKL:@~|ZXCVBNM<>? .
# Measurement tooltip
STR_MEASURE_LENGTH :{BLACK}Lonxitude: {NUM}
@ -438,6 +438,8 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Saír do editor
STR_SCENEDIT_FILE_MENU_SEPARATOR :
STR_SCENEDIT_FILE_MENU_QUIT :Saír
STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Xerar vilas
STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Colocar casas
# Settings menu
###length 16
@ -957,6 +959,7 @@ STR_GAME_OPTIONS_VOLUME :Volume
STR_GAME_OPTIONS_SFX_VOLUME :Efectos de son
STR_GAME_OPTIONS_MUSIC_VOLUME :Música
STR_GAME_OPTIONS_VOLUME_MARK :{NUM}%
STR_GAME_OPTIONS_CURRENCY_UNITS_FRAME :{BLACK}Unidades monetarias
STR_GAME_OPTIONS_CURRENCY_UNITS_DROPDOWN_TOOLTIP :{BLACK}Selección de unidades monetarias
@ -1054,6 +1057,7 @@ STR_GAME_OPTIONS_GUI_FONT_SPRITE_TOOLTIP :{BLACK}Marca es
STR_GAME_OPTIONS_GUI_FONT_AA :{BLACK}Suavizar fontes
STR_GAME_OPTIONS_GUI_FONT_AA_TOOLTIP :{BLACK}Marca esta opción para suavizar as fontes redimensionables
STR_GAME_OPTIONS_GUI_SCALE_MARK :{DECIMAL}x
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_FRAME :{BLACK}Enquisa automática
STR_GAME_OPTIONS_PARTICIPATE_SURVEY :{BLACK}Participar nunha enquisa automática
@ -1082,6 +1086,8 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Conxunto
STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Selecciona o conxunto de música base a empregar
STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Información adicional sobre o conxunto de música base
STR_GAME_OPTIONS_ONLINE_CONTENT :Obter contido
STR_GAME_OPTIONS_ONLINE_CONTENT_TOOLTIP :Comprobar contido novo e actualizado para descargar
STR_GAME_OPTIONS_SOCIAL_PLUGINS_NONE :{LTBLUE}(non hai instalado ningún complemento para integrar con plataformas sociais)
@ -1483,6 +1489,9 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Avisar se os in
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Cando se activa, envíase unha mensaxe cando un vehículo non xerou ningún beneficio durante un ano
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Cando se activa, envíase unha mensaxe cando un vehículo non xerou ningún beneficio durante un período
STR_CONFIG_SETTING_WARN_OLD_VEHICLE :Avisar se un vehículo está envellecendo: {STRING}
STR_CONFIG_SETTING_WARN_OLD_VEHICLE_HELPTEXT :Cando se activa, envíase unha mensaxe de novas cando un vehículo vaia envellecendo
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Os vehículos nunca caducan: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Cando se activa, tódolos modelos de vehículos seguen a estar dispoñíbeis para sempre dende a súa aparición
@ -1493,7 +1502,7 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Calendario
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Reloxo
STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minutos por ano: {STRING}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Selecciona o número de minutos dun ano do calendario. Por defecto son 12 minutos. Fíxao en 0 para para conxelar o calendario. Este axuste non afecta a simulación da economía do xogo, e só está dispoñible cando se usa o modo reloxo de cronometraxe
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Selecciona o número de minutos dun ano do calendario. Por defecto son 12 minutos. Fíxao en 0 para para conxelar o calendario. Increemntar a duración do ano do calendario ralentiza a introdución de vehículos, casas e outra infraestrutura. Non afecta a velocidade dos vehículos ou a simulación económica excepto pola inflación. Este axuste só está dispoñible cando se usa o modo reloxo de cronometraxe
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
@ -2474,6 +2483,7 @@ STR_NETWORK_CLIENT_LIST_PLAYER_NAME_QUERY_CAPTION :O teu nome de x
STR_NETWORK_CLIENT_LIST_ADMIN_CLIENT_TOOLTIP :{BLACK}Accións administrativas a executar neste cliente
STR_NETWORK_CLIENT_LIST_ADMIN_COMPANY_TOOLTIP :{BLACK}Accións administrativas a executar para esta compañía
STR_NETWORK_CLIENT_LIST_JOIN_TOOLTIP :{BLACK}Unirse a esta compañía
STR_NETWORK_CLIENT_LIST_COMPANY_AUTHORIZE_TOOLTIP :{BLACK}Autorizar a este cliente a unirse a túa compañía
STR_NETWORK_CLIENT_LIST_CHAT_CLIENT_TOOLTIP :{BLACK}Envía unha mensaxe a este xogador
STR_NETWORK_CLIENT_LIST_CHAT_COMPANY_TOOLTIP :{BLACK}Envía unha mensaxe a todos os xogadores desta compañía
STR_NETWORK_CLIENT_LIST_CHAT_SPECTATOR_TOOLTIP :{BLACK}Enviar unha mensaxe a todos os espectadores
@ -2794,9 +2804,33 @@ STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Seleccio
STR_STATION_BUILD_DRAG_DROP :{BLACK}Arrastrar e soltar
STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Construír estación arrastrando e soltando
STR_PICKER_MODE_ALL :Todo
STR_PICKER_MODE_ALL_TOOLTIP :Alternar amosar elementos de todas as clases
STR_PICKER_MODE_USED :Usado
STR_PICKER_MODE_USED_TOOLTIP :Alternar amosar só elementos existentes
STR_PICKER_MODE_SAVED :Gardados
STR_PICKER_MODE_SAVED_TOOLTIP :Alternar amosar só elementos gardados
STR_PICKER_STATION_CLASS_TOOLTIP :Selecciona unha clase de estación para amosar
STR_PICKER_STATION_TYPE_TOOLTIP :Selecciona un tipo de estación a construír. Ctrl+Click para engadir ou eliminar nos elementos gardados.
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Selecciona unha clase de punto de ruta para amosar
STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Selecciona un punto de ruta a construír. Ctrl+Click para engadir ou eliminar nos elementos gardados.
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Selecciona unha clase de estación de autobús para amosar
STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Selecciona o tipo de estación de autobuses a construír. Ctrl+Click para engadir ou eliminar nos elementos gardados.
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Selecciona unha clase de estación de carga de camións para amosar.
STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Selecciona un tipo de estación de camións a construír. Ctrl+Click para engadir ou eliminar nos elementos gardados.
STR_PICKER_OBJECT_CLASS_TOOLTIP :Selecciona unha clase de obxecto para amosar
STR_PICKER_OBJECT_TYPE_TOOLTIP :Selecciona un tipo de obxecto a construír. Ctrl+Click para engadir ou eliminar nos elementos gardados. Ctrl+Click+Arrastrar para seleccionar a área diagonalmente. Tamén podes premer Shift para amosar unha estimación do custo
STR_PICKER_HOUSE_CLASS_TOOLTIP :Selecciona unha zona da vila para amosar
STR_PICKER_HOUSE_TYPE_TOOLTIP :Selecciona un tipo de casa a construír. Ctrl+Click para engadir ou eliminar nos elementos gardados.
STR_HOUSE_PICKER_CAPTION :Selección de casas
STR_HOUSE_PICKER_CLASS_ZONE1 :Borde
STR_HOUSE_PICKER_CLASS_ZONE2 :Periferia
STR_HOUSE_PICKER_CLASS_ZONE3 :Suburbios da periferia
STR_HOUSE_PICKER_CLASS_ZONE4 :Suburbios interiores
STR_HOUSE_PICKER_CLASS_ZONE5 :Centro da vila
STR_STATION_CLASS_DFLT :Por defecto
STR_STATION_CLASS_DFLT_STATION :Estación por defecto
@ -4984,6 +5018,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... non
STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Obras na estrada en curso
STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Non se pode borrar esta vila...{}Unha estación ou depósito está relacionado coa vila ou un cadro propiedade da vila non pode ser eliminado
STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... non hai ningún sitio adecuado para unha estatua no centro desta vila
STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Non se pode construír a casa...
# Industry related errors
STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... demasiadas industrias
@ -5021,6 +5056,8 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Non se p
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Xunta máis dunha estación/área de carga existente
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... a estación ocupa demasiado
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}... número de vías non soportado
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}... lonxitude non soportada
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Demasiadas estacións/áreas de carga
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Demasiadas partes de estación de tren
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Demasiadas paradas de autobús

@ -438,6 +438,8 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Editor verlasse
STR_SCENEDIT_FILE_MENU_SEPARATOR :
STR_SCENEDIT_FILE_MENU_QUIT :Beenden
STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Städte erzeugen
STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Häuser platzieren
# Settings menu
###length 16
@ -720,7 +722,7 @@ STR_PLAYLIST_PROGRAM :{TINY_FONT}{BLA
STR_PLAYLIST_CLEAR :{TINY_FONT}{BLACK}Bereinigen
STR_PLAYLIST_CHANGE_SET :{BLACK}Set ändern
STR_PLAYLIST_TOOLTIP_CLEAR_CURRENT_PROGRAM_CUSTOM1 :{BLACK}Lösche laufendes Programm (nur für Benutzerdefiniert 1 und 2)
STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Ein anderes Musik-Set auswählen)
STR_PLAYLIST_TOOLTIP_CHANGE_SET :{BLACK}Musikauswahl zu einem anderem installierten Set wechseln
STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Klicken Sie auf einen Musiktitel, um ihn in das laufende Programm zu übernehmen (nur für Benutzerdefiniert 1 und 2)
STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Klicken Sie auf einen Musiktitel, um ihn aus der aktuellen Liste zu entfernen (nur für Benutzerdefiniert 1 und 2)
@ -957,6 +959,7 @@ STR_GAME_OPTIONS_VOLUME :Lautstärke
STR_GAME_OPTIONS_SFX_VOLUME :Sound-Effekte
STR_GAME_OPTIONS_MUSIC_VOLUME :Musik
STR_GAME_OPTIONS_VOLUME_MARK :{NUM}%
STR_GAME_OPTIONS_CURRENCY_UNITS_FRAME :{BLACK}Währung
STR_GAME_OPTIONS_CURRENCY_UNITS_DROPDOWN_TOOLTIP :{BLACK}Währung auswählen
@ -1054,14 +1057,15 @@ STR_GAME_OPTIONS_GUI_FONT_SPRITE_TOOLTIP :{BLACK}Dieses K
STR_GAME_OPTIONS_GUI_FONT_AA :{BLACK}Kantenglättung für Schriften
STR_GAME_OPTIONS_GUI_FONT_AA_TOOLTIP :{BLACK}Dieses Kästchen ankreuzen, um Kantenglättung für skalierbare Schriften zu aktivieren
STR_GAME_OPTIONS_GUI_SCALE_MARK :{DECIMAL}×
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_FRAME :{BLACK}Automatische Umfrage
STR_GAME_OPTIONS_PARTICIPATE_SURVEY :{BLACK}Bei automatischer Umfrage teilnehmen
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_TOOLTIP :{BLACK}Falls aktiviert, wird OpenTTD eine Umfrage beim Verlassen des Spiels übertragen
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_LINK :{BLACK}Über Umfrage und Privatsphäre
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_LINK_TOOLTIP :{BLACK}Dies öffnet einen Browser mit mehr Informationen über die automatische Umfrage
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_PREVIEW :{BLACK}Vorschau des Umfrageergebnisses
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_PREVIEW_TOOLTIP :{BLACK}Zeige die Umfrageergebnisse des gerade laufenden Spiels an
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_FRAME :{BLACK}Automatische Datenerhebung
STR_GAME_OPTIONS_PARTICIPATE_SURVEY :{BLACK}Bei automatischer Datenerhebung teilnehmen
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_TOOLTIP :{BLACK}Falls aktiviert, wird OpenTTD eine Datenerhebung beim Verlassen des Spiels übertragen
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_LINK :{BLACK}Über Datenerhebung und Privatsphäre
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_LINK_TOOLTIP :{BLACK}Dies öffnet einen Browser mit mehr Informationen über die automatische Datenerhebung
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_PREVIEW :{BLACK}Vorschau des Datenerhebungsergebnisses
STR_GAME_OPTIONS_PARTICIPATE_SURVEY_PREVIEW_TOOLTIP :{BLACK}Zeige die Datenerhebungsergebnisse des gerade laufenden Spiels an
STR_GAME_OPTIONS_GRAPHICS :{BLACK}Grafik
@ -1082,6 +1086,8 @@ STR_GAME_OPTIONS_BASE_MUSIC :{BLACK}Basismus
STR_GAME_OPTIONS_BASE_MUSIC_TOOLTIP :{BLACK}Ein Basismusikset auswählen
STR_GAME_OPTIONS_BASE_MUSIC_DESCRIPTION_TOOLTIP :{BLACK}Zusätzliche Informationen über das Basismusikset
STR_GAME_OPTIONS_ONLINE_CONTENT :Inhalt holen
STR_GAME_OPTIONS_ONLINE_CONTENT_TOOLTIP :Nach neuen und aktualisierten Inhalt zum Herunterladen prüfen
STR_GAME_OPTIONS_SOCIAL_PLUGINS_NONE :{LTBLUE}(keine Plugins für Soziale Medien installiert!)
@ -1483,6 +1489,9 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Warnen, wenn Ei
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Falls aktiviert, wird eine Nachricht gesendet, falls ein Fahrzeug innerhalb eines Jahres keinen Gewinn erwirtschaftet hat
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Falls aktiviert, wird eine Nachricht gesendet, falls ein Fahrzeug innerhalb eines Zyklus keinen Gewinn erwirtschaftet hat
STR_CONFIG_SETTING_WARN_OLD_VEHICLE :Warnen, wenn Fahrzeug alt wird: {STRING}
STR_CONFIG_SETTING_WARN_OLD_VEHICLE_HELPTEXT :Falls aktiviert, wird eine Nachricht gesendet, falls ein Fahrzeug alt wird
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Fahrzeuge veralten nie: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Erlauben, dass Fahrzeuge nach ihrem Einführungsdatum ewig verfügbar bleiben
@ -1493,7 +1502,7 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Kalender
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Wanduhr
STR_CONFIG_SETTING_MINUTES_PER_YEAR :Minuten pro Jahr: {STRING}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Die Anzahl an Minuten in einem Kalenderjahr wählen. Standartmäßig sind das 12 Minuten. Um das wechseln der Kalenderzeit auszuschalten, einfach auf 0 stellen. Diese Einstellung beeinflusst nicht die wirtschaftssimulation des Spiels und ist nur verfügbar, wenn die Wanduhr als Zeitmesser eingestellt ist
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Die Anzahl an Minuten in einem Kalenderjahr wählen. Standardmäßig sind das 12 Minuten. Um das Wechseln der Kalenderzeit auszuschalten, einfach auf 0 stellen. Wenn die Länge des Kalenderjahres erhöht wird, wird die Einführung von Fahrzeugen, Häusern und anderen Infrastrukturen verlangsamt. Dies beeinflusst nicht die Fahrzeuggeschwindigkeit oder die wirtschaftliche Simulation, außer die Inflation. Diese Einstellung ist nur verfügbar, wenn die Zeit mit der Wanduhr erfasst wird.
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
@ -1825,6 +1834,9 @@ STR_CONFIG_SETTING_SERVINT_AIRCRAFT_HELPTEXT :Setze das Stand
STR_CONFIG_SETTING_SERVINT_SHIPS :Standard-Wartungsintervall für Schiffe: {STRING}
STR_CONFIG_SETTING_SERVINT_SHIPS_HELPTEXT :Setze das Standardwartungsintervall für Schiffe. Dieses Wartungsintervall wird von allen Schiffen eingehalten, denen kein individuelles Wartungsintervall zugewiesen worden ist
###length 3
STR_CONFIG_SETTING_SERVINT_VALUE_DAYS :{COMMA}{NBSP}Tag{P 0 "" e}
STR_CONFIG_SETTING_SERVINT_VALUE_MINUTES :{COMMA}{NBSP}Minute{P 0 "" n}
STR_CONFIG_SETTING_SERVINT_VALUE_PERCENTAGE :{COMMA}{NBSP}%
###setting-zero-is-special
STR_CONFIG_SETTING_SERVINT_DISABLED :Deaktiviert
@ -2471,6 +2483,7 @@ STR_NETWORK_CLIENT_LIST_PLAYER_NAME_QUERY_CAPTION :Ihr Spielername
STR_NETWORK_CLIENT_LIST_ADMIN_CLIENT_TOOLTIP :{BLACK}Auszuübende administrative Aktionen für diesen Teilnehmer
STR_NETWORK_CLIENT_LIST_ADMIN_COMPANY_TOOLTIP :{BLACK}Auszuübende administrative Aktionen für diese Firma
STR_NETWORK_CLIENT_LIST_JOIN_TOOLTIP :{BLACK}Dieser Firma beitreten
STR_NETWORK_CLIENT_LIST_COMPANY_AUTHORIZE_TOOLTIP :{BLACK}Diesem Client autorisieren, Ihrer Firma beizutreten
STR_NETWORK_CLIENT_LIST_CHAT_CLIENT_TOOLTIP :{BLACK}Eine Nachricht an diesen Spieler schicken
STR_NETWORK_CLIENT_LIST_CHAT_COMPANY_TOOLTIP :{BLACK}Eine Nachricht an alle Spieler dieser Firma schicken
STR_NETWORK_CLIENT_LIST_CHAT_SPECTATOR_TOOLTIP :{BLACK}Eine Nachricht an alle Zuschauer schicken
@ -2505,10 +2518,10 @@ STR_NETWORK_ASK_RELAY_NO :{BLACK}Nein
STR_NETWORK_ASK_RELAY_YES_ONCE :{BLACK}Ja, diesmal
STR_NETWORK_ASK_RELAY_YES_ALWAYS :{BLACK}Ja, nicht erneut fragen
STR_NETWORK_ASK_SURVEY_CAPTION :Bei automatischer Umfrage teilnehmen?
STR_NETWORK_ASK_SURVEY_TEXT :Möchtest du an einer automatischen Umfrage teilnehmen?{}OpenTTD wird beim Verlassen des Spiels eine Umfrage übermitteln.{}Du kannst dies jederzeit unter „Spieloptionen“ ändern.
STR_NETWORK_ASK_SURVEY_PREVIEW :Vorschau des Umfrageergebnisses
STR_NETWORK_ASK_SURVEY_LINK :Über Umfrage und Privatsphäre
STR_NETWORK_ASK_SURVEY_CAPTION :Bei automatischer Datenerhebung teilnehmen?
STR_NETWORK_ASK_SURVEY_TEXT :Möchten Sie an einer automatischen Datenerhebung teilnehmen?{}OpenTTD wird beim Verlassen des Spiels eine Datenerhebung übermitteln.{}Sie können dies jederzeit unter „Spieloptionen“ ändern.
STR_NETWORK_ASK_SURVEY_PREVIEW :Vorschau des Datenerhebungsergebnisses
STR_NETWORK_ASK_SURVEY_LINK :Über Datenerhebung und Privatsphäre
STR_NETWORK_ASK_SURVEY_NO :Nein
STR_NETWORK_ASK_SURVEY_YES :Ja
@ -2791,9 +2804,33 @@ STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Bahnstei
STR_STATION_BUILD_DRAG_DROP :{BLACK}Klicken und Ziehen
STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Stationsgröße durch Klicken und Ziehen frei wählbar
STR_PICKER_MODE_ALL :Alle
STR_PICKER_MODE_ALL_TOOLTIP :Anzeige aller Einträge von allen Klassen umschalten
STR_PICKER_MODE_USED :Benutzt
STR_PICKER_MODE_USED_TOOLTIP :Anzeige von nur existierenden Einträgen umschalten
STR_PICKER_MODE_SAVED :Gespeichert
STR_PICKER_MODE_SAVED_TOOLTIP :Anzeige von nur gespeicherten Einträgen umschalten
STR_PICKER_STATION_CLASS_TOOLTIP :Wählen Sie eine anzuzeigende Stationsklasse
STR_PICKER_STATION_TYPE_TOOLTIP :Wählen Sie einen Stationstyp zum Bauen. Strg+Klick, um in gespeicherten Einträgen hinzuzufügen oder zu entfernen
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Wählen Sie eine anzuzeigende Wegpunktklasse
STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Wählen Sie einen zu bauenden Wegpunkt. Strg+Klick, um in gespeicherten Einträgen hinzuzufügen oder zu entfernen
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Wählen Sie eine anzuzeigende Busstationsklasse
STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Wählen Sie einen Busstationstyp zum Bauen. Strg+Klick, um in gespeicherten Einträgen hinzuzufügen oder zu entfernen
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Wählen Sie eine anzuzeigende Lkw-Stationsklasse
STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Wählen Sie einen Lkw-Stationstyp zum Bauen. Strg+Klick, um in gespeicherten Einträgen hinzuzufügen oder zu entfernen
STR_PICKER_OBJECT_CLASS_TOOLTIP :Wählen Sie eine anzuzeigende Objektklasse
STR_PICKER_OBJECT_TYPE_TOOLTIP :Wählen Sie ein zu bauenden Objekttyp. Strg+Klick, um in gespeicherten Einträgen hinzuzufügen oder zu entfernen. Ctrg+Klick+Ziehen, um Gebiet diagonal zu wählen. Zusätzlich Umschalt drücken, um nur einen Kostenvoranschlag anzuzeigen
STR_PICKER_HOUSE_CLASS_TOOLTIP :Wählen Sie eine anzuzeigende Stadtzone
STR_PICKER_HOUSE_TYPE_TOOLTIP :Wählen Sie einen Haustyp zum Bauen. Strg+Klick, um in gespeicherten Einträgen hinzuzufügen oder zu entfernen
STR_HOUSE_PICKER_CAPTION :Hausauswahl
STR_HOUSE_PICKER_CLASS_ZONE1 :Rand
STR_HOUSE_PICKER_CLASS_ZONE2 :Peripherie
STR_HOUSE_PICKER_CLASS_ZONE3 :Äußere Vororte
STR_HOUSE_PICKER_CLASS_ZONE4 :Innere Vororte
STR_HOUSE_PICKER_CLASS_ZONE5 :Stadtmitte
STR_STATION_CLASS_DFLT :Standard
STR_STATION_CLASS_DFLT_STATION :Standart-Haltestelle
@ -3288,7 +3325,7 @@ STR_MAPGEN_GENERATE :{WHITE}Erzeugen
STR_MAPGEN_GENERATE_TOOLTIP :{BLACK}Erstelle die Welt und spiele OpenTTD!
STR_MAPGEN_NEWGRF_SETTINGS :{BLACK}NewGRF-Einstellungen
STR_MAPGEN_NEWGRF_SETTINGS_TOOLTIP :{BLACK}NewGRF-Einstellungen öffnen
STR_MAPGEN_AI_SETTINGS :{BLACK}KI Einstellungen
STR_MAPGEN_AI_SETTINGS :{BLACK}KI-Einstellungen
STR_MAPGEN_AI_SETTINGS_TOOLTIP :{BLACK}KI-Einstellungen öffnen
STR_MAPGEN_GS_SETTINGS :{BLACK}Spielskripteinstellungen
STR_MAPGEN_GS_SETTINGS_TOOLTIP :{BLACK}Spielskripteinstellungen öffnen
@ -3460,6 +3497,9 @@ STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_ROAD_TYPE :Straßentyp
STR_NEWGRF_INSPECT_QUERY_CAPTION :{WHITE}NewGRF-Variable 60+x Parameter (hexadecimal)
# Sprite aligner window
STR_SPRITE_ALIGNER_CAPTION_NO_ACTION :{WHITE}Sprite-Ausrichtung: ({STRING}:{NUM})
STR_SPRITE_ALIGNER_CAPTION_ACTIONA :{WHITE}Sprite-Ausrichtung: Action 0xA, {COMMA} ({STRING}:{NUM})
STR_SPRITE_ALIGNER_CAPTION_ACTION5 :{WHITE}Sprite-Ausrichtung: Action 0x5 {HEX}, {COMMA} ({STRING}:{NUM})
STR_SPRITE_ALIGNER_NEXT_BUTTON :{BLACK}Nächstes Sprite
STR_SPRITE_ALIGNER_NEXT_TOOLTIP :{BLACK}Gehe zum nächsten normalen Sprite und überspringe alle Pseudo-, Recolour- und Schriftsprites (springt ggf. vom ersten bis zum letzten Sprite)
STR_SPRITE_ALIGNER_GOTO_BUTTON :{BLACK}Gehe zu Sprite
@ -3468,6 +3508,7 @@ STR_SPRITE_ALIGNER_PREVIOUS_BUTTON :{BLACK}Vorherig
STR_SPRITE_ALIGNER_PREVIOUS_TOOLTIP :{BLACK}Gehe zum vorherigen normalen Sprite und überspringe alle Pseudo-, Recolour- und Schriftsprites (springt ggf. vom letzten bis zum ersten Sprite)
STR_SPRITE_ALIGNER_SPRITE_TOOLTIP :{BLACK}Darstellung des aktuellen Sprites. Die Ausrichtung wird beim Zeichnen des Sprites ignoriert
STR_SPRITE_ALIGNER_MOVE_TOOLTIP :{BLACK}Bewege die Sprites und ändere dadurch die X- und Y-Offsets. Strg+Klick um die Sprites 8 Blöcke weit zu bewegen.
STR_SPRITE_ALIGNER_SPRITE :{STRING}:{NUM}
###length 2
STR_SPRITE_ALIGNER_CENTRE_OFFSET :{BLACK}Versatz zentriert
@ -4838,7 +4879,7 @@ STR_TEXTFILE_VIEW_LICENCE_TOOLTIP :Lizenz für die
STR_TEXTFILE_README_CAPTION :{WHITE}{STRING}-Liesmich von {STRING}
STR_TEXTFILE_CHANGELOG_CAPTION :{WHITE}{STRING}-Änderungen von {STRING}
STR_TEXTFILE_LICENCE_CAPTION :{WHITE}{STRING}-Lizenz von {STRING}
STR_TEXTFILE_SURVEY_RESULT_CAPTION :{WHITE}Vorschau des Umfragenergebnisses
STR_TEXTFILE_SURVEY_RESULT_CAPTION :{WHITE}Vorschau des Datenerhebungsergebnisses
STR_TEXTFILE_GAME_MANUAL_CAPTION :{WHITE}OpenTTD-Dokument „{STRING}“
@ -4870,7 +4911,9 @@ STR_MESSAGE_ESTIMATED_INCOME :{WHITE}Geschät
STR_ERROR_SAVE_STILL_IN_PROGRESS :{WHITE}Speichern läuft,{}bitte warten, bis es beendet ist!
STR_ERROR_AUTOSAVE_FAILED :{WHITE}Autosicherung fehlgeschlagen
STR_ERROR_UNABLE_TO_READ_DRIVE :{BLACK}Laufwerk nicht betriebsbereit
STR_ERROR_GAME_SAVE_FAILED :{WHITE}Spielspeicherung fehlgeschlagen …
STR_ERROR_UNABLE_TO_DELETE_FILE :{WHITE}Datei kann nicht gelöscht werden
STR_ERROR_GAME_LOAD_FAILED :{WHITE}Laden des Spieles fehlgeschlagen …
STR_GAME_SAVELOAD_ERROR_BROKEN_INTERNAL_ERROR :Interner Fehler: {STRING}
STR_GAME_SAVELOAD_ERROR_BROKEN_SAVEGAME :Spielstandsdatei defekt {STRING}
STR_GAME_SAVELOAD_ERROR_TOO_NEW_SAVEGAME :Spielstand wurde mit einer neueren Spielversion erstellt
@ -4975,6 +5018,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... es i
STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Straßenarbeiten sind im Gange
STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Stadt kann nicht gelöscht werden ...{}Eine Station oder ein Depot bezieht sich auf diese Stadt oder ein Feld im städtischen Besitz kann nicht entfernt werden.
STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... es gibt keinen geeigneten Standort für die Statue im Zentrum dieser Stadt
STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Haus kann nicht gebaut werden …
# Industry related errors
STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... zu viele Industrien
@ -5012,6 +5056,8 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Flughafe
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Grenzt an mehr als eine vorhandene Station
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... Station ist zu groß
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}… nicht unterstützte Anzahl Gleise
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}… nicht unterstützte Länge
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Zu viele Stationen im Umkreis
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Zu viele Bahnsteigteile
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Zu viele Bushaltestellen
@ -5252,6 +5298,10 @@ STR_ERROR_NO_VEHICLES_AVAILABLE_AT_ALL_EXPLANATION :{WHITE}Bitte di
STR_ERROR_NO_VEHICLES_AVAILABLE_YET :{WHITE}Noch keine Fahrzeuge verfügbar
STR_ERROR_NO_VEHICLES_AVAILABLE_YET_EXPLANATION :{WHITE}Ein neues Spiel nach {DATE_SHORT} beginnen oder ein NewGRF-Fahrzeugset mit früher verfügbaren Fahrzeugen verwenden
STR_ERROR_NO_TOWN_ROADTYPES_AVAILABLE_AT_ALL :{WHITE}Nicht-stadtbaubare Straßentypen sind verfügbar
STR_ERROR_NO_TOWN_ROADTYPES_AVAILABLE_AT_ALL_EXPLANATION :{WHITE}Ändern Sie Ihre NewGRF-Konfiguration
STR_ERROR_NO_TOWN_ROADTYPES_AVAILABLE_YET :{WHITE}Es sind noch keine von Städten baubaren Straßentypen verfügbar
STR_ERROR_NO_TOWN_ROADTYPES_AVAILABLE_YET_EXPLANATION :{WHITE}Ein neues Spiel nach {DATE_SHORT} beginnen oder ein NewGRF benutzen, dass frühe von Städten baubare Straßentypen zur Verfügung stellt
# Specific vehicle errors
STR_ERROR_CAN_T_MAKE_TRAIN_PASS_SIGNAL :{WHITE}Der Zug kann das Signal nicht gefahrlos passieren ...
@ -5803,6 +5853,7 @@ STR_JUST_DATE_ISO :{DATE_ISO}
STR_JUST_STRING :{STRING}
STR_JUST_STRING1 :{STRING}
STR_JUST_STRING2 :{STRING}
STR_JUST_STRING4 :{STRING}
STR_JUST_STRING_STRING :{STRING}{STRING}
STR_JUST_RAW_STRING :{STRING}
STR_JUST_BIG_RAW_STRING :{BIG_FONT}{STRING}

@ -372,8 +372,8 @@ STR_BUTTON_CANCEL :{BLACK}Ακύρ
STR_BUTTON_OK :{BLACK}OK
# On screen keyboard window
STR_OSK_KEYBOARD_LAYOUT :`1234567890-=\qwertyuiop[]asdfghjkl;' zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :~!@#$%^&*()_+|QWERTYUIOP{{}}ASDFGHJKL:" ZXCVBNM<>? .
STR_OSK_KEYBOARD_LAYOUT :`1234567890-= qwertyuiop[]asdfghjkl;'#\zxcvbnm,./ .
STR_OSK_KEYBOARD_LAYOUT_CAPS :¬!"£$%^&*()_+ QWERTYUIOP{{}}ASDFGHJKL:@~|ZXCVBNM<>? .
# Measurement tooltip
STR_MEASURE_LENGTH :{BLACK}Μήκος: {NUM}
@ -499,6 +499,8 @@ STR_SCENEDIT_FILE_MENU_QUIT_EDITOR :Έξοδος α
STR_SCENEDIT_FILE_MENU_SEPARATOR :
STR_SCENEDIT_FILE_MENU_QUIT :Έξοδος
STR_SCENEDIT_TOWN_MENU_BUILD_TOWN :Δημιουργία πόλεων
STR_SCENEDIT_TOWN_MENU_PACE_HOUSE :Τοποθέτηση σπιτιών
# Settings menu
###length 16
@ -1579,6 +1581,9 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Ειδοποί
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Όταν είναι ενεργοποιημένη, εμφανίζεται ειδοποίηση όταν κάποιο όχημα δεν έχει αποφέρει κέρδος εντός ενός έτους
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Όταν είναι ενεργοποιημένη, εμφανίζεται ειδοποίηση όταν κάποιο όχημα δεν έχει αποφέρει κέρδος εντός μιας περιόδου
STR_CONFIG_SETTING_WARN_OLD_VEHICLE :Ειδοποίηση όταν ένα όχημα παλιώσει: {STRING}
STR_CONFIG_SETTING_WARN_OLD_VEHICLE_HELPTEXT :Όταν είναι ενεργοποιημένη, εμφανίζεται ειδοποίηση όταν κάποιο όχημα παλιώνει
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Τα οχήματα δεν λήγουν ποτέ: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Όταν είναι ενεργοποιημένη, όλα τα μοντέλα οχημάτων παραμένουν διαθέσιμα για πάντα μετά την παρουσίασή τους
@ -1589,7 +1594,7 @@ STR_CONFIG_SETTING_TIMEKEEPING_UNITS_CALENDAR :Ημερολό
STR_CONFIG_SETTING_TIMEKEEPING_UNITS_WALLCLOCK :Ρολόι τοίχου
STR_CONFIG_SETTING_MINUTES_PER_YEAR :Λεπτά ανά έτος: {STRING}
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Επιλέξτε τον αριθμό των λεπτών σε ένα ημερολογιακό έτος. Η προεπιλογή είναι 12 λεπτά. Ρυθμίστε στο 0 για να σταματήσετε την αλλαγή της ημερολογιακής ώρας. Αυτή η ρύθμιση δεν επηρεάζει την οικονομική προσομοίωση του παιχνιδιού και είναι διαθέσιμη μόνο όταν χρησιμοποιείτε χρονομέτρηση ρολογιού τοίχου
STR_CONFIG_SETTING_MINUTES_PER_YEAR_HELPTEXT :Επιλέξτε τον αριθμό των λεπτών σε ένα ημερολογιακό έτος. Η προεπιλογή είναι 12 λεπτά. Ρυθμίστε στο 0 για να σταματήσετε την αλλαγή της ημερολογιακής ώρας. Η αύξηση της διάρκειας του ημερολογιακού έτους επιβραδύνει την εισαγωγή οχημάτων, σπιτιών και άλλων υποδομών. Δεν επηρεάζει την ταχύτητα του οχήματος ή την οικονομική προσομοίωση, εκτός από τον πληθωρισμό. Αυτή η ρύθμιση είναι διαθέσιμη μόνο όταν χρησιμοποιείται χρονομέτρηση ρολογιού τοίχου
STR_CONFIG_SETTING_MINUTES_PER_YEAR_VALUE :{NUM}
###setting-zero-is-special
@ -2884,7 +2889,7 @@ STR_WAYPOINT_CAPTION :{WHITE}Σημε
STR_STATION_BUILD_RAIL_CAPTION :{WHITE}Επιλογή Σιδηροδρομικού Σταθμού
STR_STATION_BUILD_ORIENTATION :{BLACK}Προσανατολισμός
STR_STATION_BUILD_RAILROAD_ORIENTATION_TOOLTIP :{BLACK}Επιλογή προσανατολισμού σιδηροδρομικού σταθμού
STR_STATION_BUILD_NUMBER_OF_TRACKS :{BLACK}Αριθμός γραμμών
STR_STATION_BUILD_NUMBER_OF_TRACKS :{BLACK}Αριθμός σιδηροτροχιών
STR_STATION_BUILD_NUMBER_OF_TRACKS_TOOLTIP :{BLACK}Επιλέξτε τον αριθμό πλατφορμών για το σιδηροδρομικό σταθμό
STR_STATION_BUILD_PLATFORM_LENGTH :{BLACK}Μήκος πλατφόρμας
STR_STATION_BUILD_PLATFORM_LENGTH_TOOLTIP :{BLACK}Επιλέξτε το μήκος του σιδηροδρομικού σταθμού
@ -2908,8 +2913,16 @@ STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Επιλογή
STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Επιλογή κατηγορίας σταθμών φορτηγών για κατασκευή. Ctrl+κλικ για προσθήκη σε ή αφαίρεση από αποθηκευμένα στοιχεία
STR_PICKER_OBJECT_CLASS_TOOLTIP :Επιλογή κατηγορίας αντικειμένων για εμφάνιση
STR_PICKER_OBJECT_TYPE_TOOLTIP :Επιλογή κατηγορίας αντικειμένων για εμφάνιση. Ctrl+κλικ για προσθήκη σε ή αφαίρεση από αποθηκευμένα στοιχεία. Ctrl+κλικ+σύρσιμο για να επιλεγεί διαγώνια περιοχή. Επίσης, πατήστε Shift για εμφάνιση εκτιμώμενου κόστους μόνο
STR_PICKER_HOUSE_CLASS_TOOLTIP :Επιλέξτε τη ζώνη της πόλης που θέλετε να εμφανίσετε
STR_PICKER_HOUSE_TYPE_TOOLTIP :Επιλογή τύπου σπιτιού για κατασκευή. Ctrl+κλικ για προσθήκη σε ή αφαίρεση από αποθηκευμένα στοιχεία
STR_HOUSE_PICKER_CAPTION :Επιλογή Σπιτιού
STR_HOUSE_PICKER_CLASS_ZONE1 :Άκρη
STR_HOUSE_PICKER_CLASS_ZONE2 :Περίχωρα
STR_HOUSE_PICKER_CLASS_ZONE3 :Εξωτερικά Προάστια
STR_HOUSE_PICKER_CLASS_ZONE4 :Εσωτερικά Προάστια
STR_HOUSE_PICKER_CLASS_ZONE5 :Κέντρο της πόλης
STR_STATION_CLASS_DFLT :Προεπιλεγμένος
STR_STATION_CLASS_DFLT_STATION :Προεπιλεγμένος σταθμός
@ -5105,6 +5118,7 @@ STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}... δε
STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Έργα οδοποιίας σε εξέλιξη
STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}Δεν γίνεται να διαγραφεί η πόλη...{}Ένας σταθμός ή ένα αμαξοστάσιο που αναφέρεται στην πόλη ή ένα τετραγωνίδιο της πόλης δεν μπορεί να αφαιρεθεί
STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... δεν υπάρχει κατάλληλο μέρος για άγαλμα στο κέντρο αυτής της πόλης
STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}Δεν ήταν δυνατό το χτίσιμο του σπιτιού...
# Industry related errors
STR_ERROR_TOO_MANY_INDUSTRIES :{WHITE}... πάρα πολλές βιομηχανίες
@ -5142,6 +5156,8 @@ STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :{WHITE}Δεν
STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Γειτονεύει με περισσότερες από μια υπάρχουσες περιοχές σταθμών/φόρτωσης
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... ο σταθμός είναι υπερβολικά απλωμένος
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}... μη υποστηριζόμενος αριθμός σιδηροτροχιών
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}... μη υποστηριζόμενο μήκος
STR_ERROR_TOO_MANY_STATIONS_LOADING :{WHITE}Πάρα πολλές περιοχές σταθμών/φόρτωσης
STR_ERROR_TOO_MANY_STATION_SPECS :{WHITE}Πάρα πολλά κομμάτια σιδηροδρομικού σταθμού
STR_ERROR_TOO_MANY_BUS_STOPS :{WHITE}Πάρα πολλές στάσεις λεωφορείου

@ -1322,6 +1322,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :{STRING} :הת
###length 2
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :כאשר מאופשר, נשלח מבזק חדשות כאשר רכב לא הכניס שום רווח במשך שנה קלנדרית
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :{STRING} :בטל התיישנות כלי רכב
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :כאשר מאופשר, כל סוגי כלי הרכב נשארים זמינים לעד אחרי השקתם

@ -500,6 +500,7 @@ STR_CONFIG_SETTING_ORDER_REVIEW_OFF :नहीं
###length 2
###length 2

@ -1545,6 +1545,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Figyelmeztetés
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Üzenetek megjelenítése azokról a járművekről, melyek nem termeltek profitot egy év alatt
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT_PERIOD :Üzenetek megjelenítése azokról a járművekről, melyek nem termeltek profitot egy időszakon belül
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Járművek sosem avulnak el: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Bekapcsolva minden járműmodell örökké elérhető marad bevezetése után

@ -1241,6 +1241,7 @@ STR_CONFIG_SETTING_WARN_INCOME_LESS :Birta viðvöru
###length 2
STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT :Þegar þessi stilling er virk, eru frétta boð send ef farartæki hafa ekki skilað hagnaði síðasta dagatals ár
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES :Farartæki úreldast aldrei: {STRING}
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES_HELPTEXT :Ef þessi stilling er virk, eru öll farartæki alltaf í boði eftir að þau voru fyrst kynnt til sögunnar

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save