Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a82f21f24d | ||
|
|
46908fb63a | ||
|
|
8efa99f445 | ||
|
|
c6251426d9 | ||
|
|
9026736cc1 | ||
|
|
b7a2166962 | ||
|
|
8ea68421b1 | ||
|
|
afc5962881 | ||
|
|
9239381d56 | ||
|
|
9dded61af9 | ||
|
|
8fbc5c090b | ||
|
|
00bdd316d7 | ||
|
|
f34284f1a0 | ||
|
|
c77659c995 | ||
|
|
e6877d0823 | ||
|
|
beba12f9d6 | ||
|
|
95fd4ec649 | ||
|
|
0fa41c7493 | ||
|
|
60cbcf0742 | ||
|
|
e38a4e1e57 | ||
|
|
5965f184c2 | ||
|
|
db20c7f461 | ||
|
|
e2e8872e82 | ||
|
|
4750d2836c | ||
|
|
b1c31f9500 | ||
|
|
a6879e9180 | ||
|
|
5eb7d49024 | ||
|
|
69c0332813 | ||
|
|
b11942cf44 | ||
|
|
ef6995e8d4 | ||
|
|
c0fd2b969b | ||
|
|
683778fd7a | ||
|
|
63eeadef17 | ||
|
|
e526b2ccd3 |
@@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p ../translations/lang
|
||||
git diff 1.7/master -- src/lang/english.txt | tail -n +5 | grep '^[+]' | cut -b 2- | \
|
||||
grep -v "^STR_TABLET_CLOSE\b" | \
|
||||
grep -v "^STR_TABLET_SHIFT\b" | \
|
||||
grep -v "^STR_TABLET_CTRL\b" | \
|
||||
cat > ../translations/lang/english.txt
|
||||
|
||||
for f in src/lang/*.txt; do
|
||||
[ "$f" = src/lang/english.txt ] && continue
|
||||
rm -f ../translations/lang/`basename $f`
|
||||
cat ../translations/lang/english.txt | grep '^STR' | while read name text; do
|
||||
grep "^$name\b" $f >> ../translations/lang/`basename $f`
|
||||
done
|
||||
done
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
for f in ../translations/lang/*.txt; do
|
||||
[ "$f" = ../translations/lang/english.txt ] && continue
|
||||
out=src/lang/`basename $f`
|
||||
grep "^# Android strings" $out > /dev/null || [ -z "`tail -c 2 $out`" ] || echo >> $out
|
||||
{ grep -v "^# Android strings" $out ; echo "# Android strings" ; } > $out.new
|
||||
mv -f $out.new $out
|
||||
cat $f | grep '^STR' | while read name text; do
|
||||
[ "$name" = "STR_ABOUT_MENU_SEPARATOR" ] && continue
|
||||
{ grep -v "^$name\b" $out ; printf "%-64s%s\n" "$name" "$text" ; } > $out.new
|
||||
mv -f $out.new $out
|
||||
done
|
||||
done
|
||||
@@ -38,10 +38,14 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
commit-checker: {}
|
||||
linux-amd64-clang-3.8: {}
|
||||
linux-amd64-gcc-6: {}
|
||||
linux-i386-gcc-6: {}
|
||||
commit-checker:
|
||||
Tag: 'commit-checker'
|
||||
linux-amd64-clang-3.8:
|
||||
Tag: 'linux-amd64-clang-3.8'
|
||||
linux-amd64-gcc-6:
|
||||
Tag: 'linux-amd64-gcc-6'
|
||||
linux-i386-gcc-6:
|
||||
Tag: 'linux-i386-gcc-6'
|
||||
|
||||
steps:
|
||||
- template: azure-pipelines/templates/ci-git-rebase.yml
|
||||
@@ -50,7 +54,7 @@ jobs:
|
||||
- template: azure-pipelines/templates/linux-build.yml
|
||||
parameters:
|
||||
Image: compile-farm-ci
|
||||
Tag: $(Agent.JobName)
|
||||
Tag: $(Tag)
|
||||
|
||||
- job: macos
|
||||
displayName: 'MacOS'
|
||||
|
||||
@@ -24,7 +24,7 @@ steps:
|
||||
${{ if eq(parameters.Image, 'compile-farm-ci') }}:
|
||||
displayName: 'Build and test'
|
||||
# Run the commit-checker only if it is a Pull Request
|
||||
condition: and(succeeded(), or(ne(variables['Agent.JobName'], 'commit-checker'), eq(variables['Build.Reason'], 'PullRequest')))
|
||||
condition: and(succeeded(), or(not(contains(variables['Agent.JobName'], 'commit-checker')), eq(variables['Build.Reason'], 'PullRequest')))
|
||||
inputs:
|
||||
command: 'Run an image'
|
||||
imageName: openttd/${{ parameters.Image }}:${{ parameters.Tag }}
|
||||
|
||||
@@ -110,14 +110,22 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
linux-ubuntu-xenial-i386-gcc: {}
|
||||
linux-ubuntu-xenial-amd64-gcc: {}
|
||||
linux-ubuntu-bionic-i386-gcc: {}
|
||||
linux-ubuntu-bionic-amd64-gcc: {}
|
||||
linux-debian-jessie-i386-gcc: {}
|
||||
linux-debian-jessie-amd64-gcc: {}
|
||||
linux-debian-stretch-i386-gcc: {}
|
||||
linux-debian-stretch-amd64-gcc: {}
|
||||
linux-ubuntu-xenial-i386-gcc:
|
||||
Tag: 'linux-ubuntu-xenial-i386-gcc'
|
||||
linux-ubuntu-xenial-amd64-gcc:
|
||||
Tag: 'linux-ubuntu-xenial-amd64-gcc'
|
||||
linux-ubuntu-bionic-i386-gcc:
|
||||
Tag: 'linux-ubuntu-bionic-i386-gcc'
|
||||
linux-ubuntu-bionic-amd64-gcc:
|
||||
Tag: 'linux-ubuntu-bionic-amd64-gcc'
|
||||
linux-debian-jessie-i386-gcc:
|
||||
Tag: 'linux-debian-jessie-i386-gcc'
|
||||
linux-debian-jessie-amd64-gcc:
|
||||
Tag: 'linux-debian-jessie-amd64-gcc'
|
||||
linux-debian-stretch-i386-gcc:
|
||||
Tag: 'linux-debian-stretch-i386-gcc'
|
||||
linux-debian-stretch-amd64-gcc:
|
||||
Tag: 'linux-debian-stretch-amd64-gcc'
|
||||
|
||||
steps:
|
||||
- template: release-fetch-source.yml
|
||||
@@ -125,7 +133,7 @@ jobs:
|
||||
parameters:
|
||||
Image: compile-farm
|
||||
ContainerCommand: '$(Build.BuildNumber)'
|
||||
Tag: $(Agent.JobName)
|
||||
Tag: $(Tag)
|
||||
- template: linux-claim-bundles.yml
|
||||
- template: release-bundles.yml
|
||||
|
||||
|
||||
@@ -1,3 +1,29 @@
|
||||
1.9.2 (2019-07-07)
|
||||
------------------------------------------------------------------------
|
||||
- Change: Set default setting in server browser of "Advertised" to "Yes" (#7568)
|
||||
- Change: Allow building road stops over self-owned one-way/blocked road (#7547)
|
||||
- Fix #7463: Promote scroll mode setting to basic category (#7586)
|
||||
- Fix: Inconsistent GUI scaling (#7539)
|
||||
- Fix #7491: Send company update admin message when bankruptcy counter changes (#7492)
|
||||
- Fix #7553: Check bounds when loading strings (#7554)
|
||||
- Fix: Really increase the maximum number of GameScript texts to 64k (#7555)
|
||||
- Fix: Crash when attempting to load old save game with GRFs set (#7546)
|
||||
- Fix #6507: Don't try to load invalid depots from older savegames (#7546)
|
||||
- Fix: Railtype bits were moved too late, leading to rails under bridges losing their type (#7546)
|
||||
- Fix: Bounds check access to railtype_map (#7529)
|
||||
- Fix: Spurious errors when using more than 32 railtypes (#7533)
|
||||
- Fix #7633: Allow zero-cost track conversion to succeed (#7634)
|
||||
- Fix #7577: Check if linkgraph station index is valid before dereferencing (#7583)
|
||||
- Fix #7224: Drag and drop vehicle group creation does not work correctly (#7581)
|
||||
- Fix #7570: Show Github URL in the crashlog window (#7571)
|
||||
- Fix: Clicking on scrollbar 'thumb' moved position up instantly (#7549)
|
||||
- Fix #7255: Prevent crashlog corruption by only printing the 32 most recent news messages (#7542)
|
||||
- Fix #5685: Check for free wagons in ScriptVehicleList (#7617)
|
||||
- Fix: Make GSGoal.QuestionClient work correctly at least for clients with ID < 2**16 (#7560)
|
||||
- Fix #6666: Mismatched parentheses in RTL languages (#7480)
|
||||
- Fix: [Windows] Various reliability and correctness improvements to MIDI on Windows (#7620)
|
||||
|
||||
|
||||
1.9.1 (2019-04-08)
|
||||
------------------------------------------------------------------------
|
||||
- Fix #6564: Enforce types of arguments for station name strings (#7419)
|
||||
@@ -8,6 +34,7 @@
|
||||
- Fix: [Windows] Incorrect error handling could lead to cascading error windows (#7482)
|
||||
- Fix #7478: Don't remove NewGRF objects on company take-over. (#7483)
|
||||
|
||||
|
||||
1.9.0 (2019-04-01)
|
||||
------------------------------------------------------------------------
|
||||
- Fix #7411: Use industry production callback (if used) on initial industry cargo generation (#7412)
|
||||
|
||||
22
config.lib
22
config.lib
@@ -560,9 +560,9 @@ check_params() {
|
||||
# Check if all params have valid values
|
||||
|
||||
# OS only allows DETECT, UNIX, OSX, FREEBSD, DRAGONFLY, OPENBSD, NETBSD, MORPHOS, BEOS, HAIKU, SUNOS, CYGWIN, MINGW, OS2, and DOS
|
||||
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|ANDROID)$'`" ]; then
|
||||
if [ -z "`echo $os | egrep '^(DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS)$'`" ]; then
|
||||
log 1 "configure: error: invalid option --os=$os"
|
||||
log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS|ANDROID]"
|
||||
log 1 " Available options are: --os=[DETECT|UNIX|OSX|FREEBSD|DRAGONFLY|OPENBSD|NETBSD|HPUX|MORPHOS|BEOS|HAIKU|SUNOS|CYGWIN|MINGW|OS2|DOS]"
|
||||
exit 1
|
||||
fi
|
||||
# cpu_type can be either 32 or 64
|
||||
@@ -1099,7 +1099,7 @@ check_params() {
|
||||
# of the tags folder, the folder of the tag does not have a .svn folder
|
||||
# anymore and this fails to detect the subversion repository checkout.
|
||||
log 1 "checking revision... svn detection (tag)"
|
||||
elif [ -e "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
|
||||
elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
|
||||
log 1 "checking revision... git detection"
|
||||
elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`HGPLAIN= hg help 2>/dev/null`" ]; then
|
||||
log 1 "checking revision... hg detection"
|
||||
@@ -1616,7 +1616,7 @@ make_cflags_and_ldflags() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "OS2" ] && [ "$os" != "ANDROID" ]; then
|
||||
if [ "$os" != "CYGWIN" ] && [ "$os" != "HAIKU" ] && [ "$os" != "OPENBSD" ] && [ "$os" != "MINGW" ] && [ "$os" != "MORPHOS" ] && [ "$os" != "OSX" ] && [ "$os" != "DOS" ] && [ "$os" != "OS2" ]; then
|
||||
LIBS="$LIBS -lpthread"
|
||||
fi
|
||||
|
||||
@@ -1657,7 +1657,7 @@ make_cflags_and_ldflags() {
|
||||
fi
|
||||
|
||||
# Most targets act like UNIX, just with some additions
|
||||
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ] || [ "$os" = "ANDROID" ]; then
|
||||
if [ "$os" = "BEOS" ] || [ "$os" = "HAIKU" ] || [ "$os" = "OSX" ] || [ "$os" = "MORPHOS" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "DRAGONFLY" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OS2" ]; then
|
||||
CFLAGS="$CFLAGS -DUNIX"
|
||||
fi
|
||||
# And others like Windows
|
||||
@@ -1823,14 +1823,14 @@ make_cflags_and_ldflags() {
|
||||
CFLAGS="$CFLAGS -DWITH_XAUDIO2"
|
||||
fi
|
||||
|
||||
if [ -n "$libtimidity" ]; then
|
||||
if [ -n "$libtimidity_config" ]; then
|
||||
CFLAGS="$CFLAGS -DLIBTIMIDITY"
|
||||
CFLAGS="$CFLAGS `$libtimidity --cflags | tr '\n\r' ' '`"
|
||||
CFLAGS="$CFLAGS `$libtimidity_config --cflags | tr '\n\r' ' '`"
|
||||
|
||||
if [ "$enable_static" != "0" ]; then
|
||||
LIBS="$LIBS `$libtimidity --libs --static | tr '\n\r' ' '`"
|
||||
LIBS="$LIBS `$libtimidity_config --libs --static | tr '\n\r' ' '`"
|
||||
else
|
||||
LIBS="$LIBS `$libtimidity --libs | tr '\n\r' ' '`"
|
||||
LIBS="$LIBS `$libtimidity_config --libs | tr '\n\r' ' '`"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -2772,7 +2772,7 @@ detect_lzo2() {
|
||||
}
|
||||
|
||||
detect_libtimidity() {
|
||||
detect_pkg_config "$with_libtimidity" "libtimidity" "libtimidity" "0.1" "1"
|
||||
detect_pkg_config "$with_libtimidity" "libtimidity" "libtimidity_config" "0.1" "1"
|
||||
}
|
||||
|
||||
detect_fluidsynth() {
|
||||
@@ -3494,7 +3494,7 @@ showhelp() {
|
||||
echo " --os=OS the OS we are compiling for [DETECT]"
|
||||
echo " DETECT/UNIX/OSX/FREEBSD/DRAGONFLY/OPENBSD/"
|
||||
echo " NETBSD/MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/"
|
||||
echo " MINGW/OS2/DOS/HAIKU/ANDROID"
|
||||
echo " MINGW/OS2/DOS/HAIKU"
|
||||
echo ""
|
||||
echo "Paths:"
|
||||
echo " --prefix-dir=dir specifies the prefix for all installed"
|
||||
|
||||
@@ -59,11 +59,7 @@ ROOT_DIR=`pwd`
|
||||
# Determine if we are using a modified version
|
||||
# Assume the dir is not modified
|
||||
MODIFIED="0"
|
||||
if [ -f "$ROOT_DIR/.ottdrev" ]; then
|
||||
# We are an exported source bundle
|
||||
cat $ROOT_DIR/.ottdrev
|
||||
exit
|
||||
elif [ -d "$ROOT_DIR/.git" ]; then
|
||||
if [ -d "$ROOT_DIR/.git" ]; then
|
||||
# We are a git checkout
|
||||
# Refresh the index to make sure file stat info is in sync, then look for modifications
|
||||
git update-index --refresh >/dev/null
|
||||
@@ -97,6 +93,11 @@ elif [ -d "$ROOT_DIR/.git" ]; then
|
||||
ISTAG="0"
|
||||
ISSTABLETAG="0"
|
||||
fi
|
||||
|
||||
elif [ -f "$ROOT_DIR/.ottdrev" ]; then
|
||||
# We are an exported source bundle
|
||||
cat $ROOT_DIR/.ottdrev
|
||||
exit
|
||||
else
|
||||
# We don't know
|
||||
MODIFIED="1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
OpenTTD's known bugs
|
||||
Last updated: 2019-04-08
|
||||
Release version: 1.9.1
|
||||
Last updated: 2019-07-07
|
||||
Release version: 1.9.2
|
||||
------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
openttd (1.9.2-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.9.2
|
||||
|
||||
-- OpenTTD <info@openttd.org> Sun, 07 Jul 2019 23:00:00 +0200
|
||||
|
||||
openttd (1.9.1-0) unstable; urgency=low
|
||||
|
||||
* New upstream release 1.9.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@echo off
|
||||
|
||||
set OPENTTD_VERSION=1.9.1
|
||||
set OPENTTD_VERSION=1.9.2
|
||||
set OPENSFX_VERSION=0.8.0
|
||||
set NOSOUND_VERSION=0.8.0
|
||||
set OPENGFX_VERSION=1.2.0
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
#
|
||||
|
||||
Name: openttd
|
||||
Version: 1.9.1
|
||||
Version: 1.9.2
|
||||
Release: 0
|
||||
%define srcver 1.9.1
|
||||
%define srcver 1.9.2
|
||||
Summary: An open source reimplementation of Chris Sawyer's Transport Tycoon Deluxe
|
||||
License: GPL-2.0
|
||||
Group: Amusements/Games/Strategy/Other
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Version numbers to update
|
||||
!define APPV_MAJOR 1
|
||||
!define APPV_MINOR 9
|
||||
!define APPV_MAINT 1
|
||||
!define APPV_MAINT 2
|
||||
!define APPV_BUILD 0
|
||||
!define APPV_EXTRA ""
|
||||
|
||||
|
||||
@@ -676,7 +676,6 @@
|
||||
<ClInclude Include="..\src\tilehighlight_type.h" />
|
||||
<ClInclude Include="..\src\tilematrix_type.hpp" />
|
||||
<ClInclude Include="..\src\timetable.h" />
|
||||
<ClInclude Include="..\src\toolbar_type.h" />
|
||||
<ClInclude Include="..\src\toolbar_gui.h" />
|
||||
<ClInclude Include="..\src\town.h" />
|
||||
<ClInclude Include="..\src\town_type.h" />
|
||||
|
||||
@@ -1116,9 +1116,6 @@
|
||||
<ClInclude Include="..\src\timetable.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\toolbar_type.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\toolbar_gui.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
||||
10
source.list
10
source.list
@@ -90,7 +90,6 @@ tgp.cpp
|
||||
tile_map.cpp
|
||||
tilearea.cpp
|
||||
townname.cpp
|
||||
tutorial_gui.cpp
|
||||
#if WIN32
|
||||
#else
|
||||
#if OS2
|
||||
@@ -138,7 +137,6 @@ base_media_func.h
|
||||
base_station_base.h
|
||||
bmp.h
|
||||
bridge.h
|
||||
build_confirmation_func.h
|
||||
cargo_type.h
|
||||
cargoaction.h
|
||||
cargomonitor.h
|
||||
@@ -365,7 +363,6 @@ tilehighlight_func.h
|
||||
tilehighlight_type.h
|
||||
tilematrix_type.hpp
|
||||
timetable.h
|
||||
toolbar_type.h
|
||||
toolbar_gui.h
|
||||
town.h
|
||||
town_type.h
|
||||
@@ -455,7 +452,6 @@ airport_gui.cpp
|
||||
autoreplace_gui.cpp
|
||||
bootstrap_gui.cpp
|
||||
bridge_gui.cpp
|
||||
build_confirmation_gui.cpp
|
||||
build_vehicle_gui.cpp
|
||||
cheat_gui.cpp
|
||||
company_gui.cpp
|
||||
@@ -917,12 +913,6 @@ script/api/script_window.cpp
|
||||
# Blitters
|
||||
#if DEDICATED
|
||||
#else
|
||||
blitter/16bpp_base.cpp
|
||||
blitter/16bpp_base.hpp
|
||||
blitter/16bpp_anim.cpp
|
||||
blitter/16bpp_anim.hpp
|
||||
blitter/16bpp_simple.cpp
|
||||
blitter/16bpp_simple.hpp
|
||||
blitter/32bpp_anim.cpp
|
||||
blitter/32bpp_anim.hpp
|
||||
#if SSE
|
||||
|
||||
1
src/3rdparty/squirrel/squirrel/sqobject.h
vendored
1
src/3rdparty/squirrel/squirrel/sqobject.h
vendored
@@ -2,7 +2,6 @@
|
||||
#ifndef _SQOBJECT_H_
|
||||
#define _SQOBJECT_H_
|
||||
|
||||
#include <limits>
|
||||
#include "squtils.h"
|
||||
|
||||
#define SQ_CLOSURESTREAM_HEAD (('S'<<24)|('Q'<<16)|('I'<<8)|('R'))
|
||||
|
||||
@@ -110,7 +110,7 @@ struct AIListWindow : public Window {
|
||||
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
|
||||
{
|
||||
if (widget == WID_AIL_LIST) {
|
||||
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
|
||||
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||
|
||||
resize->width = 1;
|
||||
resize->height = this->line_height;
|
||||
@@ -123,16 +123,16 @@ struct AIListWindow : public Window {
|
||||
switch (widget) {
|
||||
case WID_AIL_LIST: {
|
||||
/* Draw a list of all available AIs. */
|
||||
int y = Center(r.top, this->line_height);
|
||||
int y = this->GetWidget<NWidgetBase>(WID_AIL_LIST)->pos_y;
|
||||
/* First AI in the list is hardcoded to random */
|
||||
if (this->vscroll->IsVisible(0)) {
|
||||
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_LEFT, y, this->slot == OWNER_DEITY ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI, this->selected == -1 ? TC_WHITE : TC_ORANGE);
|
||||
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_LEFT, y + WD_MATRIX_TOP, this->slot == OWNER_DEITY ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI, this->selected == -1 ? TC_WHITE : TC_ORANGE);
|
||||
y += this->line_height;
|
||||
}
|
||||
ScriptInfoList::const_iterator it = this->info_list->begin();
|
||||
for (int i = 1; it != this->info_list->end(); i++, it++) {
|
||||
if (this->vscroll->IsVisible(i)) {
|
||||
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, y, (*it).second->GetName(), (this->selected == i - 1) ? TC_WHITE : TC_ORANGE);
|
||||
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, y + WD_MATRIX_TOP, (*it).second->GetName(), (this->selected == i - 1) ? TC_WHITE : TC_ORANGE);
|
||||
y += this->line_height;
|
||||
}
|
||||
}
|
||||
@@ -349,7 +349,7 @@ struct AISettingsWindow : public Window {
|
||||
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
|
||||
{
|
||||
if (widget == WID_AIS_BACKGROUND) {
|
||||
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
|
||||
this->line_height = max(SETTING_BUTTON_HEIGHT, FONT_HEIGHT_NORMAL) + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||
|
||||
resize->width = 1;
|
||||
resize->height = this->line_height;
|
||||
@@ -371,6 +371,7 @@ struct AISettingsWindow : public Window {
|
||||
uint text_left = r.left + (rtl ? WD_FRAMERECT_LEFT : SETTING_BUTTON_WIDTH + 8);
|
||||
uint text_right = r.right - (rtl ? SETTING_BUTTON_WIDTH + 8 : WD_FRAMERECT_RIGHT);
|
||||
|
||||
|
||||
int y = r.top;
|
||||
int button_y_offset = (this->line_height - SETTING_BUTTON_HEIGHT) / 2;
|
||||
int text_y_offset = (this->line_height - FONT_HEIGHT_NORMAL) / 2;
|
||||
@@ -415,7 +416,7 @@ struct AISettingsWindow : public Window {
|
||||
}
|
||||
}
|
||||
|
||||
DrawString(text_left, text_right, Center(y, this->line_height), str, colour);
|
||||
DrawString(text_left, text_right, y + text_y_offset, str, colour);
|
||||
y += this->line_height;
|
||||
}
|
||||
}
|
||||
@@ -673,41 +674,39 @@ static const NWidgetPart _nested_ai_config_widgets[] = {
|
||||
NWidget(WWT_CAPTION, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_MAUVE, WID_AIC_BACKGROUND),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(7, 7, 7),
|
||||
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_AI, STR_NULL), SetPadding(0, 5, 0, 5),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_LIST), SetMinimalSize(288, 112), SetFill(1, 0), SetMatrixDataTip(1, 8, STR_AI_CONFIG_AILIST_TOOLTIP), SetScrollbar(WID_AIC_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_MAUVE, WID_AIC_SCROLLBAR),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL), SetPIP(4, 4, 4),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(7, 0, 7),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_DECREASE), SetFill(0, 1), SetDataTip(AWV_DECREASE, STR_NULL),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_INCREASE), SetFill(0, 1), SetDataTip(AWV_INCREASE, STR_NULL),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(6, 0),
|
||||
NWidget(WWT_TEXT, COLOUR_MAUVE, WID_AIC_NUMBER), SetDataTip(STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS, STR_NULL), SetFill(1, 0), SetPadding(1, 0, 0, 0),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL), SetPIP(4, 4, 4),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(7, 0, 7),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_DECREASE), SetFill(0, 1), SetDataTip(AWV_DECREASE, STR_NULL),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_YELLOW, WID_AIC_INCREASE), SetFill(0, 1), SetDataTip(AWV_INCREASE, STR_NULL),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(6, 0),
|
||||
NWidget(WWT_TEXT, COLOUR_MAUVE, WID_AIC_NUMBER), SetDataTip(STR_DIFFICULTY_LEVEL_SETTING_MAXIMUM_NO_COMPETITORS, STR_NULL), SetFill(1, 0), SetPadding(1, 0, 0, 0),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_UP), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_UP, STR_AI_CONFIG_MOVE_UP_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_DOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_DOWN, STR_AI_CONFIG_MOVE_DOWN_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 9),
|
||||
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_GAMESCRIPT, STR_NULL), SetPadding(0, 5, 4, 5),
|
||||
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_GAMELIST), SetSizingType(NWST_STEP), SetMinimalSize(288, 14), SetFill(1, 0), SetMatrixDataTip(1, 1, STR_AI_CONFIG_GAMELIST_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CHANGE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CHANGE, STR_AI_CONFIG_CHANGE_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CONFIGURE, STR_AI_CONFIG_CONFIGURE_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CLOSE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_README), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_README, STR_NULL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_CHANGELOG), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_NULL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_LICENSE), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_LICENCE, STR_NULL),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONTENT_DOWNLOAD), SetFill(1, 0), SetMinimalSize(279, 12), SetPadding(0, 7, 9, 7), SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_UP), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_UP, STR_AI_CONFIG_MOVE_UP_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_MOVE_DOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_AI_CONFIG_MOVE_DOWN, STR_AI_CONFIG_MOVE_DOWN_TOOLTIP),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_AI, STR_NULL), SetPadding(0, 5, 0, 5),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_LIST), SetMinimalSize(288, 112), SetFill(1, 0), SetMatrixDataTip(1, 8, STR_AI_CONFIG_AILIST_TOOLTIP), SetScrollbar(WID_AIC_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_MAUVE, WID_AIC_SCROLLBAR),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 9),
|
||||
NWidget(WWT_FRAME, COLOUR_MAUVE), SetDataTip(STR_AI_CONFIG_GAMESCRIPT, STR_NULL), SetPadding(0, 5, 4, 5),
|
||||
NWidget(WWT_MATRIX, COLOUR_MAUVE, WID_AIC_GAMELIST), SetMinimalSize(288, 14), SetFill(1, 0), SetMatrixDataTip(1, 1, STR_AI_CONFIG_GAMELIST_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CHANGE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CHANGE, STR_AI_CONFIG_CHANGE_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONFIGURE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_CONFIG_CONFIGURE, STR_AI_CONFIG_CONFIGURE_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CLOSE), SetFill(1, 0), SetMinimalSize(93, 12), SetDataTip(STR_AI_SETTINGS_CLOSE, STR_NULL),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(7, 0, 7),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_README), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_README, STR_NULL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_CHANGELOG), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_NULL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_LICENSE), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_LICENCE, STR_NULL),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONTENT_DOWNLOAD), SetFill(1, 0), SetMinimalSize(279, 12), SetPadding(0, 7, 9, 7), SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
@@ -772,12 +771,12 @@ struct AIConfigWindow : public Window {
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_AIC_GAMELIST:
|
||||
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
|
||||
size->height = this->line_height;
|
||||
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||
size->height = 1 * this->line_height;
|
||||
break;
|
||||
|
||||
case WID_AIC_LIST:
|
||||
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
|
||||
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||
size->height = 8 * this->line_height;
|
||||
break;
|
||||
|
||||
@@ -831,14 +830,14 @@ struct AIConfigWindow : public Window {
|
||||
text = STR_JUST_RAW_STRING;
|
||||
}
|
||||
|
||||
DrawString(r.left + 10, r.right - 10, Center(r.top, this->line_height), text,
|
||||
DrawString(r.left + 10, r.right - 10, r.top + WD_MATRIX_TOP, text,
|
||||
(this->selected_slot == OWNER_DEITY) ? TC_WHITE : (IsEditable(OWNER_DEITY) ? TC_ORANGE : TC_SILVER));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case WID_AIC_LIST: {
|
||||
int y = Center(r.top, this->line_height);
|
||||
int y = r.top;
|
||||
for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < MAX_COMPANIES; i++) {
|
||||
StringID text;
|
||||
|
||||
@@ -850,7 +849,7 @@ struct AIConfigWindow : public Window {
|
||||
} else {
|
||||
text = STR_AI_CONFIG_RANDOM_AI;
|
||||
}
|
||||
DrawString(r.left + 10, r.right - 10, y, text,
|
||||
DrawString(r.left + 10, r.right - 10, y + WD_MATRIX_TOP, text,
|
||||
(this->selected_slot == i) ? TC_WHITE : (IsEditable((CompanyID)i) ? TC_ORANGE : TC_SILVER));
|
||||
y += this->line_height;
|
||||
}
|
||||
@@ -1102,7 +1101,7 @@ struct AIDebugWindow : public Window {
|
||||
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
|
||||
{
|
||||
if (widget == WID_AID_LOG_PANEL) {
|
||||
resize->height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL);
|
||||
resize->height = FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
|
||||
size->height = 14 * resize->height + this->top_offset + this->bottom_offset;
|
||||
}
|
||||
}
|
||||
@@ -1118,8 +1117,6 @@ struct AIDebugWindow : public Window {
|
||||
|
||||
bool dirty = false;
|
||||
|
||||
Dimension d = GetSpriteSize(SPR_COMPANY_ICON);
|
||||
uint offset_y = Center(0, GetMinSizing(NWST_STEP, d.height + WD_MATRIX_TOP + WD_MATRIX_BOTTOM + 1), d.height);
|
||||
/* Paint the company icons */
|
||||
for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
|
||||
NWidgetCore *button = this->GetWidget<NWidgetCore>(i + WID_AID_COMPANY_BUTTON_START);
|
||||
@@ -1140,7 +1137,7 @@ struct AIDebugWindow : public Window {
|
||||
if (!valid) continue;
|
||||
|
||||
byte offset = (i == ai_debug_company) ? 1 : 0;
|
||||
DrawCompanyIcon(i, Center(button->pos_x + offset, button->current_x, d.width), button->pos_y + offset + offset_y);
|
||||
DrawCompanyIcon(i, button->pos_x + button->current_x / 2 - 7 + offset, this->GetWidget<NWidgetBase>(WID_AID_COMPANY_BUTTON_START + i)->pos_y + 2 + offset);
|
||||
}
|
||||
|
||||
/* Set button colour for Game Script. */
|
||||
@@ -1219,7 +1216,7 @@ struct AIDebugWindow : public Window {
|
||||
ScriptLog::LogData *log = this->GetLogPointer();
|
||||
if (log == NULL) return;
|
||||
|
||||
int y = Center(this->top_offset, this->resize.step_height);
|
||||
int y = this->top_offset;
|
||||
for (int i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < log->used; i++) {
|
||||
int pos = (i + log->pos + 1 - log->used + log->count) % log->count;
|
||||
if (log->lines[pos] == NULL) break;
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include "hotkeys.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "gui.h"
|
||||
#include "command_func.h"
|
||||
#include "build_confirmation_func.h"
|
||||
|
||||
#include "widgets/airport_widget.h"
|
||||
|
||||
@@ -75,13 +73,12 @@ struct BuildAirToolbarWindow : Window {
|
||||
BuildAirToolbarWindow(WindowDesc *desc, WindowNumber window_number) : Window(desc)
|
||||
{
|
||||
this->InitNested(window_number);
|
||||
if (_settings_client.gui.link_terraform_toolbar || _settings_client.gui.compact_vertical_toolbar) ShowTerraformToolbar();
|
||||
if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
|
||||
this->last_user_action = WIDGET_LIST_END;
|
||||
}
|
||||
|
||||
~BuildAirToolbarWindow()
|
||||
{
|
||||
if (_thd.GetCallbackWnd() == this) this->OnPlaceObjectAbort();
|
||||
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
|
||||
}
|
||||
|
||||
@@ -116,13 +113,13 @@ struct BuildAirToolbarWindow : Window {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
virtual void OnPlaceObject(Point pt, TileIndex tile)
|
||||
{
|
||||
switch (this->last_user_action) {
|
||||
case WID_AT_AIRPORT: {
|
||||
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_BUILD_STATION);
|
||||
case WID_AT_AIRPORT:
|
||||
PlaceAirport(tile);
|
||||
break;
|
||||
}
|
||||
|
||||
case WID_AT_DEMOLISH:
|
||||
PlaceProc_DemolishArea(tile);
|
||||
@@ -130,7 +127,6 @@ struct BuildAirToolbarWindow : Window {
|
||||
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
MoveAllWindowsOffScreen();
|
||||
}
|
||||
|
||||
virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
|
||||
@@ -140,29 +136,17 @@ struct BuildAirToolbarWindow : Window {
|
||||
|
||||
virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
|
||||
{
|
||||
if (pt.x == -1) return;
|
||||
MoveAllHiddenWindowsBackToScreen();
|
||||
switch (select_proc) {
|
||||
case DDSP_BUILD_STATION:
|
||||
assert(start_tile == end_tile);
|
||||
PlaceAirport(end_tile);
|
||||
break;
|
||||
case DDSP_DEMOLISH_AREA:
|
||||
GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
|
||||
break;
|
||||
default: NOT_REACHED();
|
||||
if (pt.x != -1 && select_proc == DDSP_DEMOLISH_AREA) {
|
||||
GUIPlaceProcDragXY(select_proc, start_tile, end_tile);
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnPlaceObjectAbort()
|
||||
{
|
||||
MoveAllHiddenWindowsBackToScreen();
|
||||
this->RaiseButtons();
|
||||
if (!ConfirmationWindowShown()) {
|
||||
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_AIR);
|
||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||
}
|
||||
ResetObjectToPlace();
|
||||
|
||||
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_AIR);
|
||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||
}
|
||||
|
||||
static HotkeyList hotkeys;
|
||||
@@ -220,7 +204,7 @@ Window *ShowBuildAirToolbar()
|
||||
{
|
||||
if (!Company::IsValidID(_local_company)) return NULL;
|
||||
|
||||
DeleteToolbarLinkedWindows();
|
||||
DeleteWindowByClass(WC_BUILD_TOOLBAR);
|
||||
return AllocateWindowDescFront<BuildAirToolbarWindow>(&_air_toolbar_desc, TRANSPORT_AIR);
|
||||
}
|
||||
|
||||
@@ -321,7 +305,6 @@ public:
|
||||
d.width += padding.width;
|
||||
d.height += padding.height;
|
||||
*size = maxdim(*size, d);
|
||||
size->height = GetMinSizing(NWST_STEP, size->height);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -333,7 +316,7 @@ public:
|
||||
size->width = max(size->width, GetStringBoundingBox(as->name).width);
|
||||
}
|
||||
|
||||
this->line_height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
|
||||
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||
size->height = 5 * this->line_height;
|
||||
break;
|
||||
}
|
||||
@@ -385,9 +368,7 @@ public:
|
||||
if (!as->IsAvailable()) {
|
||||
GfxFillRect(r.left + 1, y + 1, r.right - 1, y + this->line_height - 2, PC_BLACK, FILLRECT_CHECKER);
|
||||
}
|
||||
|
||||
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, Center(y, this->line_height), as->name, ((int)i == _selected_airport_index) ? TC_WHITE : TC_BLACK);
|
||||
|
||||
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, y + WD_MATRIX_TOP, as->name, ((int)i == _selected_airport_index) ? TC_WHITE : TC_BLACK);
|
||||
y += this->line_height;
|
||||
}
|
||||
break;
|
||||
@@ -573,41 +554,35 @@ static const NWidgetPart _nested_build_airport_widgets[] = {
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_AIRPORT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
/* Airport dropdown selector and picture. */
|
||||
NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 0), SetPIP(2, 0, 2),
|
||||
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetSizingType(NWST_STEP), SetDataTip(STR_STATION_BUILD_AIRPORT_CLASS_LABEL, STR_NULL), SetFill(1, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_AP_CLASS_DROPDOWN), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_STATION_BUILD_AIRPORT_TOOLTIP),
|
||||
NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_AIRPORT_SPRITE), SetFill(1, 0),
|
||||
NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 0), SetPIP(2, 0, 2),
|
||||
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_AIRPORT_CLASS_LABEL, STR_NULL), SetFill(1, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_AP_CLASS_DROPDOWN), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_STATION_BUILD_AIRPORT_TOOLTIP),
|
||||
NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_AIRPORT_SPRITE), SetFill(1, 0),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_AP_AIRPORT_LIST), SetFill(1, 0), SetMatrixDataTip(1, 5, STR_STATION_BUILD_AIRPORT_TOOLTIP), SetScrollbar(WID_AP_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_AP_SCROLLBAR),
|
||||
EndContainer(),
|
||||
/* Airport parameters and info. */
|
||||
NWidget(WWT_PANEL, COLOUR_DARK_GREEN), SetFill(1, 0), SetPIP(2, 0, 2),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_AP_AIRPORT_LIST), SetFill(1, 0), SetMatrixDataTip(1, 5, STR_STATION_BUILD_AIRPORT_TOOLTIP), SetScrollbar(WID_AP_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_AP_SCROLLBAR),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_DECREASE), SetSizingType(NWST_STEP), SetMinimalSize(12, 0), SetDataTip(AWV_DECREASE, STR_NULL),
|
||||
NWidget(WWT_LABEL, COLOUR_GREY, WID_AP_LAYOUT_NUM), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_NULL),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_INCREASE), SetSizingType(NWST_STEP), SetMinimalSize(12, 0), SetDataTip(AWV_INCREASE, STR_NULL),
|
||||
EndContainer(),
|
||||
NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_EXTRA_TEXT), SetFill(1, 0), SetMinimalSize(150, 0),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_DECREASE), SetMinimalSize(12, 0), SetDataTip(AWV_DECREASE, STR_NULL),
|
||||
NWidget(WWT_LABEL, COLOUR_GREY, WID_AP_LAYOUT_NUM), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_BLACK_STRING, STR_NULL),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_AP_LAYOUT_INCREASE), SetMinimalSize(12, 0), SetDataTip(AWV_INCREASE, STR_NULL),
|
||||
EndContainer(),
|
||||
/* Bottom panel. */
|
||||
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_AP_BOTTOMPANEL), SetPIP(2, 2, 2),
|
||||
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetFill(1, 0),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DONTHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
|
||||
SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DOHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
|
||||
SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
|
||||
NWidget(WWT_EMPTY, COLOUR_DARK_GREEN, WID_AP_EXTRA_TEXT), SetFill(1, 0), SetMinimalSize(150, 0),
|
||||
EndContainer(),
|
||||
/* Bottom panel. */
|
||||
NWidget(WWT_PANEL, COLOUR_DARK_GREEN, WID_AP_BOTTOMPANEL), SetPIP(2, 2, 2),
|
||||
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_STATION_BUILD_COVERAGE_AREA_TITLE, STR_NULL), SetFill(1, 0),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DONTHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
|
||||
SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AP_BTN_DOHILIGHT), SetMinimalSize(60, 12), SetFill(1, 0),
|
||||
SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 10), SetResize(0, 1), SetFill(1, 0),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(14, 0), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 10), SetResize(0, 1), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "window_gui.h"
|
||||
#include "engine_gui.h"
|
||||
#include "settings_func.h"
|
||||
#include "settings_gui.h"
|
||||
#include "core/geometry_func.hpp"
|
||||
#include "rail_gui.h"
|
||||
#include "widgets/dropdown_func.h"
|
||||
@@ -243,7 +242,7 @@ public:
|
||||
switch (widget) {
|
||||
case WID_RV_SORT_ASCENDING_DESCENDING: {
|
||||
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
|
||||
d.width += padding.width + Window::SortButtonWidth();
|
||||
d.width += padding.width + Window::SortButtonWidth() * 2; // Doubled since the string is centred and it also looks better.
|
||||
d.height += padding.height;
|
||||
*size = maxdim(*size, d);
|
||||
break;
|
||||
@@ -252,7 +251,7 @@ public:
|
||||
case WID_RV_LEFT_MATRIX:
|
||||
case WID_RV_RIGHT_MATRIX:
|
||||
resize->height = GetEngineListHeight((VehicleType)this->window_number);
|
||||
size->height = (widget == WID_RV_LEFT_MATRIX ? 3 : 4) * resize->height;
|
||||
size->height = (this->window_number <= VEH_ROAD ? 8 : 4) * resize->height;
|
||||
break;
|
||||
|
||||
case WID_RV_LEFT_DETAILS:
|
||||
@@ -299,7 +298,6 @@ public:
|
||||
d = maxdim(d, GetStringBoundingBox(rti->strings.replace_text));
|
||||
}
|
||||
d.width += padding.width;
|
||||
d.width += SETTING_BUTTON_HEIGHT;
|
||||
d.height += padding.height;
|
||||
*size = maxdim(*size, d);
|
||||
break;
|
||||
@@ -311,7 +309,6 @@ public:
|
||||
d = maxdim(d, GetStringBoundingBox(_start_replace_dropdown[i]));
|
||||
}
|
||||
d.width += padding.width;
|
||||
d.width += SETTING_BUTTON_HEIGHT;
|
||||
d.height += padding.height;
|
||||
*size = maxdim(*size, d);
|
||||
break;
|
||||
@@ -379,7 +376,7 @@ public:
|
||||
str = STR_REPLACE_NOT_REPLACING_VEHICLE_SELECTED;
|
||||
}
|
||||
|
||||
DrawString(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, Center(r.top + WD_FRAMERECT_TOP, r.bottom - r.top - WD_FRAMERECT_TOP), str, TC_BLACK, SA_HOR_CENTER);
|
||||
DrawString(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, r.top + WD_FRAMERECT_TOP, str, TC_BLACK, SA_HOR_CENTER);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -604,28 +601,32 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
|
||||
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_RAILTYPE_DROPDOWN), SetMinimalSize(136, 12), SetDataTip(0x0, STR_REPLACE_HELP_RAILTYPE), SetFill(1, 0), SetResize(1, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_TRAIN_ENGINEWAGON_DROPDOWN), SetDataTip(STR_BLACK_STRING, STR_REPLACE_ENGINE_WAGON_SELECT_HELP),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_WAGONREMOVE_TOGGLE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_REMOVE_WAGON, STR_REPLACE_REMOVE_WAGON_HELP), SetFill(1, 0), SetResize(1, 0),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_LEFT_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_LEFT_SCROLLBAR),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetFill(1, 1),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 1), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_RIGHT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_RIGHT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_RIGHT_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), SetFill(1, 1), EndContainer(),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_LEFT_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_LEFT_SCROLLBAR),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_RIGHT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_RIGHT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_RIGHT_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_TRAIN_WAGONREMOVE_TOGGLE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_REMOVE_WAGON, STR_REPLACE_REMOVE_WAGON_HELP), SetFill(1, 0), SetResize(1, 0),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(NWID_PUSHBUTTON_DROPDOWN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0),
|
||||
@@ -659,26 +660,28 @@ static const NWidgetPart _nested_replace_vehicle_widgets[] = {
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_LEFT_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_LEFT_SCROLLBAR),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), EndContainer(),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_RV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 1), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_RIGHT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_RIGHT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_RIGHT_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_RV_SHOW_HIDDEN_ENGINES), SetDataTip(STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN, STR_SHOW_HIDDEN_ENGINES_VEHICLE_TRAIN_TOOLTIP),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY), SetResize(1, 0), SetFill(1, 1), EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_LEFT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_LEFT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_LEFT_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_LEFT_SCROLLBAR),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_RV_RIGHT_MATRIX), SetMinimalSize(216, 0), SetFill(1, 1), SetMatrixDataTip(1, 0, STR_REPLACE_HELP_RIGHT_ARRAY), SetResize(1, 1), SetScrollbar(WID_RV_RIGHT_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(NWID_PUSHBUTTON_DROPDOWN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0), EndContainer(),
|
||||
|
||||
@@ -1,386 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 16bpp_anim.cpp Implementation of the optimized 16 bpp blitter with animation support, currently broken. */
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../video/video_driver.hpp"
|
||||
#include "../zoom_func.h"
|
||||
#include "16bpp_anim.hpp"
|
||||
|
||||
#include "../table/sprites.h"
|
||||
|
||||
/** Instantiation of the 16bpp with animation blitter factory. */
|
||||
static FBlitter_16bppAnim iFBlitter_16bppAnim;
|
||||
|
||||
template <BlitterMode mode>
|
||||
void Blitter_16bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
|
||||
{
|
||||
const Pixel *src, *src_line;
|
||||
Colour16 *dst, *dst_line;
|
||||
Anim *anim, *anim_line;
|
||||
|
||||
/* Find where to start reading in the source sprite */
|
||||
src_line = (const Pixel *)bp->sprite + (bp->skip_top * bp->sprite_width + bp->skip_left) * ScaleByZoom(1, zoom);
|
||||
dst_line = (Colour16 *)bp->dst + bp->top * bp->pitch + bp->left;
|
||||
anim_line = this->anim_buf + ((Colour16 *)bp->dst - (Colour16 *)_screen.dst_ptr) + bp->top * this->anim_buf_width + bp->left;
|
||||
|
||||
for (int y = 0; y < bp->height; y++) {
|
||||
dst = dst_line;
|
||||
dst_line += bp->pitch;
|
||||
|
||||
src = src_line;
|
||||
src_line += bp->sprite_width * ScaleByZoom(1, zoom);
|
||||
|
||||
anim = anim_line;
|
||||
anim_line += this->anim_buf_width;
|
||||
|
||||
for (int x = 0; x < bp->width; x++) {
|
||||
switch (mode) {
|
||||
case BM_COLOUR_REMAP:
|
||||
/* In case the m-channel is zero, do not remap this pixel in any way */
|
||||
anim->m = 0;
|
||||
anim->v = 0;
|
||||
if (src->m == 0) {
|
||||
if (src->a != 0) *dst = ComposeColourPA(src->c, src->a, *dst);
|
||||
} else {
|
||||
uint8 r = bp->remap[src->m];
|
||||
if (r != 0) {
|
||||
*dst = ComposeColourPA(AdjustBrightness(LookupColourInPalette(r), src->v), src->a, *dst);
|
||||
if (src->a == 15 && r >= PALETTE_ANIM_START) {
|
||||
anim->m = r - PALETTE_ANIM_START + 1;
|
||||
anim->v = src->v >> 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_TRANSPARENT:
|
||||
/* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
|
||||
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
|
||||
* we produce a result the newgrf maker didn't expect ;) */
|
||||
|
||||
/* Make the current colour a bit more black, so it looks like this image is transparent */
|
||||
if (src->a != 0) *dst = MakeTransparent(*dst, 192);
|
||||
anim->m = 0;
|
||||
anim->v = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (src->a == 15 && src->m >= PALETTE_ANIM_START) {
|
||||
*dst = AdjustBrightness(LookupColourInPalette(src->m), src->v);
|
||||
anim->m = src->m - PALETTE_ANIM_START + 1;
|
||||
anim->v = src->v >> 1;
|
||||
} else {
|
||||
if (src->a != 0) {
|
||||
if (src->m >= PALETTE_ANIM_START) {
|
||||
*dst = ComposeColourPANoCheck(AdjustBrightness(LookupColourInPalette(src->m), src->v), src->a, *dst);
|
||||
} else {
|
||||
*dst = ComposeColourPA(src->c, src->a, *dst);
|
||||
}
|
||||
}
|
||||
anim->m = 0;
|
||||
anim->v = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
dst++;
|
||||
src += ScaleByZoom(1, zoom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_16bppAnim::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
|
||||
{
|
||||
if (_screen_disable_anim) {
|
||||
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent Draw() */
|
||||
Blitter_16bppOptimized::Draw(bp, mode, zoom);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
default: NOT_REACHED();
|
||||
case BM_NORMAL: Draw<BM_NORMAL> (bp, zoom); return;
|
||||
case BM_COLOUR_REMAP: Draw<BM_COLOUR_REMAP>(bp, zoom); return;
|
||||
case BM_TRANSPARENT: Draw<BM_TRANSPARENT> (bp, zoom); return;
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_16bppAnim::DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
|
||||
{
|
||||
if (_screen_disable_anim) {
|
||||
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawColourMappingRect() */
|
||||
Blitter_16bppOptimized::DrawColourMappingRect(dst, width, height, pal);
|
||||
return;
|
||||
}
|
||||
|
||||
Colour16 *udst = (Colour16 *)dst;
|
||||
Anim *anim;
|
||||
|
||||
anim = this->anim_buf + ((Colour16 *)dst - (Colour16 *)_screen.dst_ptr);
|
||||
|
||||
if (pal == PALETTE_TO_TRANSPARENT) {
|
||||
do {
|
||||
for (int i = 0; i != width; i++) {
|
||||
*udst = MakeTransparent(*udst, 154);
|
||||
anim->m = 0;
|
||||
anim->v = 0;
|
||||
udst++;
|
||||
anim++;
|
||||
}
|
||||
udst = udst - width + _screen.pitch;
|
||||
anim = anim - width + this->anim_buf_width;
|
||||
} while (--height);
|
||||
return;
|
||||
}
|
||||
if (pal == PALETTE_NEWSPAPER) {
|
||||
do {
|
||||
for (int i = 0; i != width; i++) {
|
||||
*udst = MakeGrey(*udst);
|
||||
anim->m = 0;
|
||||
anim->v = 0;
|
||||
udst++;
|
||||
anim++;
|
||||
}
|
||||
udst = udst - width + _screen.pitch;
|
||||
anim = anim - width + this->anim_buf_width;
|
||||
} while (--height);
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG(misc, 0, "16bpp blitter doesn't know how to draw this colour table ('%d')", pal);
|
||||
}
|
||||
|
||||
void Blitter_16bppAnim::SetPixel(void *video, int x, int y, uint8 colour)
|
||||
{
|
||||
*((Colour16 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
|
||||
|
||||
/* Set the colour in the anim-buffer too, if we are rendering to the screen */
|
||||
if (_screen_disable_anim) return;
|
||||
Anim *anim = this->anim_buf + ((Colour16 *)video - (Colour16 *)_screen.dst_ptr) + x + y * this->anim_buf_width;
|
||||
if (colour >= PALETTE_ANIM_START) {
|
||||
anim->m = colour - PALETTE_ANIM_START + 1;
|
||||
anim->v = DEFAULT_BRIGHTNESS >> 1;
|
||||
} else {
|
||||
anim->m = 0;
|
||||
anim->v = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_16bppAnim::DrawRect(void *video, int width, int height, uint8 colour)
|
||||
{
|
||||
if (_screen_disable_anim) {
|
||||
/* This means our output is not to the screen, so we can't be doing any animation stuff, so use our parent DrawRect() */
|
||||
Blitter_16bppOptimized::DrawRect(video, width, height, colour);
|
||||
return;
|
||||
}
|
||||
|
||||
Colour16 colour16 = LookupColourInPalette(colour);
|
||||
Anim *anim_line = this->anim_buf + ((Colour16 *)video - (Colour16 *)_screen.dst_ptr);
|
||||
|
||||
do {
|
||||
Colour16 *dst = (Colour16 *)video;
|
||||
Anim *anim = anim_line;
|
||||
|
||||
for (int i = width; i > 0; i--) {
|
||||
*dst = colour16;
|
||||
/* Set the colour in the anim-buffer too */
|
||||
if (colour >= PALETTE_ANIM_START) {
|
||||
anim->m = colour - PALETTE_ANIM_START + 1;
|
||||
anim->v = DEFAULT_BRIGHTNESS >> 1;
|
||||
} else {
|
||||
anim->m = 0;
|
||||
anim->v = 0;
|
||||
}
|
||||
dst++;
|
||||
anim++;
|
||||
}
|
||||
video = (Colour16 *)video + _screen.pitch;
|
||||
anim_line += this->anim_buf_width;
|
||||
} while (--height);
|
||||
}
|
||||
|
||||
void Blitter_16bppAnim::CopyFromBuffer(void *video, const void *src, int width, int height)
|
||||
{
|
||||
assert(!_screen_disable_anim);
|
||||
assert(video >= _screen.dst_ptr && video <= (Colour16 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
|
||||
Colour16 *dst = (Colour16 *)video;
|
||||
const uint8 *usrc = (const uint8 *)src;
|
||||
Anim *anim_line = this->anim_buf + ((Colour16 *)video - (Colour16 *)_screen.dst_ptr);
|
||||
|
||||
for (; height > 0; height--) {
|
||||
/* We need to keep those for palette animation. */
|
||||
Colour16 *dst_pal = dst;
|
||||
Anim *anim_pal = anim_line;
|
||||
|
||||
memcpy(dst, usrc, width * sizeof(Colour16));
|
||||
usrc += width * sizeof(Colour16);
|
||||
dst += _screen.pitch;
|
||||
/* Copy back the anim-buffer */
|
||||
memcpy(anim_line, usrc, width * sizeof(Anim));
|
||||
usrc += width * sizeof(Anim);
|
||||
anim_line += this->anim_buf_width;
|
||||
|
||||
/* Okay, it is *very* likely that the image we stored is using
|
||||
* the wrong palette animated colours. There are two things we
|
||||
* can do to fix this. The first is simply reviewing the whole
|
||||
* screen after we copied the buffer, i.e. run PaletteAnimate,
|
||||
* however that forces a full screen redraw which is expensive
|
||||
* for just the cursor. This just copies the implementation of
|
||||
* palette animation, much cheaper though slightly nastier. */
|
||||
for (int i = 0; i < width; i++) {
|
||||
uint8 colour = anim_pal->m;
|
||||
if (colour) {
|
||||
/* Update this pixel */
|
||||
*dst_pal = AdjustBrightness(LookupColourInPalette(colour + PALETTE_ANIM_START - 1), anim_pal->v << 1);
|
||||
}
|
||||
dst_pal++;
|
||||
anim_pal++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_16bppAnim::CopyToBuffer(const void *video, void *dst, int width, int height)
|
||||
{
|
||||
assert(!_screen_disable_anim);
|
||||
assert(video >= _screen.dst_ptr && video <= (Colour16 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
|
||||
uint8 *udst = (uint8 *)dst;
|
||||
const Colour16 *src = (const Colour16 *)video;
|
||||
const Anim *anim_line = this->anim_buf + ((const Colour16 *)video - (Colour16 *)_screen.dst_ptr);
|
||||
|
||||
for (; height > 0; height--) {
|
||||
memcpy(udst, src, width * sizeof(Colour16));
|
||||
src += _screen.pitch;
|
||||
udst += width * sizeof(Colour16);
|
||||
/* Copy the anim-buffer */
|
||||
memcpy(udst, anim_line, width * sizeof(Anim));
|
||||
udst += width * sizeof(Anim);
|
||||
anim_line += this->anim_buf_width;
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_16bppAnim::ScrollBuffer(void *video, int &left_ref, int &top_ref, int &width_ref, int &height_ref, int scroll_x, int scroll_y)
|
||||
{
|
||||
assert(!_screen_disable_anim);
|
||||
assert(video >= _screen.dst_ptr && video <= (Colour16 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
|
||||
const Anim *src;
|
||||
Anim *dst;
|
||||
int left = left_ref, top = top_ref, width = width_ref, height = height_ref;
|
||||
|
||||
/* We need to scroll the anim-buffer too */
|
||||
if (scroll_y > 0) {
|
||||
/* Calculate pointers */
|
||||
dst = this->anim_buf + left + (top + height - 1) * this->anim_buf_width;
|
||||
src = dst - scroll_y * this->anim_buf_width;
|
||||
|
||||
/* Decrease height and increase top */
|
||||
top += scroll_y;
|
||||
height -= scroll_y;
|
||||
assert(height > 0);
|
||||
|
||||
/* Adjust left & width */
|
||||
if (scroll_x >= 0) {
|
||||
dst += scroll_x;
|
||||
left += scroll_x;
|
||||
width -= scroll_x;
|
||||
} else {
|
||||
src -= scroll_x;
|
||||
width += scroll_x;
|
||||
}
|
||||
|
||||
for (int h = height; h > 0; h--) {
|
||||
memcpy(dst, src, width * sizeof(Anim));
|
||||
src -= this->anim_buf_width;
|
||||
dst -= this->anim_buf_width;
|
||||
}
|
||||
} else {
|
||||
/* Calculate pointers */
|
||||
dst = this->anim_buf + left + top * this->anim_buf_width;
|
||||
src = dst - scroll_y * this->anim_buf_width;
|
||||
|
||||
/* Decrease height. (scroll_y is <=0). */
|
||||
height += scroll_y;
|
||||
assert(height > 0);
|
||||
|
||||
/* Adjust left & width */
|
||||
if (scroll_x >= 0) {
|
||||
dst += scroll_x;
|
||||
left += scroll_x;
|
||||
width -= scroll_x;
|
||||
} else {
|
||||
src -= scroll_x;
|
||||
width += scroll_x;
|
||||
}
|
||||
|
||||
/* the y-displacement may be 0 therefore we have to use memmove,
|
||||
* because source and destination may overlap */
|
||||
for (int h = height; h > 0; h--) {
|
||||
memmove(dst, src, width * sizeof(Anim));
|
||||
src += _screen.pitch;
|
||||
dst += _screen.pitch;
|
||||
}
|
||||
}
|
||||
|
||||
Blitter_16bppOptimized::ScrollBuffer(video, left_ref, top_ref, width_ref, height_ref, scroll_x, scroll_y);
|
||||
}
|
||||
|
||||
int Blitter_16bppAnim::BufferSize(int width, int height)
|
||||
{
|
||||
return width * height * (sizeof(Anim) + sizeof(Colour16));
|
||||
}
|
||||
|
||||
void Blitter_16bppAnim::PaletteAnimate(const Palette &palette)
|
||||
{
|
||||
assert(!_screen_disable_anim);
|
||||
|
||||
/* If first_dirty is 0, it is for 8bpp indication to send the new
|
||||
* palette. However, only the animation colours might possibly change.
|
||||
* Especially when going between toyland and non-toyland. */
|
||||
assert(palette.first_dirty == PALETTE_ANIM_START || palette.first_dirty == 0);
|
||||
|
||||
for (int i = 0; i < 256; i++) {
|
||||
this->palette[i] = To16(palette.palette[i]);
|
||||
}
|
||||
|
||||
const Anim *anim = this->anim_buf;
|
||||
Colour16 *dst = (Colour16 *)_screen.dst_ptr;
|
||||
|
||||
/* Let's walk the anim buffer and try to find the pixels */
|
||||
for (int y = this->anim_buf_height; y != 0 ; y--) {
|
||||
for (int x = this->anim_buf_width; x != 0 ; x--) {
|
||||
uint8 colour = anim->m;
|
||||
if (colour) {
|
||||
/* Update this pixel */
|
||||
*dst = AdjustBrightness(LookupColourInPalette(colour + PALETTE_ANIM_START - 1), anim->v << 1);
|
||||
}
|
||||
dst++;
|
||||
anim++;
|
||||
}
|
||||
dst += _screen.pitch - this->anim_buf_width;
|
||||
}
|
||||
|
||||
/* Make sure the backend redraws the whole screen */
|
||||
VideoDriver::GetInstance()->MakeDirty(0, 0, _screen.width, _screen.height);
|
||||
}
|
||||
|
||||
Blitter::PaletteAnimation Blitter_16bppAnim::UsePaletteAnimation()
|
||||
{
|
||||
return Blitter::PALETTE_ANIMATION_BLITTER;
|
||||
}
|
||||
|
||||
void Blitter_16bppAnim::PostResize()
|
||||
{
|
||||
if (_screen.width != this->anim_buf_width || _screen.height != this->anim_buf_height) {
|
||||
/* The size of the screen changed; we can assume we can wipe all data from our buffer */
|
||||
free(this->anim_buf);
|
||||
this->anim_buf = CallocT<Anim>(_screen.width * _screen.height);
|
||||
this->anim_buf_width = _screen.width;
|
||||
this->anim_buf_height = _screen.height;
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 16bpp_anim.hpp A 16 bpp blitter with animation support. */
|
||||
|
||||
#ifndef BLITTER_16BPP_ANIM_HPP
|
||||
#define BLITTER_16BPP_ANIM_HPP
|
||||
|
||||
#include "16bpp_simple.hpp"
|
||||
|
||||
class Blitter_16bppOptimized: public Blitter_16bppSimple {
|
||||
// TODO: implement that
|
||||
};
|
||||
|
||||
/** The optimised 16 bpp blitter with palette animation. */
|
||||
class Blitter_16bppAnim : public Blitter_16bppOptimized {
|
||||
protected:
|
||||
// PALETTE_ANIM_SIZE is less than 32, so we'll use 5 bits for color index, and 3 bits for brightness, losing 1 bit compared to struct Pixel
|
||||
struct Anim {
|
||||
unsigned m : 5 __attribute__((packed)); ///< Color index channel, packed 5 bits, 0 = no animation, 1 = PALETTE_ANIM_START
|
||||
unsigned v : 3 __attribute__((packed)); ///< Brightness-channel, packed 3 bits
|
||||
};
|
||||
|
||||
Anim *anim_buf; ///< In this buffer we keep track of the 8bpp indexes so we can do palette animation
|
||||
int anim_buf_width; ///< The width of the animation buffer.
|
||||
int anim_buf_height; ///< The height of the animation buffer.
|
||||
Colour16 palette[256]; ///< The current palette.
|
||||
|
||||
public:
|
||||
Blitter_16bppAnim() :
|
||||
anim_buf(NULL),
|
||||
anim_buf_width(0),
|
||||
anim_buf_height(0)
|
||||
{}
|
||||
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
|
||||
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
|
||||
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
|
||||
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
|
||||
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
|
||||
/* virtual */ void ScrollBuffer(void *video, int &left_ref, int &top_ref, int &width_ref, int &height_ref, int scroll_x, int scroll_y);
|
||||
/* virtual */ int BufferSize(int width, int height);
|
||||
/* virtual */ void PaletteAnimate(const Palette &palette);
|
||||
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
|
||||
/* virtual */ int GetBytesPerPixel() { return 3; }
|
||||
|
||||
/* virtual */ const char *GetName() { return "16bpp-anim"; }
|
||||
/* virtual */ void PostResize();
|
||||
|
||||
/**
|
||||
* Look up the colour in the current palette.
|
||||
*/
|
||||
inline Colour16 LookupColourInPalette(uint8 index)
|
||||
{
|
||||
return this->palette[index];
|
||||
}
|
||||
|
||||
template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
|
||||
};
|
||||
|
||||
/** Factory for the 16bpp blitter with animation. */
|
||||
class FBlitter_16bppAnim : public BlitterFactory {
|
||||
public:
|
||||
FBlitter_16bppAnim() : BlitterFactory("16bpp-anim-broken", "16bpp Animation Blitter, currently broken (palette animation)") {}
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_16bppAnim(); }
|
||||
};
|
||||
|
||||
#endif /* BLITTER_16BPP_ANIM_HPP */
|
||||
@@ -1,156 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 16bpp_base.cpp Implementation of base for 16 bpp blitters. */
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "16bpp_base.hpp"
|
||||
#include "common.hpp"
|
||||
|
||||
void *Blitter_16bppBase::MoveTo(void *video, int x, int y)
|
||||
{
|
||||
return (uint16 *)video + x + y * _screen.pitch;
|
||||
}
|
||||
|
||||
void Blitter_16bppBase::SetPixel(void *video, int x, int y, uint8 colour)
|
||||
{
|
||||
*((Colour16 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
|
||||
}
|
||||
|
||||
void Blitter_16bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash)
|
||||
{
|
||||
const Colour16 c = LookupColourInPalette(colour);
|
||||
this->DrawLineGeneric(x, y, x2, y2, screen_width, screen_height, width, dash, [=](int x, int y) {
|
||||
*((Colour16 *)video + x + y * _screen.pitch) = c;
|
||||
});
|
||||
}
|
||||
|
||||
void Blitter_16bppBase::DrawRect(void *video, int width, int height, uint8 colour)
|
||||
{
|
||||
Colour16 target = LookupColourInPalette(colour);
|
||||
|
||||
do {
|
||||
Colour16 *dst = (Colour16 *)video;
|
||||
for (int i = width; i > 0; i--) {
|
||||
*dst = target;
|
||||
dst++;
|
||||
}
|
||||
video = (uint16 *)video + _screen.pitch;
|
||||
} while (--height);
|
||||
}
|
||||
|
||||
void Blitter_16bppBase::CopyFromBuffer(void *video, const void *src, int width, int height)
|
||||
{
|
||||
uint16 *dst = (uint16 *)video;
|
||||
const uint16 *usrc = (const uint16 *)src;
|
||||
|
||||
for (; height > 0; height--) {
|
||||
memcpy(dst, usrc, width * sizeof(uint16));
|
||||
usrc += width;
|
||||
dst += _screen.pitch;
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_16bppBase::CopyToBuffer(const void *video, void *dst, int width, int height)
|
||||
{
|
||||
uint16 *udst = (uint16 *)dst;
|
||||
const uint16 *src = (const uint16 *)video;
|
||||
|
||||
for (; height > 0; height--) {
|
||||
memcpy(udst, src, width * sizeof(uint16));
|
||||
src += _screen.pitch;
|
||||
udst += width;
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_16bppBase::CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch)
|
||||
{
|
||||
uint16 *udst = (uint16 *)dst;
|
||||
const uint16 *src = (const uint16 *)video;
|
||||
|
||||
for (; height > 0; height--) {
|
||||
memcpy(udst, src, width * sizeof(uint16));
|
||||
src += _screen.pitch;
|
||||
udst += dst_pitch;
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_16bppBase::ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y)
|
||||
{
|
||||
const Colour16 *src;
|
||||
Colour16 *dst;
|
||||
|
||||
if (scroll_y > 0) {
|
||||
/* Calculate pointers */
|
||||
dst = (Colour16 *)video + left + (top + height - 1) * _screen.pitch;
|
||||
src = dst - scroll_y * _screen.pitch;
|
||||
|
||||
/* Decrease height and increase top */
|
||||
top += scroll_y;
|
||||
height -= scroll_y;
|
||||
assert(height > 0);
|
||||
|
||||
/* Adjust left & width */
|
||||
if (scroll_x >= 0) {
|
||||
dst += scroll_x;
|
||||
left += scroll_x;
|
||||
width -= scroll_x;
|
||||
} else {
|
||||
src -= scroll_x;
|
||||
width += scroll_x;
|
||||
}
|
||||
|
||||
for (int h = height; h > 0; h--) {
|
||||
memcpy(dst, src, width * sizeof(Colour16));
|
||||
src -= _screen.pitch;
|
||||
dst -= _screen.pitch;
|
||||
}
|
||||
} else {
|
||||
/* Calculate pointers */
|
||||
dst = (Colour16 *)video + left + top * _screen.pitch;
|
||||
src = dst - scroll_y * _screen.pitch;
|
||||
|
||||
/* Decrease height. (scroll_y is <=0). */
|
||||
height += scroll_y;
|
||||
assert(height > 0);
|
||||
|
||||
/* Adjust left & width */
|
||||
if (scroll_x >= 0) {
|
||||
dst += scroll_x;
|
||||
left += scroll_x;
|
||||
width -= scroll_x;
|
||||
} else {
|
||||
src -= scroll_x;
|
||||
width += scroll_x;
|
||||
}
|
||||
|
||||
/* the y-displacement may be 0 therefore we have to use memmove,
|
||||
* because source and destination may overlap */
|
||||
for (int h = height; h > 0; h--) {
|
||||
memmove(dst, src, width * sizeof(Colour16));
|
||||
src += _screen.pitch;
|
||||
dst += _screen.pitch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int Blitter_16bppBase::BufferSize(int width, int height)
|
||||
{
|
||||
return width * height * sizeof(Colour16);
|
||||
}
|
||||
|
||||
void Blitter_16bppBase::PaletteAnimate(const Palette &palette)
|
||||
{
|
||||
/* By default, 16bpp doesn't have palette animation */
|
||||
}
|
||||
|
||||
Blitter::PaletteAnimation Blitter_16bppBase::UsePaletteAnimation()
|
||||
{
|
||||
return Blitter::PALETTE_ANIMATION_NONE;
|
||||
}
|
||||
@@ -1,226 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 16bpp_base.hpp Base for all 16 bits blitters. */
|
||||
|
||||
#ifndef BLITTER_16BPP_BASE_HPP
|
||||
#define BLITTER_16BPP_BASE_HPP
|
||||
|
||||
#include "base.hpp"
|
||||
#include "../core/bitmath_func.hpp"
|
||||
#include "../core/math_func.hpp"
|
||||
#include "../gfx_func.h"
|
||||
|
||||
/** Base for all 16bpp blitters. */
|
||||
class Blitter_16bppBase : public Blitter {
|
||||
public:
|
||||
|
||||
// TODO: GCC-specific attributes
|
||||
struct Colour16 {
|
||||
unsigned b : 5 __attribute__((packed)); ///< Blue-channel, packed 5 bits
|
||||
unsigned g : 6 __attribute__((packed)); ///< Green-channel, packed 6 bits
|
||||
unsigned r : 5 __attribute__((packed)); ///< Red-channel, packed 5 bits
|
||||
Colour16(uint8 r = 0, uint8 g = 0, uint8 b = 0):
|
||||
b(b), g(g), r(r)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
struct Pixel {
|
||||
Colour16 c;
|
||||
unsigned a : 4 __attribute__((packed)); ///< Alpha-channel, packed 4 bits
|
||||
unsigned v : 4 __attribute__((packed)); ///< Brightness-channel, packed 4 bits
|
||||
unsigned m : 8 __attribute__((packed)); ///< Remap-channel, cannot pack it, because it's palette lookup index, so it must be in range 0-255
|
||||
};
|
||||
|
||||
/* virtual */ uint8 GetScreenDepth() { return 16; }
|
||||
/* virtual */ void *MoveTo(void *video, int x, int y);
|
||||
/* virtual */ void SetPixel(void *video, int x, int y, uint8 colour);
|
||||
/* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash);
|
||||
/* virtual */ void DrawRect(void *video, int width, int height, uint8 colour);
|
||||
/* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height);
|
||||
/* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height);
|
||||
/* virtual */ void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch);
|
||||
/* virtual */ void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y);
|
||||
/* virtual */ int BufferSize(int width, int height);
|
||||
/* virtual */ void PaletteAnimate(const Palette &palette);
|
||||
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
|
||||
/* virtual */ int GetBytesPerPixel() { return 2; }
|
||||
|
||||
|
||||
/**
|
||||
* Convert from rgb values to screen native 16bpp colour
|
||||
*/
|
||||
static inline Colour16 To16(uint8 r, uint8 g, uint8 b)
|
||||
{
|
||||
return Colour16(r >> 3, g >> 2, b >> 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert from 32bpp colour to screen native 16bpp colour
|
||||
*/
|
||||
static inline Colour16 To16(Colour c)
|
||||
{
|
||||
return To16(c.r, c.g, c.b);
|
||||
}
|
||||
|
||||
/**
|
||||
* Look up the colour in the current palette.
|
||||
*/
|
||||
static inline Colour LookupColourInPalette32(uint index)
|
||||
{
|
||||
return _cur_palette.palette[index];
|
||||
}
|
||||
|
||||
/**
|
||||
* Look up the colour in the current palette.
|
||||
*/
|
||||
static inline Colour16 LookupColourInPalette(uint index)
|
||||
{
|
||||
return To16(LookupColourInPalette32(index));
|
||||
}
|
||||
|
||||
/**
|
||||
* Compose a colour based on RGBA values and the current pixel value.
|
||||
* @param r range is from 0 to 31.
|
||||
* @param g range is from 0 to 63.
|
||||
* @param b range is from 0 to 31.
|
||||
* @param a range is from 0 to 15.
|
||||
*/
|
||||
static inline Colour16 ComposeColourRGBANoCheck(uint8 r, uint8 g, uint8 b, uint8 a, Colour16 current)
|
||||
{
|
||||
/* The 16 is wrong, it should be 15, but 16 is much faster... */
|
||||
return Colour16 ( ((int)(r - current.r) * a) / 16 + current.r,
|
||||
((int)(g - current.g) * a) / 16 + current.g,
|
||||
((int)(b - current.b) * a) / 16 + current.b );
|
||||
}
|
||||
|
||||
/**
|
||||
* Compose a colour based on RGBA values and the current pixel value.
|
||||
* Handles fully transparent and solid pixels in a special (faster) way.
|
||||
* @param r range is from 0 to 31.
|
||||
* @param g range is from 0 to 63.
|
||||
* @param b range is from 0 to 31.
|
||||
* @param a range is from 0 to 15.
|
||||
*/
|
||||
static inline Colour16 ComposeColourRGBA(uint8 r, uint8 g, uint8 b, uint8 a, Colour16 current)
|
||||
{
|
||||
if (a == 0) return current;
|
||||
if (a >= 15) return Colour16(r, g, b);
|
||||
|
||||
return ComposeColourRGBANoCheck(r, g, b, a, current);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compose a colour based on Pixel value, alpha value, and the current pixel value.
|
||||
* @param a range is from 0 to 16.
|
||||
*/
|
||||
static inline Colour16 ComposeColourPANoCheck(Colour16 colour, uint8 a, Colour16 current)
|
||||
{
|
||||
return ComposeColourRGBANoCheck(colour.r, colour.g, colour.b, a, current);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compose a colour based on Pixel value, alpha value, and the current pixel value.
|
||||
* Handles fully transparent and solid pixels in a special (faster) way.
|
||||
* @param a range is from 0 to 15.
|
||||
*/
|
||||
static inline Colour16 ComposeColourPA(Colour16 colour, uint8 a, Colour16 current)
|
||||
{
|
||||
if (a == 0) return current;
|
||||
if (a >= 15) return colour;
|
||||
|
||||
return ComposeColourPANoCheck(colour, a, current);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a pixel looks like it is transparent.
|
||||
* @param colour the colour already on the screen.
|
||||
* @param nom the amount of transparency, nominator, makes colour lighter.
|
||||
* @param denom denominator, makes colour darker.
|
||||
* @return the new colour for the screen.
|
||||
*/
|
||||
static inline Colour16 MakeTransparent(Colour16 colour, uint nom, uint denom = 256)
|
||||
{
|
||||
uint r = colour.r;
|
||||
uint g = colour.g;
|
||||
uint b = colour.b;
|
||||
|
||||
return Colour16( r * nom / denom,
|
||||
g * nom / denom,
|
||||
b * nom / denom );
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a colour grey - based.
|
||||
* @param colour the colour to make grey.
|
||||
* @return the new colour, now grey.
|
||||
*/
|
||||
static inline Colour16 MakeGrey(Colour16 colour)
|
||||
{
|
||||
uint8 r = colour.r;
|
||||
uint8 g = colour.g;
|
||||
uint8 b = colour.b;
|
||||
|
||||
/* To avoid doubles and stuff, multiple it with a total of 65536 (16bits), then
|
||||
* divide by it to normalize the value to a byte again. See heightmap.cpp for
|
||||
* information about the formula. */
|
||||
uint grey = (((r << 3) * 19595) + ((g << 2) * 38470) + ((b << 3) * 7471)) / 65536;
|
||||
|
||||
return To16(grey, grey, grey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a colour dark grey, for specialized 32bpp remapping.
|
||||
* @param r red component
|
||||
* @param g green component
|
||||
* @param b blue component
|
||||
* @return the brightness value of the new colour, now dark grey.
|
||||
*/
|
||||
static inline uint8 MakeDark(Colour16 colour)
|
||||
{
|
||||
uint8 r = colour.r;
|
||||
uint8 g = colour.g;
|
||||
uint8 b = colour.b;
|
||||
|
||||
/* Magic-numbers are ~66% of those used in MakeGrey() */
|
||||
return (((r << 3) * 13063) + ((g << 2) * 25647) + ((b << 3) * 4981)) / 65536;
|
||||
}
|
||||
|
||||
enum { DEFAULT_BRIGHTNESS = 8 };
|
||||
|
||||
/**
|
||||
* @param brightness range is from 0 to 15.
|
||||
*/
|
||||
static inline Colour16 AdjustBrightness(Colour16 colour, uint8 brightness)
|
||||
{
|
||||
/* Shortcut for normal brightness */
|
||||
if (brightness == DEFAULT_BRIGHTNESS) return colour;
|
||||
|
||||
uint16 ob = 0;
|
||||
uint16 r = colour.r * brightness / DEFAULT_BRIGHTNESS;
|
||||
uint16 g = colour.g * brightness / DEFAULT_BRIGHTNESS;
|
||||
uint16 b = colour.b * brightness / DEFAULT_BRIGHTNESS;
|
||||
|
||||
/* Sum overbright */
|
||||
if (r > 31) ob += r - 31;
|
||||
if (g > 63) ob += g - 63;
|
||||
if (b > 31) ob += b - 31;
|
||||
|
||||
if (ob == 0) return Colour16(r, g, b);
|
||||
|
||||
/* Reduce overbright strength */
|
||||
ob /= 2;
|
||||
return Colour16( r >= 31 ? 31 : min(r + ob * (31 - r) / 32, 31),
|
||||
g >= 63 ? 63 : min(g + ob * (63 - g) / 64, 63),
|
||||
b >= 31 ? 31 : min(b + ob * (31 - b) / 32, 31) );
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* BLITTER_16BPP_BASE_HPP */
|
||||
@@ -1,173 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 32bpp_simple.cpp Implementation of the simple 16 bpp blitter. */
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "../zoom_func.h"
|
||||
#include "16bpp_simple.hpp"
|
||||
|
||||
#include "../table/sprites.h"
|
||||
|
||||
/** Instantiation of the simple 16bpp blitter factory. */
|
||||
static FBlitter_16bppSimple iFBlitter_16bppSimple;
|
||||
|
||||
template <BlitterMode mode>
|
||||
void Blitter_16bppSimple::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom)
|
||||
{
|
||||
const Pixel *src, *src_line;
|
||||
Colour16 *dst, *dst_line;
|
||||
|
||||
/* Find where to start reading in the source sprite */
|
||||
src_line = (const Pixel *)bp->sprite + (bp->skip_top * bp->sprite_width + bp->skip_left) * ScaleByZoom(1, zoom);
|
||||
dst_line = (Colour16 *)bp->dst + bp->top * bp->pitch + bp->left;
|
||||
|
||||
for (int y = 0; y < bp->height; y++) {
|
||||
dst = dst_line;
|
||||
dst_line += bp->pitch;
|
||||
|
||||
src = src_line;
|
||||
src_line += bp->sprite_width * ScaleByZoom(1, zoom);
|
||||
|
||||
for (int x = 0; x < bp->width; x++) {
|
||||
switch (mode) {
|
||||
case BM_COLOUR_REMAP:
|
||||
/* In case the m-channel is zero, do not remap this pixel in any way */
|
||||
if (src->m == 0) {
|
||||
if (src->a != 0) *dst = ComposeColourPA(src->c, src->a, *dst);
|
||||
} else {
|
||||
if (bp->remap[src->m] != 0) *dst = ComposeColourPA(AdjustBrightness(LookupColourInPalette(bp->remap[src->m]), src->v), src->a, *dst);
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_CRASH_REMAP:
|
||||
if (src->m == 0) {
|
||||
if (src->a != 0) {
|
||||
uint8 g = MakeDark(src->c);
|
||||
*dst = ComposeColourRGBA(g, g, g, src->a, *dst);
|
||||
}
|
||||
} else {
|
||||
if (bp->remap[src->m] != 0) *dst = ComposeColourPA(AdjustBrightness(LookupColourInPalette(bp->remap[src->m]), src->v), src->a, *dst);
|
||||
}
|
||||
break;
|
||||
|
||||
case BM_TRANSPARENT:
|
||||
/* TODO -- We make an assumption here that the remap in fact is transparency, not some colour.
|
||||
* This is never a problem with the code we produce, but newgrfs can make it fail... or at least:
|
||||
* we produce a result the newgrf maker didn't expect ;) */
|
||||
|
||||
/* Make the current colour a bit more black, so it looks like this image is transparent */
|
||||
if (src->a != 0) *dst = MakeTransparent(*dst, 192);
|
||||
break;
|
||||
|
||||
case BM_BLACK_REMAP:
|
||||
if (src->a != 0) {
|
||||
*dst = Colour16(0, 0, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (src->a != 0) *dst = ComposeColourPA(src->c, src->a, *dst);
|
||||
break;
|
||||
}
|
||||
dst++;
|
||||
src += ScaleByZoom(1, zoom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_16bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
|
||||
{
|
||||
switch (mode) {
|
||||
default: NOT_REACHED();
|
||||
case BM_NORMAL: Draw<BM_NORMAL> (bp, zoom); return;
|
||||
case BM_COLOUR_REMAP: Draw<BM_COLOUR_REMAP>(bp, zoom); return;
|
||||
case BM_TRANSPARENT: Draw<BM_TRANSPARENT> (bp, zoom); return;
|
||||
case BM_CRASH_REMAP: Draw<BM_CRASH_REMAP> (bp, zoom); return;
|
||||
case BM_BLACK_REMAP: Draw<BM_BLACK_REMAP> (bp, zoom); return;
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_16bppSimple::DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
|
||||
{
|
||||
Colour16 *udst = (Colour16 *)dst;
|
||||
|
||||
if (pal == PALETTE_TO_TRANSPARENT) {
|
||||
do {
|
||||
for (int i = 0; i != width; i++) {
|
||||
*udst = MakeTransparent(*udst, 154);
|
||||
udst++;
|
||||
}
|
||||
udst = udst - width + _screen.pitch;
|
||||
} while (--height);
|
||||
return;
|
||||
}
|
||||
if (pal == PALETTE_NEWSPAPER) {
|
||||
do {
|
||||
for (int i = 0; i != width; i++) {
|
||||
*udst = MakeGrey(*udst);
|
||||
udst++;
|
||||
}
|
||||
udst = udst - width + _screen.pitch;
|
||||
} while (--height);
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG(misc, 0, "16bpp blitter doesn't know how to draw this colour table ('%d')", pal);
|
||||
}
|
||||
|
||||
Sprite *Blitter_16bppSimple::Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
|
||||
{
|
||||
Pixel *dst;
|
||||
Sprite *dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite) + (size_t)sprite->height * (size_t)sprite->width * sizeof(Pixel));
|
||||
|
||||
dest_sprite->height = sprite->height;
|
||||
dest_sprite->width = sprite->width;
|
||||
dest_sprite->x_offs = sprite->x_offs;
|
||||
dest_sprite->y_offs = sprite->y_offs;
|
||||
|
||||
dst = (Pixel *)dest_sprite->data;
|
||||
SpriteLoader::CommonPixel *src = (SpriteLoader::CommonPixel *)sprite->data;
|
||||
|
||||
for (int i = 0; i < sprite->height * sprite->width; i++) {
|
||||
if (src->m == 0) {
|
||||
dst[i].c = To16(src->r, src->g, src->b);
|
||||
dst[i].a = src->a / 16;
|
||||
dst[i].m = 0;
|
||||
dst[i].v = 0;
|
||||
} else {
|
||||
/* Get brightest value */
|
||||
uint8 rgb_max = max(src->r, max(src->g, src->b));
|
||||
#if 0
|
||||
/* Pre-convert the mapping channel to a RGB value,
|
||||
use 32bpp AdjustBrightness() variant for better colors,
|
||||
because this function is not called each frame */
|
||||
if (rgb_max == 0) rgb_max = Blitter_32bppBase::DEFAULT_BRIGHTNESS;
|
||||
dst[i].c = To16(Blitter_32bppBase::AdjustBrightness(LookupColourInPalette32(src->m), rgb_max));
|
||||
dst[i].v = rgb_max / 16;
|
||||
#endif
|
||||
rgb_max /= 16;
|
||||
|
||||
/* Black pixel (8bpp or old 32bpp image), so use default value */
|
||||
if (rgb_max == 0) rgb_max = DEFAULT_BRIGHTNESS;
|
||||
|
||||
/* Pre-convert the mapping channel to a RGB value,
|
||||
use 32bpp AdjustBrightness() variant for better colors,
|
||||
because this function is not called each frame */
|
||||
dst[i].c = AdjustBrightness(LookupColourInPalette(src->m), rgb_max);
|
||||
dst[i].v = rgb_max;
|
||||
|
||||
dst[i].a = src->a / 16;
|
||||
dst[i].m = src->m;
|
||||
}
|
||||
src++;
|
||||
}
|
||||
|
||||
return dest_sprite;
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file 16bpp_simple.hpp Simple 16 bpp blitter. */
|
||||
|
||||
#ifndef BLITTER_16BPP_SIMPLE_HPP
|
||||
#define BLITTER_16BPP_SIMPLE_HPP
|
||||
|
||||
#include "16bpp_base.hpp"
|
||||
#include "factory.hpp"
|
||||
|
||||
/** The most trivial 32 bpp blitter (without palette animation). */
|
||||
class Blitter_16bppSimple : public Blitter_16bppBase {
|
||||
public:
|
||||
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
|
||||
/* virtual */ void DrawColourMappingRect(void *dst, int width, int height, PaletteID pal);
|
||||
/* virtual */ Sprite *Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
|
||||
template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
|
||||
|
||||
/* virtual */ const char *GetName() { return "16bpp-simple"; }
|
||||
};
|
||||
|
||||
/** Factory for the simple 16 bpp blitter. */
|
||||
class FBlitter_16bppSimple : public BlitterFactory {
|
||||
public:
|
||||
FBlitter_16bppSimple() : BlitterFactory("16bpp-simple", "16bpp Simple Blitter (no palette animation)") {}
|
||||
/* virtual */ Blitter *CreateInstance() { return new Blitter_16bppSimple(); }
|
||||
};
|
||||
|
||||
#endif /* BLITTER_16BPP_SIMPLE_HPP */
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "cmd_helper.h"
|
||||
#include "tunnelbridge_map.h"
|
||||
#include "road_gui.h"
|
||||
#include "tilehighlight_func.h"
|
||||
|
||||
#include "widgets/bridge_widget.h"
|
||||
|
||||
@@ -199,7 +198,6 @@ public:
|
||||
sprite_dim.height++; // Sprite is rendered one pixel down in the matrix field.
|
||||
text_dim.height++; // Allowing the bottom row pixels to be rendered on the edge of the matrix field.
|
||||
resize->height = max(sprite_dim.height, text_dim.height) + 2; // Max of both sizes + account for matrix edges.
|
||||
resize->height = GetMinSizing(NWST_STEP, resize->height);
|
||||
|
||||
this->bridgetext_offset = WD_MATRIX_LEFT + sprite_dim.width + 1; // Left edge of text, 1 pixel distance from the sprite.
|
||||
size->width = this->bridgetext_offset + text_dim.width + WD_MATRIX_RIGHT;
|
||||
@@ -235,8 +233,7 @@ public:
|
||||
SetDParam(1, b->speed);
|
||||
SetDParam(0, b->material);
|
||||
|
||||
uint y_sprite = Center(y, this->resize.step_height, GetSpriteSize(b->sprite).height);
|
||||
DrawSprite(b->sprite, b->pal, r.left + WD_MATRIX_LEFT, y_sprite);
|
||||
DrawSprite(b->sprite, b->pal, r.left + WD_MATRIX_LEFT, y + this->resize.step_height - 1 - GetSpriteSize(b->sprite).height);
|
||||
DrawStringMultiLine(r.left + this->bridgetext_offset, r.right, y + 2, y + this->resize.step_height,
|
||||
_game_mode == GM_EDITOR ? STR_SELECT_BRIDGE_SCENEDIT_INFO : STR_SELECT_BRIDGE_INFO);
|
||||
y += this->resize.step_height;
|
||||
@@ -433,8 +430,6 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
|
||||
new BuildBridgeWindow(&_build_bridge_desc, start, end, type, bl);
|
||||
} else {
|
||||
delete bl;
|
||||
SetSelectionTilesDirty();
|
||||
_thd.Reset();
|
||||
ShowErrorMessage(STR_ERROR_CAN_T_BUILD_BRIDGE_HERE, errmsg, WL_INFO, TileX(end) * TILE_SIZE, TileY(end) * TILE_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file build_confirmation_func.h Transparent confirmation dialog for building anything on the map. */
|
||||
|
||||
#ifndef BUILD_CONFIRMATION_FUNC_H
|
||||
#define BUILD_CONFIRMATION_FUNC_H
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "window_func.h"
|
||||
#include "widget_type.h"
|
||||
|
||||
|
||||
void ShowBuildConfirmationWindow();
|
||||
void HideBuildConfirmationWindow();
|
||||
bool ConfirmationWindowShown();
|
||||
bool BuildConfirmationWindowProcessViewportClick();
|
||||
bool ConfirmationWindowEstimatingCost();
|
||||
void ConfirmationWindowSetEstimatedCost(Money cost);
|
||||
|
||||
#endif /* BUILD_CONFIRMATION_FUNC_H */
|
||||
@@ -1,310 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file build_confirmation_gui.cpp Transparent confirmation dialog for building anything on the map. */
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "string_func.h"
|
||||
#include "strings_func.h"
|
||||
#include "window_func.h"
|
||||
#include "widget_type.h"
|
||||
#include "window_gui.h"
|
||||
#include "gfx_func.h"
|
||||
#include "tilehighlight_func.h"
|
||||
#include "viewport_func.h"
|
||||
#include "zoom_func.h"
|
||||
#include "settings_type.h"
|
||||
#include "station_gui.h"
|
||||
#include "error.h"
|
||||
#include "build_confirmation_func.h"
|
||||
#include "widgets/build_confirmation_widget.h"
|
||||
#include "widgets/misc_widget.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
static const NWidgetPart _nested_build_info_widgets[] = {
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_TT_BACKGROUND), SetMinimalSize(200, 32), EndContainer(),
|
||||
};
|
||||
|
||||
static WindowDesc _build_info_desc(
|
||||
WDP_MANUAL, NULL, 0, 0, // Coordinates and sizes are not used,
|
||||
WC_TOOLTIPS, WC_NONE,
|
||||
WDF_NO_FOCUS,
|
||||
_nested_build_info_widgets, lengthof(_nested_build_info_widgets)
|
||||
);
|
||||
|
||||
/** Window for displaying accepted goods for a station. */
|
||||
struct BuildInfoWindow : public Window
|
||||
{
|
||||
StationCoverageType sct;
|
||||
bool station;
|
||||
static Money cost;
|
||||
|
||||
static void show()
|
||||
{
|
||||
bool station = _settings_client.gui.station_show_coverage; // Station info is inaccurate when station coverage area option is disabled
|
||||
StationCoverageType sct = SCT_ALL;
|
||||
if (FindWindowByClass(WC_BUILD_STATION) != NULL) sct = SCT_ALL;
|
||||
else if (FindWindowByClass(WC_BUS_STATION) != NULL) sct = SCT_PASSENGERS_ONLY;
|
||||
else if (FindWindowByClass(WC_TRUCK_STATION) != NULL) sct = SCT_NON_PASSENGERS_ONLY;
|
||||
else station = false;
|
||||
new BuildInfoWindow(station, sct);
|
||||
}
|
||||
|
||||
BuildInfoWindow(bool station, StationCoverageType sct) : Window(&_build_info_desc)
|
||||
{
|
||||
this->station = station;
|
||||
this->sct = sct;
|
||||
this->InitNested();
|
||||
|
||||
CLRBITS(this->flags, WF_WHITE_BORDER);
|
||||
}
|
||||
|
||||
virtual Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number)
|
||||
{
|
||||
Point pt;
|
||||
pt.y = GetMainViewTop();
|
||||
pt.x = _screen.width - sm_width - FindWindowById(WC_MAIN_TOOLBAR, 0)->width;
|
||||
return pt;
|
||||
}
|
||||
|
||||
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
|
||||
{
|
||||
size->width = GetStringBoundingBox(STR_STATION_BUILD_COVERAGE_AREA_TITLE).width * 2.5;
|
||||
size->height = GetStringHeight(STR_STATION_BUILD_COVERAGE_AREA_TITLE, size->width) * (this->station ? 3 : 1);
|
||||
|
||||
/* Increase slightly to have some space around the box. */
|
||||
size->width += 2 + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
|
||||
size->height += 2 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
|
||||
}
|
||||
|
||||
virtual void DrawWidget(const Rect &r, int widget) const
|
||||
{
|
||||
/* There is only one widget. */
|
||||
GfxFillRect(r.left, r.top, r.right, r.bottom, PC_BLACK);
|
||||
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, PC_LIGHT_YELLOW);
|
||||
|
||||
int top = r.top + WD_FRAMERECT_TOP;
|
||||
Money cost = BuildInfoWindow::cost;
|
||||
StringID msg = STR_MESSAGE_ESTIMATED_COST;
|
||||
SetDParam(0, cost);
|
||||
if (cost < 0) {
|
||||
msg = STR_MESSAGE_ESTIMATED_INCOME;
|
||||
SetDParam(0, -cost);
|
||||
}
|
||||
top = DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, top, INT32_MAX, msg);
|
||||
|
||||
if (!this->station) return;
|
||||
|
||||
top = DrawStationCoverageAreaText(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, top, sct, _thd.outersize.x / TILE_SIZE / 2, false);
|
||||
if (top - r.top <= GetStringHeight(STR_STATION_BUILD_COVERAGE_AREA_TITLE, r.right - r.left) * 1.5) {
|
||||
DrawStationCoverageAreaText(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, top, sct, _thd.outersize.x / TILE_SIZE / 2, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Money BuildInfoWindow::cost = 0;
|
||||
|
||||
/** GUI for confirming building actions. */
|
||||
struct BuildConfirmationWindow : Window {
|
||||
|
||||
// TODO: show estimated price
|
||||
static bool shown; ///< Just to speed up window hiding, HideBuildConfirmationWindow() is called very often.
|
||||
static bool estimating_cost; ///< Calculate action cost instead of executing action.
|
||||
Point selstart; ///< The selection start on the viewport.
|
||||
Point selend; ///< The selection end on the viewport.
|
||||
|
||||
BuildConfirmationWindow(WindowDesc *desc) : Window(desc)
|
||||
{
|
||||
// Save tile selection points, they will be reset by subsequent code, and we must keep them
|
||||
selstart = _thd.selstart;
|
||||
selend = _thd.selend;
|
||||
|
||||
this->InitNested(0);
|
||||
|
||||
Point pt;
|
||||
const Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
|
||||
NWidgetViewport *nvp = this->GetWidget<NWidgetViewport>(WID_BC_OK);
|
||||
|
||||
pt.x = w->viewport->scrollpos_x + ScaleByZoom(_cursor.pos.x - nvp->current_x / 2, w->viewport->zoom);
|
||||
pt.y = w->viewport->scrollpos_y + ScaleByZoom(_cursor.pos.y - nvp->current_y / 4, w->viewport->zoom);
|
||||
|
||||
nvp->InitializeViewport(this, 0, w->viewport->zoom);
|
||||
nvp->disp_flags |= ND_SHADE_DIMMED;
|
||||
|
||||
this->viewport->scrollpos_x = pt.x;
|
||||
this->viewport->scrollpos_y = pt.y;
|
||||
this->viewport->dest_scrollpos_x = this->viewport->scrollpos_x;
|
||||
this->viewport->dest_scrollpos_y = this->viewport->scrollpos_y;
|
||||
|
||||
BuildConfirmationWindow::shown = true;
|
||||
BuildConfirmationWindow::estimating_cost = true;
|
||||
ConfirmationWindowSetEstimatedCost(0); // Clear old value, just in case
|
||||
// This is a hack - we invoke the build command with estimating_cost flag, which is equal to _shift_pressed,
|
||||
// then we select last build tool, restore viewport selection, and hide all windows, which pop up when command is invoked,
|
||||
// and all that just to get cost estimate value.
|
||||
ConfirmPlacingObject();
|
||||
ToolbarSelectLastTool();
|
||||
_thd.selstart = selstart;
|
||||
_thd.selend = selend;
|
||||
BuildConfirmationWindow::estimating_cost = false;
|
||||
MoveAllWindowsOffScreen();
|
||||
}
|
||||
|
||||
~BuildConfirmationWindow()
|
||||
{
|
||||
BuildConfirmationWindow::shown = false;
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count)
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_BC_OK:
|
||||
if (pt.y <= (int)GetWidget<NWidgetViewport>(WID_BC_OK)->current_y / 2) {
|
||||
_thd.selstart = selstart;
|
||||
_thd.selend = selend;
|
||||
ConfirmPlacingObject();
|
||||
ToolbarSelectLastTool();
|
||||
} else {
|
||||
ResetObjectToPlace();
|
||||
DeleteWindowByClass(WC_BUILD_BRIDGE);
|
||||
//ClearErrorMessages();
|
||||
Window *w = FindWindowById(WC_ERRMSG, 0);
|
||||
if (w != NULL) delete w;
|
||||
}
|
||||
break;
|
||||
}
|
||||
HideBuildConfirmationWindow(); // this == NULL after this call
|
||||
}
|
||||
|
||||
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_BC_OK:
|
||||
size->width = GetMinSizing(NWST_BUTTON) * 2;
|
||||
size->height = GetMinSizing(NWST_BUTTON) * 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnPaint()
|
||||
{
|
||||
this->DrawWidgets();
|
||||
|
||||
DrawButtonFrame(0, 0, this->width - 1, this->height / 2 - 2, STR_BUTTON_OK);
|
||||
DrawButtonFrame(0, this->height / 2, this->width - 1, this->height / 2 - 1, STR_BUTTON_CANCEL);
|
||||
}
|
||||
|
||||
void DrawButtonFrame(int x, int y, int w, int h, int str)
|
||||
{
|
||||
DrawFrameRect(x, y, x + w, y + h, COLOUR_GREY, FR_BORDERONLY);
|
||||
Dimension d = GetStringBoundingBox(str);
|
||||
DrawFrameRect(x + w / 2 - d.width / 2 - 1,
|
||||
Center(y, h) - 2,
|
||||
x + w / 2 + d.width / 2 + 1,
|
||||
Center(y, h) + d.height,
|
||||
COLOUR_GREY, FR_NONE);
|
||||
DrawString(x, x + w, Center(y, h), str, TC_FROMSTRING, SA_HOR_CENTER);
|
||||
}
|
||||
};
|
||||
|
||||
bool BuildConfirmationWindow::shown = false;
|
||||
bool BuildConfirmationWindow::estimating_cost = false;
|
||||
|
||||
static const NWidgetPart _nested_build_confirmation_widgets[] = {
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_BC_PANEL),
|
||||
NWidget(NWID_VIEWPORT, INVALID_COLOUR, WID_BC_OK), SetSizingType(NWST_VIEWPORT), SetResize(1, 1), SetFill(1, 1), //SetPadding(2, 2, 2, 2),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
static WindowDesc _build_confirmation_desc(
|
||||
WDP_MANUAL, "build_confirmation", 0, 0,
|
||||
WC_BUILD_CONFIRMATION, WC_NONE,
|
||||
0,
|
||||
_nested_build_confirmation_widgets, lengthof(_nested_build_confirmation_widgets)
|
||||
);
|
||||
|
||||
/**
|
||||
* Show build confirmation window under the mouse cursor
|
||||
*/
|
||||
void ShowBuildConfirmationWindow()
|
||||
{
|
||||
if (ConfirmationWindowEstimatingCost()) return; // Special case, ignore recursive call
|
||||
|
||||
HideBuildConfirmationWindow();
|
||||
|
||||
if (!_settings_client.gui.build_confirmation || _shift_pressed) {
|
||||
ConfirmPlacingObject();
|
||||
return;
|
||||
}
|
||||
|
||||
BuildConfirmationWindow *w = new BuildConfirmationWindow(&_build_confirmation_desc);
|
||||
|
||||
int old_left = w->left;
|
||||
int old_top = w->top;
|
||||
w->left = _cursor.pos.x - w->width / 2;
|
||||
w->top = _cursor.pos.y - w->height / 4;
|
||||
w->viewport->left += w->left - old_left;
|
||||
w->viewport->top += w->top - old_top;
|
||||
w->SetDirty();
|
||||
SetDirtyBlocks(0, 0, _screen.width, _screen.height); // I don't know what does this do, but it looks important
|
||||
|
||||
BuildInfoWindow::show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy build confirmation window, this does not cancel current action
|
||||
*/
|
||||
void HideBuildConfirmationWindow()
|
||||
{
|
||||
if (ConfirmationWindowEstimatingCost()) return; // Special case, ignore recursive call
|
||||
|
||||
if (!BuildConfirmationWindow::shown) return;
|
||||
|
||||
DeleteWindowById(WC_BUILD_CONFIRMATION, 0);
|
||||
DeleteWindowById(WC_TOOLTIPS, 0);
|
||||
}
|
||||
|
||||
bool ConfirmationWindowShown()
|
||||
{
|
||||
return BuildConfirmationWindow::shown;
|
||||
}
|
||||
|
||||
bool BuildConfirmationWindowProcessViewportClick()
|
||||
{
|
||||
if (!BuildConfirmationWindow::shown) return false;
|
||||
Window *w = FindWindowById(WC_BUILD_CONFIRMATION, 0);
|
||||
if (w != NULL && IsInsideBS(_cursor.pos.x, w->left, w->width) && IsInsideBS(_cursor.pos.y, w->top, w->height)) {
|
||||
if (_settings_client.gui.windows_titlebars || !_left_button_down) {
|
||||
Point pt;
|
||||
pt.x = _cursor.pos.x - w->left;
|
||||
pt.y = _cursor.pos.y - w->top;
|
||||
w->OnClick(pt, WID_BC_OK, 1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
HideBuildConfirmationWindow();
|
||||
|
||||
_thd.new_outersize = _thd.outersize; // Revert station catchment area highlight, which is getting set to zero inside drawing funcs
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ConfirmationWindowEstimatingCost()
|
||||
{
|
||||
return BuildConfirmationWindow::estimating_cost;
|
||||
}
|
||||
|
||||
void ConfirmationWindowSetEstimatedCost(Money cost)
|
||||
{
|
||||
BuildInfoWindow::cost = cost;
|
||||
}
|
||||
@@ -46,8 +46,7 @@
|
||||
*/
|
||||
uint GetEngineListHeight(VehicleType type)
|
||||
{
|
||||
uint size = max<uint>(FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM, GetVehicleImageCellSize(type, EIT_PURCHASE).height);
|
||||
return GetMinSizing(NWST_STEP, size);
|
||||
return max<uint>(FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM, GetVehicleImageCellSize(type, EIT_PURCHASE).height);
|
||||
}
|
||||
|
||||
static const NWidgetPart _nested_build_vehicle_widgets[] = {
|
||||
@@ -58,30 +57,25 @@ static const NWidgetPart _nested_build_vehicle_widgets[] = {
|
||||
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_STICKYBOX, COLOUR_GREY),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_BV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER), SetSizingType(NWST_STEP),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA), SetSizingType(NWST_STEP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BV_SHOW_HIDDEN_ENGINES), SetSizingType(NWST_STEP),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_CARGO_FILTER_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_FILTER_CRITERIA), SetSizingType(NWST_STEP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
/* Vehicle list. */
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_BV_LIST), SetResize(1, 1), SetFill(1, 0), SetMatrixDataTip(1, 0, STR_NULL), SetScrollbar(WID_BV_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_BV_SCROLLBAR),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_BV_SORT_ASCENDING_DESCENDING), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_SORT_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_BV_SHOW_HIDDEN_ENGINES),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_BV_CARGO_FILTER_DROPDOWN), SetResize(1, 0), SetFill(1, 0), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_FILTER_CRITERIA),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
/* Panel with details. */
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_BV_PANEL), SetMinimalSize(240, 122), SetResize(1, 1), EndContainer(),
|
||||
EndContainer(),
|
||||
/* Vehicle list. */
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_BV_LIST), SetResize(1, 1), SetFill(1, 0), SetMatrixDataTip(1, 0, STR_NULL), SetScrollbar(WID_BV_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_BV_SCROLLBAR),
|
||||
EndContainer(),
|
||||
/* Panel with details. */
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_BV_PANEL), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
|
||||
/* Build/rename buttons, resize button. */
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_BV_BUILD_SEL),
|
||||
@@ -1413,7 +1407,6 @@ struct BuildVehicleWindow : Window {
|
||||
Dimension d = GetStringBoundingBox(this->GetWidget<NWidgetCore>(widget)->widget_data);
|
||||
d.width += padding.width + Window::SortButtonWidth() * 2; // Doubled since the string is centred and it also looks better.
|
||||
d.height += padding.height;
|
||||
d.height = GetMinSizing(NWST_STEP, d.height);
|
||||
*size = maxdim(*size, d);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
#include "signal_func.h"
|
||||
#include "core/backup_type.hpp"
|
||||
#include "object_base.h"
|
||||
#include "string_func.h"
|
||||
#include "tilehighlight_func.h"
|
||||
#include "build_confirmation_func.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
|
||||
@@ -558,18 +555,11 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
|
||||
* However, in case of incoming network commands,
|
||||
* map generation or the pause button we do want
|
||||
* to execute. */
|
||||
bool estimate_only = (_shift_pressed || ConfirmationWindowEstimatingCost()) &&
|
||||
IsLocalCompany() &&
|
||||
bool estimate_only = _shift_pressed && IsLocalCompany() &&
|
||||
!_generating_world &&
|
||||
!(cmd & CMD_NETWORK_COMMAND) &&
|
||||
(cmd & CMD_ID_MASK) != CMD_PAUSE;
|
||||
|
||||
if (ConfirmationWindowEstimatingCost() && !estimate_only) {
|
||||
// We cannot estimate cost, so abort the command - it will be repeated by confirmation dialog later
|
||||
ShowEstimatedCostOrIncome(0, 0, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* We're only sending the command, so don't do
|
||||
* fancy things for 'success'. */
|
||||
bool only_sending = _networking && !(cmd & CMD_NETWORK_COMMAND);
|
||||
|
||||
@@ -910,10 +910,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
Game::NewEvent(new ScriptEventCompanyBankrupt(c_index));
|
||||
CompanyAdminRemove(c_index, (CompanyRemoveReason)reason);
|
||||
|
||||
if (StoryPage::GetNumItems() == 0 || Goal::GetNumItems() == 0) {
|
||||
InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
|
||||
InvalidateWindowData(WC_MAIN_TOOLBAR_RIGHT, 0);
|
||||
}
|
||||
if (StoryPage::GetNumItems() == 0 || Goal::GetNumItems() == 0) InvalidateWindowData(WC_MAIN_TOOLBAR, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include "road_func.h"
|
||||
#include "water.h"
|
||||
#include "station_func.h"
|
||||
#include "widget_type.h"
|
||||
#include "zoom_func.h"
|
||||
#include "sortlist_type.h"
|
||||
|
||||
@@ -220,7 +219,7 @@ static const NWidgetPart _nested_company_finances_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_CF_CAPTION), SetDataTip(STR_FINANCES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
//NWidget(WWT_IMGBTN, COLOUR_GREY, WID_CF_TOGGLE_SIZE), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW),
|
||||
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_CF_TOGGLE_SIZE), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW),
|
||||
NWidget(WWT_SHADEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_STICKYBOX, COLOUR_GREY),
|
||||
EndContainer(),
|
||||
@@ -529,7 +528,7 @@ public:
|
||||
|
||||
uint Height(uint width) const
|
||||
{
|
||||
return GetMinSizing(NWST_STEP, max(FONT_HEIGHT_NORMAL, ScaleGUITrad(12) + 2));
|
||||
return max(FONT_HEIGHT_NORMAL, ScaleGUITrad(12) + 2);
|
||||
}
|
||||
|
||||
bool Selectable() const
|
||||
@@ -1159,7 +1158,7 @@ static const NWidgetPart _nested_select_company_manager_face_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_SCMF_CAPTION), SetDataTip(STR_FACE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
//NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCMF_TOGGLE_LARGE_SMALL), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_FACE_ADVANCED_TOOLTIP),
|
||||
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_SCMF_TOGGLE_LARGE_SMALL), SetDataTip(SPR_LARGE_SMALL_WINDOW, STR_FACE_ADVANCED_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_SCMF_SELECT_FACE),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
|
||||
@@ -1182,112 +1181,102 @@ static const NWidgetPart _nested_select_company_manager_face_widgets[] = {
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(NWID_SPACER), SetFill(1, 0),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetFill(0, 1),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON), SetFill(1, 0), SetDataTip(STR_FACE_ADVANCED, STR_FACE_ADVANCED_TOOLTIP),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
|
||||
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_MALEFEMALE), // Simple male/female face setting.
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetFill(0, 1),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP),
|
||||
NWidget(NWID_SPACER), SetFill(0, 1),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TOGGLE_LARGE_SMALL_BUTTON), SetFill(1, 0), SetDataTip(STR_FACE_ADVANCED, STR_FACE_ADVANCED_TOOLTIP),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
|
||||
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_MALEFEMALE), // Simple male/female face setting.
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetFill(0, 1),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP),
|
||||
NWidget(NWID_SPACER), SetFill(0, 1),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_PARTS), // Advanced face parts setting.
|
||||
EndContainer(),
|
||||
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SCMF_SEL_PARTS), // Advanced face parts setting.
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE2), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE2), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_EUR), SetFill(1, 0), SetDataTip(STR_FACE_EUROPEAN, STR_FACE_SELECT_EUROPEAN),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_AFR), SetFill(1, 0), SetDataTip(STR_FACE_AFRICAN, STR_FACE_SELECT_AFRICAN),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 4),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_MALE2), SetFill(1, 0), SetDataTip(STR_FACE_MALE_BUTTON, STR_FACE_MALE_TOOLTIP),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_FEMALE2), SetFill(1, 0), SetDataTip(STR_FACE_FEMALE_BUTTON, STR_FACE_FEMALE_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_EUR), SetFill(1, 0), SetDataTip(STR_FACE_EUROPEAN, STR_FACE_SELECT_EUROPEAN),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SCMF_ETHNICITY_AFR), SetFill(1, 0), SetDataTip(STR_FACE_AFRICAN, STR_FACE_SELECT_AFRICAN),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 4),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_MOUSTACHE_EARRING), SetDataTip(STR_EMPTY, STR_FACE_MOUSTACHE_EARRING_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_GLASSES_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_GLASSES), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 2), SetFill(1, 0),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAIR_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_HAIR_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAIR), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_HAIR_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_HAIR_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYEBROWS_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_EYEBROWS_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYEBROWS), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_EYEBROWS_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_EYEBROWS_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYECOLOUR_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_EYECOLOUR_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_EYECOLOUR_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_EYECOLOUR_TOOLTIP),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_GLASSES_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_GLASSES_TOOLTIP_2),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_GLASSES), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP_2),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_GLASSES_TOOLTIP_2),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_NOSE_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_NOSE_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_NOSE), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_NOSE_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_NOSE_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_LIPS_MOUSTACHE_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_CHIN_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_CHIN_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_CHIN), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_CHIN_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_CHIN_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_JACKET_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_JACKET_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_JACKET), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_JACKET_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_JACKET_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_COLLAR_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_COLLAR_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_COLLAR), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_COLLAR_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_COLLAR_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_TIE_EARRING_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_L), SetSizingType(NWST_STEP), SetDataTip(AWV_DECREASE, STR_FACE_TIE_EARRING_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING), SetSizingType(NWST_STEP), SetDataTip(STR_EMPTY, STR_FACE_TIE_EARRING_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_R), SetSizingType(NWST_STEP), SetDataTip(AWV_INCREASE, STR_FACE_TIE_EARRING_TOOLTIP),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_MOUSTACHE_EARRING), SetDataTip(STR_EMPTY, STR_FACE_MOUSTACHE_EARRING_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAS_GLASSES_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAS_GLASSES), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 2), SetFill(1, 0),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_HAIR_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_L), SetDataTip(AWV_DECREASE, STR_FACE_HAIR_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_HAIR), SetDataTip(STR_EMPTY, STR_FACE_HAIR_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_HAIR_R), SetDataTip(AWV_INCREASE, STR_FACE_HAIR_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYEBROWS_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_L), SetDataTip(AWV_DECREASE, STR_FACE_EYEBROWS_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYEBROWS), SetDataTip(STR_EMPTY, STR_FACE_EYEBROWS_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYEBROWS_R), SetDataTip(AWV_INCREASE, STR_FACE_EYEBROWS_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_EYECOLOUR_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_L), SetDataTip(AWV_DECREASE, STR_FACE_EYECOLOUR_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR), SetDataTip(STR_EMPTY, STR_FACE_EYECOLOUR_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_EYECOLOUR_R), SetDataTip(AWV_INCREASE, STR_FACE_EYECOLOUR_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_GLASSES_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_L), SetDataTip(AWV_DECREASE, STR_FACE_GLASSES_TOOLTIP_2),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_GLASSES), SetDataTip(STR_EMPTY, STR_FACE_GLASSES_TOOLTIP_2),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_GLASSES_R), SetDataTip(AWV_INCREASE, STR_FACE_GLASSES_TOOLTIP_2),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_NOSE_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_L), SetDataTip(AWV_DECREASE, STR_FACE_NOSE_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_NOSE), SetDataTip(STR_EMPTY, STR_FACE_NOSE_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_NOSE_R), SetDataTip(AWV_INCREASE, STR_FACE_NOSE_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_LIPS_MOUSTACHE_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_L), SetDataTip(AWV_DECREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE), SetDataTip(STR_EMPTY, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_LIPS_MOUSTACHE_R), SetDataTip(AWV_INCREASE, STR_FACE_LIPS_MOUSTACHE_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_CHIN_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_L), SetDataTip(AWV_DECREASE, STR_FACE_CHIN_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_CHIN), SetDataTip(STR_EMPTY, STR_FACE_CHIN_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_CHIN_R), SetDataTip(AWV_INCREASE, STR_FACE_CHIN_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_JACKET_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_L), SetDataTip(AWV_DECREASE, STR_FACE_JACKET_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_JACKET), SetDataTip(STR_EMPTY, STR_FACE_JACKET_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_JACKET_R), SetDataTip(AWV_INCREASE, STR_FACE_JACKET_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_COLLAR_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_L), SetDataTip(AWV_DECREASE, STR_FACE_COLLAR_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_COLLAR), SetDataTip(STR_EMPTY, STR_FACE_COLLAR_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_COLLAR_R), SetDataTip(AWV_INCREASE, STR_FACE_COLLAR_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SCMF_TIE_EARRING_TEXT), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_L), SetDataTip(AWV_DECREASE, STR_FACE_TIE_EARRING_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING), SetDataTip(STR_EMPTY, STR_FACE_TIE_EARRING_TOOLTIP),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_GREY, WID_SCMF_TIE_EARRING_R), SetDataTip(AWV_INCREASE, STR_FACE_TIE_EARRING_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetFill(0, 1),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 2),
|
||||
@@ -1337,7 +1326,7 @@ class SelectCompanyManagerFaceWindow : public Window
|
||||
|
||||
/* Draw the value/bool in white (0xC). If the button clicked adds 1px to x and y text coordinates (IsWindowWidgetLowered()). */
|
||||
DrawString(nwi_widget->pos_x + nwi_widget->IsLowered(), nwi_widget->pos_x + nwi_widget->current_x - 1 - nwi_widget->IsLowered(),
|
||||
Center(nwi_widget->pos_y + nwi_widget->IsLowered(), nwi_widget->current_y), str, TC_WHITE, SA_HOR_CENTER);
|
||||
nwi_widget->pos_y + 1 + nwi_widget->IsLowered(), str, TC_WHITE, SA_HOR_CENTER);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1387,10 +1376,6 @@ public:
|
||||
Dimension yesno_dim = maxdim(GetStringBoundingBox(STR_FACE_YES), GetStringBoundingBox(STR_FACE_NO));
|
||||
yesno_dim.width += WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
|
||||
yesno_dim.height += WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
|
||||
|
||||
yesno_dim.width = GetMinSizing(NWST_STEP, yesno_dim.width);
|
||||
yesno_dim.height = GetMinSizing(NWST_STEP, yesno_dim.height);
|
||||
|
||||
/* Size of the number button + arrows. */
|
||||
Dimension number_dim = {0, 0};
|
||||
for (int val = 1; val <= 12; val++) {
|
||||
@@ -1534,12 +1519,12 @@ public:
|
||||
case WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT:
|
||||
case WID_SCMF_TIE_EARRING_TEXT: {
|
||||
StringID str = PART_TEXTS_IS_FEMALE[(widget - WID_SCMF_HAS_MOUSTACHE_EARRING_TEXT) * 2 + this->is_female];
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(r.top, r.bottom - r.top), str, TC_GOLD, SA_RIGHT);
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, str, TC_GOLD, SA_RIGHT);
|
||||
break;
|
||||
}
|
||||
|
||||
case WID_SCMF_LIPS_MOUSTACHE_TEXT:
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(r.top, r.bottom - r.top), (this->is_moust_male) ? STR_FACE_MOUSTACHE : STR_FACE_LIPS, TC_GOLD, SA_RIGHT);
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, (this->is_moust_male) ? STR_FACE_MOUSTACHE : STR_FACE_LIPS, TC_GOLD, SA_RIGHT);
|
||||
break;
|
||||
|
||||
case WID_SCMF_HAS_GLASSES_TEXT:
|
||||
@@ -1551,7 +1536,7 @@ public:
|
||||
case WID_SCMF_CHIN_TEXT:
|
||||
case WID_SCMF_JACKET_TEXT:
|
||||
case WID_SCMF_COLLAR_TEXT:
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(r.top, r.bottom - r.top), PART_TEXTS[widget - WID_SCMF_HAS_GLASSES_TEXT], TC_GOLD, SA_RIGHT);
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, r.top + WD_FRAMERECT_TOP, PART_TEXTS[widget - WID_SCMF_HAS_GLASSES_TEXT], TC_GOLD, SA_RIGHT);
|
||||
break;
|
||||
|
||||
|
||||
|
||||
@@ -417,20 +417,6 @@ DEF_CONSOLE_CMD(ConListFiles)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Open the cheat window. */
|
||||
DEF_CONSOLE_CMD(ConOpenCheats)
|
||||
{
|
||||
if (argc == 0) {
|
||||
IConsoleHelp("Open the cheat window. Usage: 'open_cheats'");
|
||||
return true;
|
||||
}
|
||||
|
||||
extern void ShowCheatWindow();
|
||||
ShowCheatWindow();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Change the dir via console */
|
||||
DEF_CONSOLE_CMD(ConChangeDirectory)
|
||||
{
|
||||
@@ -1973,8 +1959,6 @@ void IConsoleStdLibRegister()
|
||||
IConsoleCmdRegister("save", ConSave);
|
||||
IConsoleCmdRegister("saveconfig", ConSaveConfig);
|
||||
IConsoleCmdRegister("ls", ConListFiles);
|
||||
IConsoleCmdRegister("open_cheats", ConOpenCheats);
|
||||
IConsoleCmdRegister("cheats", ConOpenCheats);
|
||||
IConsoleCmdRegister("cd", ConChangeDirectory);
|
||||
IConsoleCmdRegister("pwd", ConPrintWorkingDirectory);
|
||||
IConsoleCmdRegister("clear", ConClearBuffer);
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "console_func.h"
|
||||
#include "rev.h"
|
||||
#include "video/video_driver.hpp"
|
||||
#include "textbuf_gui.h"
|
||||
|
||||
#include "widgets/console_widget.h"
|
||||
|
||||
@@ -30,10 +29,6 @@
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <SDL_screenkeyboard.h>
|
||||
#endif
|
||||
|
||||
static const uint ICON_HISTORY_SIZE = 20;
|
||||
static const uint ICON_LINE_SPACING = 2;
|
||||
static const uint ICON_RIGHT_BORDERWIDTH = 10;
|
||||
@@ -234,16 +229,6 @@ struct IConsoleWindow : Window
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnQueryTextFinished(char *str)
|
||||
{
|
||||
_focused_window = this;
|
||||
|
||||
if (str == NULL) return;
|
||||
|
||||
_iconsole_cmdline.Assign(str);
|
||||
this->OnKeyPress(0, WKC_RETURN);
|
||||
}
|
||||
|
||||
virtual void OnHundredthTick()
|
||||
{
|
||||
if (IConsoleLine::Truncate() &&
|
||||
@@ -445,25 +430,9 @@ void IConsoleSwitch()
|
||||
{
|
||||
switch (_iconsole_mode) {
|
||||
case ICONSOLE_CLOSED:
|
||||
#ifdef __ANDROID__
|
||||
{
|
||||
char buf[1024] = "";
|
||||
for (const IConsoleLine *print = IConsoleLine::Get(0); print != NULL; print = print->previous) {
|
||||
if (print->buffer && print->buffer[0]) {
|
||||
strecat(buf, print->buffer, lastof(buf));
|
||||
strecat(buf, "\n", lastof(buf));
|
||||
}
|
||||
}
|
||||
strecat(buf, "\n\n\n\n\n\n\n\n", lastof(buf)); // Move all text to top
|
||||
SDL_ANDROID_SetScreenKeyboardHintMesage(buf);
|
||||
char text[512] = "";
|
||||
SDL_ANDROID_GetScreenKeyboardTextInput(text, sizeof(text) - 1); /* Invoke Android built-in screen keyboard */
|
||||
IConsoleCmdExec(text);
|
||||
}
|
||||
#else
|
||||
new IConsoleWindow();
|
||||
#endif
|
||||
new IConsoleWindow();
|
||||
break;
|
||||
|
||||
case ICONSOLE_OPENED: case ICONSOLE_FULL:
|
||||
DeleteWindowById(WC_CONSOLE, 0);
|
||||
break;
|
||||
|
||||
@@ -12,18 +12,20 @@
|
||||
#ifndef ENUM_TYPE_HPP
|
||||
#define ENUM_TYPE_HPP
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
/** Some enums need to have allowed incrementing (i.e. StationClassID) */
|
||||
#define DECLARE_POSTFIX_INCREMENT(type) \
|
||||
inline type operator ++(type& e, int) \
|
||||
#define DECLARE_POSTFIX_INCREMENT(enum_type) \
|
||||
inline enum_type operator ++(enum_type& e, int) \
|
||||
{ \
|
||||
type e_org = e; \
|
||||
e = (type)((int)e + 1); \
|
||||
enum_type e_org = e; \
|
||||
e = (enum_type)((std::underlying_type<enum_type>::type)e + 1); \
|
||||
return e_org; \
|
||||
} \
|
||||
inline type operator --(type& e, int) \
|
||||
inline enum_type operator --(enum_type& e, int) \
|
||||
{ \
|
||||
type e_org = e; \
|
||||
e = (type)((int)e - 1); \
|
||||
enum_type e_org = e; \
|
||||
e = (enum_type)((std::underlying_type<enum_type>::type)e - 1); \
|
||||
return e_org; \
|
||||
}
|
||||
|
||||
@@ -31,13 +33,13 @@
|
||||
|
||||
/** Operators to allow to work with enum as with type safe bit set in C++ */
|
||||
# define DECLARE_ENUM_AS_BIT_SET(mask_t) \
|
||||
inline mask_t operator | (mask_t m1, mask_t m2) {return (mask_t)((int)m1 | m2);} \
|
||||
inline mask_t operator & (mask_t m1, mask_t m2) {return (mask_t)((int)m1 & m2);} \
|
||||
inline mask_t operator ^ (mask_t m1, mask_t m2) {return (mask_t)((int)m1 ^ m2);} \
|
||||
inline mask_t operator | (mask_t m1, mask_t m2) {return (mask_t)((std::underlying_type<mask_t>::type)m1 | m2);} \
|
||||
inline mask_t operator & (mask_t m1, mask_t m2) {return (mask_t)((std::underlying_type<mask_t>::type)m1 & m2);} \
|
||||
inline mask_t operator ^ (mask_t m1, mask_t m2) {return (mask_t)((std::underlying_type<mask_t>::type)m1 ^ m2);} \
|
||||
inline mask_t& operator |= (mask_t& m1, mask_t m2) {m1 = m1 | m2; return m1;} \
|
||||
inline mask_t& operator &= (mask_t& m1, mask_t m2) {m1 = m1 & m2; return m1;} \
|
||||
inline mask_t& operator ^= (mask_t& m1, mask_t m2) {m1 = m1 ^ m2; return m1;} \
|
||||
inline mask_t operator ~(mask_t m) {return (mask_t)(~(int)m);}
|
||||
inline mask_t operator ~(mask_t m) {return (mask_t)(~(std::underlying_type<mask_t>::type)m);}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -303,7 +303,7 @@ char *CrashLog::LogGamelog(char *buffer, const char *last) const
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes any recent news messages to the buffer.
|
||||
* Writes up to 32 recent news messages to the buffer, with the most recent first.
|
||||
* @param buffer The begin where to write at.
|
||||
* @param last The last position in the buffer to write to.
|
||||
* @return the position of the \c '\0' character after the buffer.
|
||||
@@ -312,7 +312,8 @@ char *CrashLog::LogRecentNews(char *buffer, const char *last) const
|
||||
{
|
||||
buffer += seprintf(buffer, last, "Recent news messages:\n");
|
||||
|
||||
for (NewsItem *news = _oldest_news; news != NULL; news = news->next) {
|
||||
int i = 0;
|
||||
for (NewsItem *news = _latest_news; i < 32 && news != NULL; news = news->prev, i++) {
|
||||
YearMonthDay ymd;
|
||||
ConvertDateToYMD(news->date, &ymd);
|
||||
buffer += seprintf(buffer, last, "(%i-%02i-%02i) StringID: %u, Type: %u, Ref1: %u, %u, Ref2: %u, %u\n",
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
#include "string_func.h"
|
||||
#include "fileio_func.h"
|
||||
#include "settings_type.h"
|
||||
#ifdef __ANDROID__
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include "os/windows/win32.h"
|
||||
@@ -114,9 +111,6 @@ char *DumpDebugFacilityNames(char *buf, char *last)
|
||||
*/
|
||||
static void debug_print(const char *dbg, const char *buf)
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
__android_log_print(ANDROID_LOG_INFO, "OpenTTD", "[%s] %s", dbg, buf);
|
||||
#endif
|
||||
#if defined(ENABLE_NETWORK)
|
||||
if (_debug_socket != INVALID_SOCKET) {
|
||||
char buf2[1024 + 32];
|
||||
|
||||
@@ -62,8 +62,8 @@ static const NWidgetPart _nested_train_depot_widgets[] = {
|
||||
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_D_SHOW_SELL_CHAIN),
|
||||
NWidget(WWT_IMGBTN, COLOUR_GREY, WID_D_SELL_CHAIN), SetDataTip(SPR_SELL_CHAIN_TRAIN, STR_DEPOT_DRAG_WHOLE_TRAIN_TO_SELL_TOOLTIP), SetResize(0, 1), SetFill(0, 1),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_SELL_ALL), SetResize(0, 1), SetFill(0, 1), SetDataTip(0x0, STR_NULL),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_AUTOREPLACE), SetResize(0, 1), SetFill(0, 1), SetDataTip(0x0, STR_NULL),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_SELL_ALL), SetDataTip(0x0, STR_NULL),
|
||||
NWidget(WWT_PUSHIMGBTN, COLOUR_GREY, WID_D_AUTOREPLACE), SetDataTip(0x0, STR_NULL),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_D_V_SCROLL),
|
||||
EndContainer(),
|
||||
@@ -331,7 +331,7 @@ struct DepotWindow : Window {
|
||||
/* Length of consist in tiles with 1 fractional digit (rounded up) */
|
||||
SetDParam(0, CeilDiv(u->gcache.cached_total_length * 10, TILE_SIZE));
|
||||
SetDParam(1, 1);
|
||||
DrawString(rtl ? left + WD_FRAMERECT_LEFT : right - this->count_width, rtl ? left + this->count_width : right - WD_FRAMERECT_RIGHT, Center(y, this->resize.step_height, FONT_HEIGHT_SMALL), STR_TINY_BLACK_DECIMAL, TC_FROMSTRING, SA_RIGHT); // Draw the counter
|
||||
DrawString(rtl ? left + WD_FRAMERECT_LEFT : right - this->count_width, rtl ? left + this->count_width : right - WD_FRAMERECT_RIGHT, y + (this->resize.step_height - FONT_HEIGHT_SMALL) / 2, STR_TINY_BLACK_DECIMAL, TC_FROMSTRING, SA_RIGHT); // Draw the counter
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -341,28 +341,26 @@ struct DepotWindow : Window {
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
|
||||
uint diff_x, y_sprite, y_num;
|
||||
uint diff_x, diff_y;
|
||||
if (v->IsGroundVehicle()) {
|
||||
/* Arrange unitnumber and flag horizontally */
|
||||
diff_x = this->flag_width + WD_FRAMERECT_LEFT;
|
||||
y_sprite = Center(y, this->resize.step_height, this->flag_height);
|
||||
y_num = Center(y, this->resize.step_height);
|
||||
diff_y = (this->resize.step_height - this->flag_height) / 2 - 2;
|
||||
} else {
|
||||
/* Arrange unitnumber and flag vertically */
|
||||
diff_x = WD_FRAMERECT_LEFT;
|
||||
y_num = Center(y, this->resize.step_height, FONT_HEIGHT_NORMAL + this->flag_height + 2);
|
||||
y_sprite = y_num + FONT_HEIGHT_NORMAL;
|
||||
diff_y = FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
|
||||
}
|
||||
int text_left = rtl ? right - this->header_width - 1 : left + diff_x;
|
||||
int text_right = rtl ? right - diff_x : left + this->header_width - 1;
|
||||
|
||||
if (free_wagon) {
|
||||
DrawString(text_left, text_right, Center(y, this->resize.step_height), STR_DEPOT_NO_ENGINE);
|
||||
DrawString(text_left, text_right, y + 2, STR_DEPOT_NO_ENGINE);
|
||||
} else {
|
||||
DrawSprite((v->vehstatus & VS_STOPPED) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, rtl ? right - this->flag_width : left + WD_FRAMERECT_LEFT, y_sprite);
|
||||
DrawSprite((v->vehstatus & VS_STOPPED) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, rtl ? right - this->flag_width : left + WD_FRAMERECT_LEFT, y + diff_y);
|
||||
|
||||
SetDParam(0, v->unitnumber);
|
||||
DrawString(text_left, text_right, y_num, (uint16)(v->max_age - DAYS_IN_LEAP_YEAR) >= v->age ? STR_BLACK_COMMA : STR_RED_COMMA);
|
||||
DrawString(text_left, text_right, y + 2, (uint16)(v->max_age - DAYS_IN_LEAP_YEAR) >= v->age ? STR_BLACK_COMMA : STR_RED_COMMA);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,7 +400,7 @@ struct DepotWindow : Window {
|
||||
uint16 num = this->vscroll->GetPosition() * this->num_columns;
|
||||
int maxval = min(this->vehicle_list.Length(), num + (rows_in_display * this->num_columns));
|
||||
int y;
|
||||
for (y = r.top; num < maxval; y += this->resize.step_height) { // Draw the rows
|
||||
for (y = r.top + 1; num < maxval; y += this->resize.step_height) { // Draw the rows
|
||||
for (byte i = 0; i < this->num_columns && num < maxval; i++, num++) {
|
||||
/* Draw all vehicles in the current row */
|
||||
const Vehicle *v = this->vehicle_list[num];
|
||||
@@ -682,7 +680,6 @@ struct DepotWindow : Window {
|
||||
int base_width = this->count_width + this->header_width;
|
||||
|
||||
resize->height = max<uint>(GetVehicleImageCellSize(this->type, EIT_IN_DEPOT).height, min_height);
|
||||
resize->height = GetMinSizing(NWST_STEP, resize->height);
|
||||
if (this->type == VEH_TRAIN) {
|
||||
resize->width = 1;
|
||||
size->width = base_width + 2 * ScaleGUITrad(29); // about 2 parts
|
||||
|
||||
103
src/dock_gui.cpp
103
src/dock_gui.cpp
@@ -27,7 +27,6 @@
|
||||
#include "hotkeys.h"
|
||||
#include "gui.h"
|
||||
#include "zoom_func.h"
|
||||
#include "build_confirmation_func.h"
|
||||
|
||||
#include "widgets/dock_widget.h"
|
||||
|
||||
@@ -101,12 +100,11 @@ struct BuildDocksToolbarWindow : Window {
|
||||
this->last_clicked_widget = WID_DT_INVALID;
|
||||
this->InitNested(window_number);
|
||||
this->OnInvalidateData();
|
||||
if (_settings_client.gui.link_terraform_toolbar || _settings_client.gui.compact_vertical_toolbar) ShowTerraformToolbar();
|
||||
if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
|
||||
}
|
||||
|
||||
~BuildDocksToolbarWindow()
|
||||
{
|
||||
if (_thd.GetCallbackWnd() == this) this->OnPlaceObjectAbort();
|
||||
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
|
||||
}
|
||||
|
||||
@@ -148,7 +146,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||
|
||||
case WID_DT_DEPOT: // Build depot button
|
||||
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
||||
if (HandlePlacePushButton(this, WID_DT_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT | HT_SCROLL_VIEWPORT)) ShowBuildDocksDepotPicker(this);
|
||||
if (HandlePlacePushButton(this, WID_DT_DEPOT, SPR_CURSOR_SHIP_DEPOT, HT_RECT)) ShowBuildDocksDepotPicker(this);
|
||||
break;
|
||||
|
||||
case WID_DT_STATION: // Build station button
|
||||
@@ -158,7 +156,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||
|
||||
case WID_DT_BUOY: // Build buoy button
|
||||
if (!CanBuildVehicleInfrastructure(VEH_SHIP)) return;
|
||||
HandlePlacePushButton(this, WID_DT_BUOY, SPR_CURSOR_BUOY, HT_RECT | HT_SCROLL_VIEWPORT);
|
||||
HandlePlacePushButton(this, WID_DT_BUOY, SPR_CURSOR_BUOY, HT_RECT);
|
||||
break;
|
||||
|
||||
case WID_DT_RIVER: // Build river button (in scenario editor)
|
||||
@@ -183,22 +181,33 @@ struct BuildDocksToolbarWindow : Window {
|
||||
break;
|
||||
|
||||
case WID_DT_LOCK: // Build lock button
|
||||
/* Reuse DDSP_REMOVE_TRUCKSTOP. */
|
||||
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_REMOVE_TRUCKSTOP);
|
||||
DoCommandP(tile, 0, 0, CMD_BUILD_LOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_LOCKS), CcBuildDocks);
|
||||
break;
|
||||
|
||||
case WID_DT_DEMOLISH: // Demolish aka dynamite button
|
||||
PlaceProc_DemolishArea(tile);
|
||||
break;
|
||||
|
||||
case WID_DT_DEPOT: // Build depot button
|
||||
DoCommandP(tile, _ship_depot_direction, 0, CMD_BUILD_SHIP_DEPOT | CMD_MSG(STR_ERROR_CAN_T_BUILD_SHIP_DEPOT), CcBuildDocks);
|
||||
break;
|
||||
|
||||
case WID_DT_STATION: { // Build station button
|
||||
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_BUILD_STATION);
|
||||
uint32 p2 = (uint32)INVALID_STATION << 16; // no station to join
|
||||
|
||||
/* tile is always the land tile, so need to evaluate _thd.pos */
|
||||
CommandContainer cmdcont = { tile, _ctrl_pressed, p2, CMD_BUILD_DOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_DOCK_HERE), CcBuildDocks, "" };
|
||||
|
||||
/* Determine the watery part of the dock. */
|
||||
DiagDirection dir = GetInclinedSlopeDirection(GetTileSlope(tile));
|
||||
TileIndex tile_to = (dir != INVALID_DIAGDIR ? TileAddByDiagDir(tile, ReverseDiagDir(dir)) : tile);
|
||||
|
||||
ShowSelectStationIfNeeded(cmdcont, TileArea(tile, tile_to));
|
||||
break;
|
||||
}
|
||||
|
||||
case WID_DT_DEPOT: // Build depot button
|
||||
case WID_DT_BUOY: // Build buoy button
|
||||
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_SINGLE_TILE);
|
||||
DoCommandP(tile, 0, 0, CMD_BUILD_BUOY | CMD_MSG(STR_ERROR_CAN_T_POSITION_BUOY_HERE), CcBuildDocks);
|
||||
break;
|
||||
|
||||
case WID_DT_RIVER: // Build river button (in scenario editor)
|
||||
@@ -206,26 +215,16 @@ struct BuildDocksToolbarWindow : Window {
|
||||
break;
|
||||
|
||||
case WID_DT_BUILD_AQUEDUCT: // Build aqueduct button
|
||||
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_BUILD_BRIDGE);
|
||||
DoCommandP(tile, GetOtherAqueductEnd(tile), TRANSPORT_WATER << 15, CMD_BUILD_BRIDGE | CMD_MSG(STR_ERROR_CAN_T_BUILD_AQUEDUCT_HERE), CcBuildBridge);
|
||||
break;
|
||||
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
MoveAllWindowsOffScreen();
|
||||
}
|
||||
|
||||
virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
|
||||
{
|
||||
switch (last_clicked_widget) {
|
||||
case WID_DT_BUILD_AQUEDUCT:
|
||||
case WID_DT_LOCK:
|
||||
case WID_DT_STATION:
|
||||
this->OnPlacePresize(pt, TileVirtXY(pt.x, pt.y));
|
||||
break;
|
||||
default:
|
||||
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
|
||||
break;
|
||||
}
|
||||
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
|
||||
}
|
||||
|
||||
virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
|
||||
@@ -241,73 +240,24 @@ struct BuildDocksToolbarWindow : Window {
|
||||
case DDSP_CREATE_RIVER:
|
||||
DoCommandP(end_tile, start_tile, WATER_CLASS_RIVER, CMD_BUILD_CANAL | CMD_MSG(STR_ERROR_CAN_T_PLACE_RIVERS), CcPlaySound_SPLAT_WATER);
|
||||
break;
|
||||
case DDSP_BUILD_STATION: {
|
||||
uint32 p2 = (uint32)INVALID_STATION << 16; // no station to join
|
||||
|
||||
/* Tile is always the land tile, so need to evaluate _thd.pos. */
|
||||
CommandContainer cmdcont = { start_tile, _ctrl_pressed, p2, CMD_BUILD_DOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_DOCK_HERE), CcBuildDocks, "" };
|
||||
|
||||
//SetObjectToPlace(SPR_CURSOR_DOCK, PAL_NONE, HT_SPECIAL, this->window_class, this->window_number);
|
||||
ShowSelectStationIfNeeded(cmdcont, TileArea(start_tile, end_tile));
|
||||
VpStartPreSizing();
|
||||
break;
|
||||
}
|
||||
|
||||
case DDSP_BUILD_BRIDGE:
|
||||
DoCommandP(start_tile, GetOtherAqueductEnd(start_tile), TRANSPORT_WATER << 15, CMD_BUILD_BRIDGE | CMD_MSG(STR_ERROR_CAN_T_BUILD_AQUEDUCT_HERE), CcBuildBridge);
|
||||
VpStartPreSizing();
|
||||
break;
|
||||
|
||||
case DDSP_REMOVE_TRUCKSTOP: { // Reusing for locks.
|
||||
TileIndex middle_tile = start_tile;
|
||||
if (start_tile != end_tile) middle_tile = TileAddByDiagDir(start_tile, DiagdirBetweenTiles(start_tile, end_tile));
|
||||
DoCommandP(middle_tile, 0, 0, CMD_BUILD_LOCK | CMD_MSG(STR_ERROR_CAN_T_BUILD_LOCKS), CcBuildDocks);
|
||||
VpStartPreSizing();
|
||||
break;
|
||||
}
|
||||
|
||||
case DDSP_SINGLE_TILE:
|
||||
assert(start_tile == end_tile);
|
||||
switch (last_clicked_widget) {
|
||||
case WID_DT_BUOY:
|
||||
DoCommandP(end_tile, 0, 0, CMD_BUILD_BUOY | CMD_MSG(STR_ERROR_CAN_T_POSITION_BUOY_HERE), CcBuildDocks);
|
||||
break;
|
||||
case WID_DT_DEPOT: // Build depot button
|
||||
DoCommandP(end_tile, _ship_depot_direction, 0, CMD_BUILD_SHIP_DEPOT | CMD_MSG(STR_ERROR_CAN_T_BUILD_SHIP_DEPOT), CcBuildDocks);
|
||||
break;
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
|
||||
default: break;
|
||||
}
|
||||
MoveAllHiddenWindowsBackToScreen();
|
||||
}
|
||||
}
|
||||
|
||||
virtual void OnPlaceObjectAbort()
|
||||
{
|
||||
MoveAllHiddenWindowsBackToScreen();
|
||||
this->RaiseButtons();
|
||||
|
||||
if (ConfirmationWindowShown() && _ctrl_pressed) return;
|
||||
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
|
||||
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
|
||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||
}
|
||||
|
||||
virtual void SelectLastTool()
|
||||
{
|
||||
// User misplaced something - activate last selected tool again
|
||||
if (this->last_clicked_widget == WIDGET_LIST_END)
|
||||
return;
|
||||
Point dummy = {0, 0};
|
||||
this->RaiseWidget(this->last_clicked_widget);
|
||||
this->OnClick(dummy, this->last_clicked_widget, 0);
|
||||
DeleteWindowByClass(WC_BUILD_BRIDGE);
|
||||
}
|
||||
|
||||
virtual void OnPlacePresize(Point pt, TileIndex tile_from)
|
||||
{
|
||||
if (!IsValidTile(tile_from)) return;
|
||||
TileIndex tile_to = tile_from;
|
||||
|
||||
if (this->last_clicked_widget == WID_DT_BUILD_AQUEDUCT) {
|
||||
@@ -397,7 +347,7 @@ Window *ShowBuildDocksToolbar()
|
||||
{
|
||||
if (!Company::IsValidID(_local_company)) return NULL;
|
||||
|
||||
DeleteToolbarLinkedWindows();
|
||||
DeleteWindowByClass(WC_BUILD_TOOLBAR);
|
||||
return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_toolbar_desc, TRANSPORT_WATER);
|
||||
}
|
||||
|
||||
@@ -423,7 +373,7 @@ static const NWidgetPart _nested_build_docks_scen_toolbar_widgets[] = {
|
||||
|
||||
/** Window definition for the build docks in scenario editor window. */
|
||||
static WindowDesc _build_docks_scen_toolbar_desc(
|
||||
WDP_ALIGN_TOOLBAR, "toolbar_water_scen", 0, 0,
|
||||
WDP_AUTO, "toolbar_water_scen", 0, 0,
|
||||
WC_SCEN_BUILD_TOOLBAR, WC_NONE,
|
||||
WDF_CONSTRUCTION,
|
||||
_nested_build_docks_scen_toolbar_widgets, lengthof(_nested_build_docks_scen_toolbar_widgets)
|
||||
@@ -436,7 +386,6 @@ static WindowDesc _build_docks_scen_toolbar_desc(
|
||||
*/
|
||||
Window *ShowBuildDocksScenToolbar()
|
||||
{
|
||||
DeleteToolbarLinkedWindows();
|
||||
return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_scen_toolbar_desc, TRANSPORT_WATER);
|
||||
}
|
||||
|
||||
@@ -607,10 +556,10 @@ static const NWidgetPart _nested_build_docks_depot_widgets[] = {
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 3),
|
||||
NWidget(NWID_HORIZONTAL_LTR),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(3, 0),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_X), SetSizingType(NWST_BUTTON), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_X), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(2, 0),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_Y), SetSizingType(NWST_BUTTON), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_BDD_Y), SetMinimalSize(98, 66), SetDataTip(0x0, STR_DEPOT_BUILD_SHIP_ORIENTATION_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(3, 0),
|
||||
EndContainer(),
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
char *_ini_videodriver; ///< The video driver a stored in the configuration file.
|
||||
int _num_resolutions; ///< The number of resolutions.
|
||||
Dimension _resolutions[100]; ///< List of resolutions.
|
||||
Dimension _resolutions[32]; ///< List of resolutions.
|
||||
Dimension _cur_resolution; ///< The current resolution.
|
||||
bool _rightclick_emulate; ///< Whether right clicking is emulated.
|
||||
|
||||
|
||||
@@ -572,8 +572,10 @@ static void CompanyCheckBankrupt(Company *c)
|
||||
{
|
||||
/* If the company has money again, it does not go bankrupt */
|
||||
if (c->money - c->current_loan >= -_economy.max_loan) {
|
||||
int previous_months_of_bankruptcy = CeilDiv(c->months_of_bankruptcy, 3);
|
||||
c->months_of_bankruptcy = 0;
|
||||
c->bankrupt_asked = 0;
|
||||
if (previous_months_of_bankruptcy != 0) CompanyAdminUpdate(c);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -642,10 +644,15 @@ static void CompanyCheckBankrupt(Company *c)
|
||||
* that changing the current company is okay. In case of single
|
||||
* player we are sure (the above check) that we are not the local
|
||||
* company and thus we won't be moved. */
|
||||
if (!_networking || _network_server) DoCommandP(0, CCA_DELETE | (c->index << 16) | (CRR_BANKRUPT << 24), 0, CMD_COMPANY_CTRL);
|
||||
if (!_networking || _network_server) {
|
||||
DoCommandP(0, CCA_DELETE | (c->index << 16) | (CRR_BANKRUPT << 24), 0, CMD_COMPANY_CTRL);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (CeilDiv(c->months_of_bankruptcy, 3) != CeilDiv(c->months_of_bankruptcy - 1, 3)) CompanyAdminUpdate(c);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1705,9 +1712,7 @@ static void LoadUnloadVehicle(Vehicle *front)
|
||||
}
|
||||
}
|
||||
|
||||
if (payment != NULL) {
|
||||
amount_unloaded = v->cargo.Unload(amount_unloaded, &ge->cargo, payment);
|
||||
}
|
||||
amount_unloaded = v->cargo.Unload(amount_unloaded, &ge->cargo, payment);
|
||||
remaining = v->cargo.UnloadCount() > 0;
|
||||
if (amount_unloaded > 0) {
|
||||
dirty_vehicle = true;
|
||||
|
||||
@@ -37,10 +37,7 @@ static const NWidgetPart _nested_errmsg_widgets[] = {
|
||||
NWidget(WWT_CAPTION, COLOUR_RED, WID_EM_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION, STR_NULL),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_RED),
|
||||
NWidget(WWT_TEXT, COLOUR_RED), SetDataTip(STR_EMPTY, STR_NULL), // Add some borders
|
||||
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_MESSAGE), SetPadding(4, 4, 4, 4), SetMinimalSize(236, 32),
|
||||
NWidget(WWT_TEXT, COLOUR_RED), SetDataTip(STR_EMPTY, STR_NULL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_RED, WID_EM_CLOSE), SetPadding(4, 4, 4, 4), SetDataTip(STR_BUTTON_OK, STR_NULL),
|
||||
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_MESSAGE), SetPadding(0, 2, 0, 2), SetMinimalSize(236, 32),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
@@ -57,13 +54,10 @@ static const NWidgetPart _nested_errmsg_face_widgets[] = {
|
||||
NWidget(WWT_CAPTION, COLOUR_RED, WID_EM_CAPTION), SetDataTip(STR_ERROR_MESSAGE_CAPTION_OTHER_COMPANY, STR_NULL),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_RED),
|
||||
NWidget(WWT_TEXT, COLOUR_RED), SetDataTip(STR_EMPTY, STR_NULL), // Add some borders
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(2, 1, 2),
|
||||
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_FACE), SetMinimalSize(92, 119), SetFill(0, 1), SetPadding(4, 4, 4, 4),
|
||||
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_MESSAGE), SetFill(0, 1), SetMinimalSize(238, 123), SetPadding(4, 4, 4, 4),
|
||||
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_FACE), SetMinimalSize(92, 119), SetFill(0, 1), SetPadding(2, 0, 1, 0),
|
||||
NWidget(WWT_EMPTY, COLOUR_RED, WID_EM_MESSAGE), SetFill(0, 1), SetMinimalSize(238, 123),
|
||||
EndContainer(),
|
||||
NWidget(WWT_TEXT, COLOUR_RED), SetDataTip(STR_EMPTY, STR_NULL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_RED, WID_EM_CLOSE), SetPadding(4, 4, 4, 4), SetDataTip(STR_BUTTON_OK, STR_NULL),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
@@ -326,18 +320,6 @@ public:
|
||||
return ES_HANDLED;
|
||||
}
|
||||
|
||||
virtual void OnClick(Point pt, int widget, int click_count)
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_EM_CLOSE:
|
||||
delete this;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the currently shown error message was critical or not.
|
||||
* @return True iff the message was critical.
|
||||
|
||||
@@ -292,11 +292,7 @@ static const char * const _subdirs[] = {
|
||||
"ai" PATHSEP "library" PATHSEP,
|
||||
"game" PATHSEP,
|
||||
"game" PATHSEP "library" PATHSEP,
|
||||
#ifdef __ANDROID__
|
||||
"screenshot" PATHSEP,
|
||||
#else
|
||||
"screenshot" PATHSEP,
|
||||
#endif
|
||||
};
|
||||
assert_compile(lengthof(_subdirs) == NUM_SUBDIRS);
|
||||
|
||||
@@ -1283,21 +1279,6 @@ void DeterminePaths(const char *exe)
|
||||
_searchpaths[SP_AUTODOWNLOAD_DIR] = NULL;
|
||||
}
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
#ifdef __ANDROID__
|
||||
// Copy savegames from "full" OpenTTD to "lite" save directory
|
||||
char curdir[PATH_MAX];
|
||||
if (getcwd(curdir, sizeof(curdir)) && strstr(curdir, "org.openttd.sdl.lowmem")) {
|
||||
// No, I won't implement file copying in C, shell script is just fine for this job
|
||||
DEBUG(misc, 1, "Copying savegames from ../../org.openttd.sdl/files/.openttd/save to %s", curdir);
|
||||
system("cd ../../org.openttd.sdl/files/.openttd/save && "
|
||||
"for F in *.sav ; do "
|
||||
"ls \"../../../../org.openttd.sdl.lowmem/files/.openttd/save/$F\" || "
|
||||
"cat \"$F\" > \"../../../../org.openttd.sdl.lowmem/files/.openttd/save/$F\" ; "
|
||||
"done");
|
||||
chdir(curdir);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,15 +36,11 @@
|
||||
#include "table/strings.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
#ifdef __ANDROID__
|
||||
#include <SDL_android.h>
|
||||
#endif
|
||||
|
||||
LoadCheckData _load_check_data; ///< Data loaded from save during SL_LOAD_CHECK.
|
||||
|
||||
static bool _fios_path_changed;
|
||||
static bool _savegame_sort_dirty;
|
||||
static const char *NETWORK_SAVE_FILENAME = "network-save.sav";
|
||||
|
||||
|
||||
/**
|
||||
@@ -125,9 +121,6 @@ static const NWidgetPart _nested_load_dialog_widgets[] = {
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_NEWGRF_INFO), SetDataTip(STR_INTRO_NEWGRF_SETTINGS, STR_NULL), SetFill(1, 0), SetResize(1, 0),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_LOAD_BUTTON), SetDataTip(STR_SAVELOAD_LOAD_BUTTON, STR_SAVELOAD_LOAD_TOOLTIP), SetFill(1, 0), SetResize(1, 0),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_LOAD_NETWORK_BUTTON), SetDataTip(STR_SAVELOAD_LOAD_NETWORK_BUTTON, STR_SAVELOAD_LOAD_NETWORK_TOOLTIP), SetFill(1, 0), SetResize(1, 0),
|
||||
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -226,7 +219,7 @@ static const NWidgetPart _nested_save_dialog_widgets[] = {
|
||||
NWidget(WWT_PANEL, COLOUR_GREY),
|
||||
NWidget(WWT_EMPTY, INVALID_COLOUR, WID_SL_DETAILS), SetResize(1, 1), SetFill(1, 1),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_SL_SAVE_NETWORK_BUTTON), SetDataTip(STR_SAVELOAD_SAVE_NETWORK_BUTTON, STR_SAVELOAD_SAVE_NETWORK_TOOLTIP), SetFill(1, 1), SetResize(1, 0),
|
||||
NWidget(NWID_SPACER), SetResize(1, 0), SetFill(1, 1),
|
||||
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -364,7 +357,6 @@ public:
|
||||
this->LowerWidget(WID_SL_DRIVES_DIRECTORIES_LIST);
|
||||
this->querystrings[WID_SL_FILTER] = &this->filter_editbox;
|
||||
this->filter_editbox.cancel_button = QueryString::ACTION_CLEAR;
|
||||
if (this->fop == SLO_SAVE) this->SetWidgetLoweredState(WID_SL_SAVE_NETWORK_BUTTON, _settings_client.gui.save_to_network);
|
||||
|
||||
/* pause is only used in single-player, non-editor mode, non-menu mode. It
|
||||
* will be unpaused in the WE_DESTROY event handler. */
|
||||
@@ -458,7 +450,7 @@ public:
|
||||
if (item == this->selected) {
|
||||
GfxFillRect(r.left + 1, y, r.right, y + this->resize.step_height, PC_DARK_BLUE);
|
||||
}
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, Center(y, this->resize.step_height), item->title, _fios_colours[GetDetailedFileType(item->type)]);
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, item->title, _fios_colours[GetDetailedFileType(item->type)]);
|
||||
y += this->resize.step_height;
|
||||
if (y >= this->vscroll->GetCapacity() * this->resize.step_height + r.top + WD_FRAMERECT_TOP) break;
|
||||
}
|
||||
@@ -569,8 +561,8 @@ public:
|
||||
break;
|
||||
|
||||
case WID_SL_DRIVES_DIRECTORIES_LIST:
|
||||
resize->height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL);
|
||||
size->height = resize->height * 5 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
|
||||
resize->height = FONT_HEIGHT_NORMAL;
|
||||
size->height = resize->height * 10 + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
|
||||
break;
|
||||
case WID_SL_SORT_BYNAME:
|
||||
case WID_SL_SORT_BYDATE: {
|
||||
@@ -727,27 +719,6 @@ public:
|
||||
/* Note, this is also called via the OSK; and we need to lower the button. */
|
||||
this->HandleButtonClick(WID_SL_SAVE_GAME);
|
||||
break;
|
||||
|
||||
case WID_SL_SAVE_NETWORK_BUTTON:
|
||||
_settings_client.gui.save_to_network = !_settings_client.gui.save_to_network;
|
||||
this->SetWidgetLoweredState(WID_SL_SAVE_NETWORK_BUTTON, _settings_client.gui.save_to_network);
|
||||
this->SetDirty();
|
||||
break;
|
||||
|
||||
case WID_SL_LOAD_NETWORK_BUTTON: {
|
||||
char savePath[PATH_MAX];
|
||||
FiosMakeSavegameName(savePath, NETWORK_SAVE_FILENAME, lastof(savePath));
|
||||
#ifdef __ANDROID__
|
||||
if (!SDL_ANDROID_CloudLoad(savePath, NULL, "OpenTTD")) {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
_file_to_saveload.SetMode(FIOS_TYPE_FILE);
|
||||
_file_to_saveload.SetName(savePath);
|
||||
_file_to_saveload.SetTitle("Network Save");
|
||||
_switch_mode = SM_LOAD_GAME;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -398,7 +398,7 @@ static void LoadFreeTypeFont(FontSize fs)
|
||||
return;
|
||||
|
||||
found_face:
|
||||
new FreeTypeFontCache(fs, face, RescaleFrom854x480(settings->size));
|
||||
new FreeTypeFontCache(fs, face, settings->size);
|
||||
}
|
||||
|
||||
|
||||
@@ -479,7 +479,7 @@ static void *AllocateFont(size_t size)
|
||||
static bool GetFontAAState(FontSize size)
|
||||
{
|
||||
/* AA is only supported for 32 bpp */
|
||||
if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 32 && BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 16) return false;
|
||||
if (BlitterFactory::GetCurrentBlitter()->GetScreenDepth() != 32) return false;
|
||||
|
||||
switch (size) {
|
||||
default: NOT_REACHED();
|
||||
|
||||
@@ -663,8 +663,7 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
|
||||
if (split != NULL) *split = '\0';
|
||||
|
||||
/* First create a pattern to match the wanted language. */
|
||||
//FcPattern *pat = FcNameParse((FcChar8*)lang);
|
||||
FcPattern *pat = FcPatternCreate();
|
||||
FcPattern *pat = FcNameParse((FcChar8*)lang);
|
||||
/* We only want to know the filename. */
|
||||
FcObjectSet *os = FcObjectSetBuild(FC_FILE, FC_SPACING, FC_SLANT, FC_WEIGHT, NULL);
|
||||
/* Get the list of filenames matching the wanted language. */
|
||||
@@ -677,7 +676,6 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
|
||||
if (fs != NULL) {
|
||||
int best_weight = -1;
|
||||
const char *best_font = NULL;
|
||||
int best_missing_glypths = 65536;
|
||||
|
||||
for (int i = 0; i < fs->nfont; i++) {
|
||||
FcPattern *font = fs->fonts[i];
|
||||
@@ -687,32 +685,28 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
|
||||
if (res != FcResultMatch || file == NULL) {
|
||||
continue;
|
||||
}
|
||||
DEBUG(freetype, 1, "Got font %s", file);
|
||||
int missing = 0;
|
||||
|
||||
/* Get a font with the right spacing .*/
|
||||
int value = 0;
|
||||
FcPatternGetInteger(font, FC_SPACING, 0, &value);
|
||||
if (callback->Monospace() != (value == FC_MONO) && value != FC_DUAL) missing += 1;
|
||||
if (callback->Monospace() != (value == FC_MONO) && value != FC_DUAL) continue;
|
||||
|
||||
/* Do not use those that explicitly say they're slanted. */
|
||||
FcPatternGetInteger(font, FC_SLANT, 0, &value);
|
||||
if (value != 0) missing += 1;
|
||||
if (value != 0) continue;
|
||||
|
||||
/* We want the fatter font as they look better at small sizes. */
|
||||
FcPatternGetInteger(font, FC_WEIGHT, 0, &value);
|
||||
if (value <= best_weight) missing += 1;
|
||||
if (value <= best_weight) continue;
|
||||
|
||||
callback->SetFontNames(settings, (const char*)file);
|
||||
|
||||
missing = callback->FindMissingGlyphs(NULL);
|
||||
DEBUG(freetype, 1, "Font \"%s\" misses %d glyphs for lang %s", file, missing, lang);
|
||||
bool missing = callback->FindMissingGlyphs(NULL);
|
||||
DEBUG(freetype, 1, "Font \"%s\" misses%s glyphs", file, missing ? "" : " no");
|
||||
|
||||
if (missing < best_missing_glypths) {
|
||||
if (!missing) {
|
||||
best_weight = value;
|
||||
best_font = (const char *)file;
|
||||
best_missing_glypths = missing;
|
||||
if (missing == 0) break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,7 +714,6 @@ bool SetFallbackFont(FreeTypeSettings *settings, const char *language_isocode, i
|
||||
ret = true;
|
||||
callback->SetFontNames(settings, best_font);
|
||||
InitFreeType(callback->Monospace());
|
||||
DEBUG(freetype, 1, "Selected font %s for lang %s", best_font, lang);
|
||||
}
|
||||
|
||||
/* Clean up the list of filenames. */
|
||||
|
||||
@@ -308,7 +308,7 @@ GameStrings *LoadTranslations()
|
||||
/** Compile the language. */
|
||||
void GameStrings::Compile()
|
||||
{
|
||||
StringData data(1);
|
||||
StringData data(32);
|
||||
StringListReader master_reader(data, this->raw_strings[0], true, false);
|
||||
master_reader.ParseFile();
|
||||
if (_errors != 0) throw std::exception();
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "saveload/saveload.h"
|
||||
#include "progress.h"
|
||||
#include "error.h"
|
||||
#include "settings_gui.h"
|
||||
|
||||
#include "widgets/genworld_widget.h"
|
||||
|
||||
@@ -64,43 +63,47 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_BROWN),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 10),
|
||||
/* Landscape selection. */
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(10, 0, 10),
|
||||
NWidget(NWID_SPACER), SetFill(1, 0),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TEMPERATE), SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 0),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_ARCTIC), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 0),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TROPICAL), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 0),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TOYLAND), SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 11),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(10, 5, 10),
|
||||
/* Landscape selection. */
|
||||
NWidget(NWID_VERTICAL), SetPIP(10, 0, 10),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TEMPERATE), SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_ARCTIC), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TROPICAL), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_GL_TOYLAND), SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(20, 0),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, 3, 0),
|
||||
/* Left column with labels. */
|
||||
NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_MAPSIZE, STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_BY, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_LAND_GENERATOR, STR_NULL), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NUMBER_OF_TOWNS, STR_NULL), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_TERRAIN_TYPE, STR_NULL), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_VARIETY, STR_NULL), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_QUANTITY_OF_SEA_LAKES, STR_NULL), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_TREE_PLACER, STR_NULL), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_BORDER_TYPE, STR_NULL), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
/* Widgets at the right of the labels. */
|
||||
NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0),
|
||||
/* Mapsize X * Y. */
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_MAPSIZE_X_PULLDOWN), SetDataTip(STR_JUST_INT, STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_MAPSIZE_Y_PULLDOWN), SetDataTip(STR_JUST_INT, STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 0),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, 4, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_MAPSIZE_X_PULLDOWN), SetDataTip(STR_JUST_INT, STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 0),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_BY, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(1, 1),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_MAPSIZE_Y_PULLDOWN), SetDataTip(STR_JUST_INT, STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_LANDSCAPE_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_TOWN_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_TERRAIN_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_VARIETY_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_WATER_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_TREE_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_BORDERS_RANDOM), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, 4, 0),
|
||||
@@ -112,7 +115,6 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NUMBER_OF_INDUSTRIES, STR_NULL), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SMOOTHNESS, STR_NULL), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_QUANTITY_OF_RIVERS, STR_NULL), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_BORDER_TYPE, STR_NULL), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPIP(0, 4, 0),
|
||||
/* Max. heightlevel. */
|
||||
@@ -136,7 +138,6 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_INDUSTRY_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_SMOOTHNESS_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_ORANGE, WID_GL_RIVER_PULLDOWN), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_BORDERS_RANDOM), SetDataTip(STR_JUST_STRING, STR_NULL), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREEN, WID_GL_GENERATE_BUTTON), SetMinimalSize(84, 0), SetDataTip(STR_MAPGEN_GENERATE, STR_NULL), SetFill(1, 1),
|
||||
@@ -145,12 +146,30 @@ static const NWidgetPart _nested_generate_landscape_widgets[] = {
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 4),
|
||||
/* Map borders buttons for each edge. */
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(10, 0, 10),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, 0, 3),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NORTHWEST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1),
|
||||
EndContainer(),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_WATER_NW), SetDataTip(STR_JUST_STRING, STR_MAPGEN_NORTHWEST), SetFill(1, 1),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_WATER_NE), SetDataTip(STR_JUST_STRING, STR_MAPGEN_NORTHEAST), SetFill(1, 1),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(3, 0, 0),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_NORTHEAST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPIP(10, 0, 10),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, 0, 3),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SOUTHWEST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1),
|
||||
EndContainer(),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_WATER_SW), SetDataTip(STR_JUST_STRING, STR_MAPGEN_SOUTHWEST), SetFill(1, 1),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_ORANGE, WID_GL_WATER_SE), SetDataTip(STR_JUST_STRING, STR_MAPGEN_SOUTHEAST), SetFill(1, 1),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(3, 0, 0),
|
||||
NWidget(WWT_TEXT, COLOUR_ORANGE), SetDataTip(STR_MAPGEN_SOUTHEAST, STR_NULL), SetPadding(1, 0, 0, 0), SetFill(0, 1),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 10),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 9), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
};
|
||||
|
||||
@@ -439,7 +458,6 @@ struct GenerateLandscapeWindow : public Window {
|
||||
case WID_GL_MAPSIZE_Y_PULLDOWN:
|
||||
SetDParamMaxValue(0, MAX_MAP_SIZE);
|
||||
*size = maxdim(*size, GetStringBoundingBox(STR_JUST_INT));
|
||||
size->width = size->width + GetMinSizing(NWST_BUTTON);
|
||||
break;
|
||||
|
||||
case WID_GL_SNOW_LEVEL_TEXT:
|
||||
@@ -450,8 +468,7 @@ struct GenerateLandscapeWindow : public Window {
|
||||
case WID_GL_HEIGHTMAP_SIZE_TEXT:
|
||||
SetDParam(0, this->x);
|
||||
SetDParam(1, this->y);
|
||||
//*size = maxdim(*size, GetStringBoundingBox(STR_MAPGEN_HEIGHTMAP_SIZE));
|
||||
size->height = SETTING_BUTTON_HEIGHT;
|
||||
*size = maxdim(*size, GetStringBoundingBox(STR_MAPGEN_HEIGHTMAP_SIZE));
|
||||
break;
|
||||
|
||||
case WID_GL_TOWN_PULLDOWN:
|
||||
@@ -475,19 +492,18 @@ struct GenerateLandscapeWindow : public Window {
|
||||
case WID_GL_VARIETY_PULLDOWN: strs = _variety; break;
|
||||
case WID_GL_HEIGHTMAP_ROTATION_PULLDOWN: strs = _rotation; break;
|
||||
case WID_GL_BORDERS_RANDOM:
|
||||
//*size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOMIZE), GetStringBoundingBox(STR_MAPGEN_BORDER_MANUAL));
|
||||
*size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOMIZE), GetStringBoundingBox(STR_MAPGEN_BORDER_MANUAL));
|
||||
break;
|
||||
|
||||
case WID_GL_WATER_NE:
|
||||
case WID_GL_WATER_NW:
|
||||
case WID_GL_WATER_SE:
|
||||
case WID_GL_WATER_SW:
|
||||
//*size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOM), maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_WATER), GetStringBoundingBox(STR_MAPGEN_BORDER_FREEFORM)));
|
||||
*size = maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_RANDOM), maxdim(GetStringBoundingBox(STR_MAPGEN_BORDER_WATER), GetStringBoundingBox(STR_MAPGEN_BORDER_FREEFORM)));
|
||||
break;
|
||||
|
||||
case WID_GL_HEIGHTMAP_NAME_TEXT:
|
||||
size->width = 0;
|
||||
size->height = SETTING_BUTTON_HEIGHT;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -931,9 +947,7 @@ struct CreateScenarioWindow : public Window
|
||||
}
|
||||
*size = maxdim(*size, GetStringBoundingBox(str));
|
||||
size->width += padding.width;
|
||||
size->width = GetMinSizing(NWST_BUTTON, size->width);
|
||||
size->height += padding.height;
|
||||
size->height = GetMinSizing(NWST_BUTTON, size->height);
|
||||
}
|
||||
|
||||
virtual void OnClick(Point pt, int widget, int click_count)
|
||||
@@ -1052,16 +1066,11 @@ static const NWidgetPart _nested_create_scenario_widgets[] = {
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 10),
|
||||
/* Landscape style selection. */
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(10, 3, 10),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TEMPERATE), SetDataTip(SPR_SELECT_TEMPERATE, STR_INTRO_TOOLTIP_TEMPERATE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_ARCTIC), SetDataTip(SPR_SELECT_SUB_ARCTIC, STR_INTRO_TOOLTIP_SUB_ARCTIC_LANDSCAPE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TROPICAL), SetDataTip(SPR_SELECT_SUB_TROPICAL, STR_INTRO_TOOLTIP_SUB_TROPICAL_LANDSCAPE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
NWidget(WWT_IMGBTN_2, COLOUR_ORANGE, WID_CS_TOYLAND), SetDataTip(SPR_SELECT_TOYLAND, STR_INTRO_TOOLTIP_TOYLAND_LANDSCAPE),
|
||||
NWidget(NWID_SPACER), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(10, 8, 10),
|
||||
/* Green generation type buttons: 'Flat land' and 'Random land'. */
|
||||
NWidget(NWID_VERTICAL), SetPIP(10, 6, 10),
|
||||
|
||||
152
src/gfx.cpp
152
src/gfx.cpp
@@ -35,19 +35,14 @@ byte _support8bpp;
|
||||
CursorVars _cursor;
|
||||
bool _ctrl_pressed; ///< Is Ctrl pressed?
|
||||
bool _shift_pressed; ///< Is Shift pressed?
|
||||
bool _move_pressed;
|
||||
|
||||
byte _fast_forward;
|
||||
bool _left_button_down; ///< Is left mouse button pressed?
|
||||
bool _left_button_clicked; ///< Is left mouse button clicked?
|
||||
bool _right_button_down; ///< Is right mouse button pressed?
|
||||
bool _right_button_clicked; ///< Is right mouse button clicked?
|
||||
Point _right_button_down_pos; ///< Pos of right mouse button click, for drag and drop
|
||||
|
||||
DrawPixelInfo _screen;
|
||||
bool _screen_disable_anim = false; ///< Disable palette animation (important for 32bpp-anim blitter during giant screenshot)
|
||||
bool _exit_game;
|
||||
bool _restart_game;
|
||||
GameMode _game_mode;
|
||||
SwitchMode _switch_mode; ///< The next mainloop command.
|
||||
PauseModeByte _pause_mode;
|
||||
@@ -854,50 +849,6 @@ void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a sprite, centered at x:y, not in a viewport
|
||||
* @param img Image number to draw
|
||||
* @param pal Palette to use.
|
||||
* @param x Left coordinate of image in pixels
|
||||
* @param y Top coordinate of image in pixels
|
||||
* @param sub If available, draw only specified part of the sprite
|
||||
* @param zoom Zoom level of sprite
|
||||
*/
|
||||
void DrawSpriteCentered(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub, ZoomLevel zoom)
|
||||
{
|
||||
Dimension size = GetSpriteSize(img, NULL, zoom);
|
||||
DrawSprite(img, pal, x - size.width / 2, y - size.height / 2, sub, zoom);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a sprite, centered in rect, not in a viewport
|
||||
* @param img Image number to draw
|
||||
* @param pal Palette to use.
|
||||
* @param left Left coordinate of image bounding box in pixels
|
||||
* @param top Top coordinate of image bounding box in pixels
|
||||
* @param right Right coordinate of image bounding box in pixels
|
||||
* @param bottom Bottom coordinate of image bounding box in pixels
|
||||
* @param sub If available, draw only specified part of the sprite
|
||||
* @param zoom Zoom level of sprite
|
||||
*/
|
||||
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, int left, int top, int right, int bottom, const SubSprite *sub, ZoomLevel zoom)
|
||||
{
|
||||
DrawSpriteCentered(img, pal, (left + right) / 2, (top + bottom) / 2, sub, zoom);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw a sprite, centered in rect, not in a viewport
|
||||
* @param img Image number to draw
|
||||
* @param pal Palette to use.
|
||||
* @param rect Image bounding box in pixels
|
||||
* @param sub If available, draw only specified part of the sprite
|
||||
* @param zoom Zoom level of sprite
|
||||
*/
|
||||
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, const Rect &rect, const SubSprite *sub, ZoomLevel zoom)
|
||||
{
|
||||
DrawSpriteCenteredRect(img, pal, rect.left, rect.top, rect.right, rect.bottom, sub, zoom);
|
||||
}
|
||||
|
||||
/**
|
||||
* The code for setting up the blitter mode and sprite information before finally drawing the sprite.
|
||||
* @param sprite The sprite to draw.
|
||||
@@ -1249,8 +1200,6 @@ void ScreenSizeChanged()
|
||||
|
||||
/* screen size changed and the old bitmap is invalid now, so we don't want to undraw it */
|
||||
_cursor.visible = false;
|
||||
|
||||
CheckWindowMinSizings();
|
||||
}
|
||||
|
||||
void UndrawMouseCursor()
|
||||
@@ -1763,104 +1712,3 @@ void SortResolutions(int count)
|
||||
{
|
||||
QSortT(_resolutions, count, &compare_res);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the initial value for a margin, after telling where are the left and right margins and where we want to draw/write (begining/end of line)
|
||||
* @param left is the left margin of the horizontal space we want to draw to
|
||||
* @param right: right margin
|
||||
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
|
||||
* @return the margin we asked
|
||||
*/
|
||||
int InitTempMargin(int left, int right, bool to_end_line)
|
||||
{
|
||||
return to_end_line ^ (_current_text_dir == TD_RTL) ? right :left;
|
||||
}
|
||||
|
||||
/**
|
||||
* Consumes a space in an horizontal margin
|
||||
* @param space: amount of space used
|
||||
* @param here: the margin where to add the space
|
||||
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
|
||||
*/
|
||||
void AddSpace(int space, int &here, bool to_end_line)
|
||||
{
|
||||
here += to_end_line ^ (_current_text_dir == TD_RTL) ? -space : space;
|
||||
}
|
||||
|
||||
/**
|
||||
* After drawing something, update a margin
|
||||
* @param end is where we ended drawing (usually the return value of a DrawString function)
|
||||
* @param margin is the margin we want to update
|
||||
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
|
||||
*/
|
||||
void UpdateMarginEnd(int end, int &margin, bool to_end_line)
|
||||
{
|
||||
margin = to_end_line ^ (_current_text_dir == TD_RTL) ? min(end, margin) : max(end, margin);
|
||||
}
|
||||
|
||||
/**
|
||||
* After drawing something, horizontal margins are updated
|
||||
* @param end: last position drawn
|
||||
* @param left is the left margin of the horizontal space drawn
|
||||
* @param right: right margin
|
||||
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
|
||||
*/
|
||||
void UpdateMarginsEnd(int end, int &left, int &right, bool to_end_line)
|
||||
{
|
||||
if (to_end_line ^ (_current_text_dir == TD_RTL)) {
|
||||
right = end;
|
||||
} else {
|
||||
left = end;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* After drawing something of a certain width, update margins
|
||||
* @param width: used space
|
||||
* @param initial left margin
|
||||
* @param initial right margin
|
||||
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
|
||||
*/
|
||||
void UpdateMarginsWidth(int width, int &left, int &right, bool to_end_line)
|
||||
{
|
||||
if (to_end_line ^ (_current_text_dir == TD_RTL)) {
|
||||
right -= width;
|
||||
} else {
|
||||
left += width;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws a string in a delimited space; temporal margin gets updated
|
||||
* @param left is the left margin of the horizontal space we want to draw to
|
||||
* @param right: right margin of the horizontal space we want to draw to
|
||||
* @param top: vertical position
|
||||
* @param margin keeps the most extreme limit used of the line (this should be previously initialized with InitTempLimit)
|
||||
* @param string to draw
|
||||
* @param colour for the string
|
||||
* @param alignment of the string (only left or right alignment)
|
||||
* @param underline
|
||||
*/
|
||||
void DrawString2(int left, int right, int top, int &margin, StringID str, TextColour colour, StringAlignment align, bool underline)
|
||||
{
|
||||
int end = DrawString(left, right, top, str, colour, align, underline);
|
||||
UpdateMarginEnd(end, margin, align == SA_RIGHT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws a sprite in a delimited space; temporal margin gets updated
|
||||
* @param width of the sprite
|
||||
* @param left is the left margin of the horizontal space we want to draw to
|
||||
* @param right: right margin of the horizontal space
|
||||
* @param top: vertical position
|
||||
* @param margin keeps the most extreme limit used of the line (this should be previously initialized with InitTempLimit)
|
||||
* @param sprite
|
||||
* @param palette
|
||||
* @param to_end_line: 0 if working at the begining of the line, 1 if working at the end
|
||||
*/
|
||||
void DrawSprite2(int width, int left, int right, int top, int &margin, SpriteID img, PaletteID pal, bool to_end_line, SubSprite *sub)
|
||||
{
|
||||
DrawSprite(img, pal, to_end_line ^ (_current_text_dir == TD_RTL) ? right - width : left, top, sub);
|
||||
margin = to_end_line ^ (_current_text_dir == TD_RTL) ? min(right - width, margin): max(margin, left + width);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
#include "gfx_type.h"
|
||||
#include "strings_type.h"
|
||||
#include "string_type.h"
|
||||
#include "core/math_func.hpp"
|
||||
|
||||
void GameLoop();
|
||||
|
||||
@@ -57,21 +56,18 @@ extern byte _support8bpp;
|
||||
extern CursorVars _cursor;
|
||||
extern bool _ctrl_pressed; ///< Is Ctrl pressed?
|
||||
extern bool _shift_pressed; ///< Is Shift pressed?
|
||||
extern bool _move_pressed;
|
||||
|
||||
extern byte _fast_forward;
|
||||
|
||||
extern bool _left_button_down;
|
||||
extern bool _left_button_clicked;
|
||||
extern bool _right_button_down;
|
||||
extern bool _right_button_clicked;
|
||||
extern Point _right_button_down_pos;
|
||||
|
||||
extern DrawPixelInfo _screen;
|
||||
extern bool _screen_disable_anim; ///< Disable palette animation (important for 32bpp-anim blitter during giant screenshot)
|
||||
|
||||
extern int _num_resolutions;
|
||||
extern Dimension _resolutions[100];
|
||||
extern Dimension _resolutions[32];
|
||||
extern Dimension _cur_resolution;
|
||||
extern Palette _cur_palette; ///< Current palette
|
||||
|
||||
@@ -96,9 +92,6 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo);
|
||||
Dimension GetSpriteSize(SpriteID sprid, Point *offset = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
|
||||
void DrawSpriteViewport(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL);
|
||||
void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
|
||||
void DrawSpriteCentered(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
|
||||
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, int left, int top, int right, int bottom, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
|
||||
void DrawSpriteCenteredRect(SpriteID img, PaletteID pal, const Rect &r, const SubSprite *sub = NULL, ZoomLevel zoom = ZOOM_LVL_GUI);
|
||||
|
||||
/** How to align the to-be drawn text. */
|
||||
enum StringAlignment {
|
||||
@@ -192,39 +185,6 @@ int GetCharacterHeight(FontSize size);
|
||||
/** Height of characters in the large (#FS_MONO) font. @note Some characters may be oversized. */
|
||||
#define FONT_HEIGHT_MONO (GetCharacterHeight(FS_MONO))
|
||||
|
||||
int InitTempMargin(int left, int right, bool to_end_line);
|
||||
void AddSpace(int space, int &here, bool to_end_line);
|
||||
|
||||
void UpdateMarginEnd(int end, int &margin, bool to_end_line);
|
||||
void UpdateMarginWidth(int adding, int &margin, bool to_end_line);
|
||||
void UpdateMarginsEnd(int end, int &left, int &right, bool to_end_line);
|
||||
void UpdateMarginsWidth(int width, int &left, int &right, bool to_end_line);
|
||||
|
||||
void DrawString2(int left, int right, int top, int &margin, StringID str, TextColour colour = TC_FROMSTRING, StringAlignment align = SA_LEFT, bool underline = false);
|
||||
void DrawSprite2(int width, int left, int right, int top, int &margin, SpriteID img, PaletteID pal, bool to_end_line = false, SubSprite *sub = NULL);
|
||||
|
||||
/**
|
||||
* Return where to start drawing a centered object inside a widget.
|
||||
* @param top The top coordinate (or the left coordinate) of the widget.
|
||||
* @param height The height (or width) of the widget.
|
||||
* @param size The height (or width) of the object to draw.
|
||||
* @return The coordinate where to start drawing the centered object.
|
||||
*/
|
||||
static inline int Center(int top, int height, uint size = FONT_HEIGHT_NORMAL)
|
||||
{
|
||||
return top + (height - size) / 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns fint/button size, rescaled to current screen resolution from the base Android resolution, which is 854x480
|
||||
* @param value The value to rescale
|
||||
* @return Rescaled value, using lesser of the curret screen coordinates
|
||||
*/
|
||||
static inline int RescaleFrom854x480(int value)
|
||||
{
|
||||
return min(value * _cur_resolution.width / 854, value * _cur_resolution.height / 480);
|
||||
}
|
||||
|
||||
extern DrawPixelInfo *_cur_dpi;
|
||||
|
||||
TextColour GetContrastColour(uint8 background, uint8 threshold = 128);
|
||||
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
LEErrorCode status = LE_NO_ERROR;
|
||||
/* ParagraphLayout does not copy "buff", so it must stay valid.
|
||||
* "runs" is copied according to the ICU source, but the documentation does not specify anything, so this might break somewhen. */
|
||||
icu::ParagraphLayout *p = new icu::ParagraphLayout(buff, length, &runs, NULL, NULL, NULL, _current_text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, false, status);
|
||||
icu::ParagraphLayout *p = new icu::ParagraphLayout(buff, length, &runs, NULL, NULL, NULL, _current_text_dir == TD_RTL ? 1 : 0, false, status);
|
||||
if (status != LE_NO_ERROR) {
|
||||
delete p;
|
||||
return NULL;
|
||||
|
||||
27
src/goal.cpp
27
src/goal.cpp
@@ -236,10 +236,11 @@ CommandCost CmdSetGoalCompleted(TileIndex tile, DoCommandFlag flags, uint32 p1,
|
||||
* @param flags type of operation
|
||||
* @param p1 various bitstuffed elements
|
||||
* - p1 = (bit 0 - 15) - Unique ID to use for this question.
|
||||
* - p1 = (bit 16 - 23) - Company or client for which this question is.
|
||||
* - p1 = (bit 24 - 25) - Question type.
|
||||
* - p1 = (bit 31) - Question target: 0 - company, 1 - client.
|
||||
* @param p2 Buttons of the question.
|
||||
* - p1 = (bit 16 - 31) - Company or client for which this question is.
|
||||
* @param p2 various bitstuffed elements
|
||||
* - p2 = (bit 0 - 17) - Buttons of the question.
|
||||
* - p2 = (bit 29 - 30) - Question type.
|
||||
* - p2 = (bit 31) - Question target: 0 - company, 1 - client.
|
||||
* @param text Text of the question.
|
||||
* @return the cost of this operation or an error
|
||||
*/
|
||||
@@ -248,36 +249,38 @@ CommandCost CmdGoalQuestion(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
|
||||
uint16 uniqueid = (GoalType)GB(p1, 0, 16);
|
||||
CompanyID company = (CompanyID)GB(p1, 16, 8);
|
||||
#ifdef ENABLE_NETWORK
|
||||
ClientIndex client = (ClientIndex)GB(p1, 16, 8);
|
||||
ClientID client = (ClientID)GB(p1, 16, 16);
|
||||
#endif
|
||||
byte type = GB(p1, 24, 2);
|
||||
bool is_client = HasBit(p1, 31);
|
||||
|
||||
assert_compile(GOAL_QUESTION_BUTTON_COUNT < 29);
|
||||
uint32 button_mask = GB(p2, 0, GOAL_QUESTION_BUTTON_COUNT);
|
||||
byte type = GB(p2, 29, 2);
|
||||
bool is_client = HasBit(p2, 31);
|
||||
|
||||
if (_current_company != OWNER_DEITY) return CMD_ERROR;
|
||||
if (StrEmpty(text)) return CMD_ERROR;
|
||||
if (is_client) {
|
||||
#ifdef ENABLE_NETWORK
|
||||
if (!NetworkClientInfo::IsValidID(client)) return CMD_ERROR;
|
||||
if (NetworkClientInfo::GetByClientID(client) == nullptr) return CMD_ERROR;
|
||||
#else
|
||||
return CMD_ERROR;
|
||||
#endif
|
||||
} else {
|
||||
if (company != INVALID_COMPANY && !Company::IsValidID(company)) return CMD_ERROR;
|
||||
}
|
||||
if (CountBits(p2) < 1 || CountBits(p2) > 3) return CMD_ERROR;
|
||||
if (p2 >= (1 << GOAL_QUESTION_BUTTON_COUNT)) return CMD_ERROR;
|
||||
if (CountBits(button_mask) < 1 || CountBits(button_mask) > 3) return CMD_ERROR;
|
||||
if (type >= GOAL_QUESTION_TYPE_COUNT) return CMD_ERROR;
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
if (is_client) {
|
||||
#ifdef ENABLE_NETWORK
|
||||
if (NetworkClientInfo::Get(client)->client_id != _network_own_client_id) return CommandCost();
|
||||
if (client != _network_own_client_id) return CommandCost();
|
||||
#endif
|
||||
} else {
|
||||
if (company == INVALID_COMPANY && !Company::IsValidID(_local_company)) return CommandCost();
|
||||
if (company != INVALID_COMPANY && company != _local_company) return CommandCost();
|
||||
}
|
||||
ShowGoalQuestion(uniqueid, type, p2, text);
|
||||
ShowGoalQuestion(uniqueid, type, button_mask, text);
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
|
||||
@@ -116,7 +116,6 @@ static NWidgetBase *MakeNWidgetCompanyLines(int *biggest_index)
|
||||
|
||||
for (int widnum = WID_GL_FIRST_COMPANY; widnum <= WID_GL_LAST_COMPANY; widnum++) {
|
||||
NWidgetBackground *panel = new NWidgetBackground(WWT_PANEL, COLOUR_GREY, widnum);
|
||||
panel->sizing_type = NWST_STEP;
|
||||
panel->SetMinimalSize(246, line_height);
|
||||
panel->SetFill(1, 0);
|
||||
panel->SetDataTip(0x0, STR_GRAPH_KEY_COMPANY_SELECTION_TOOLTIP);
|
||||
@@ -473,7 +472,7 @@ protected:
|
||||
format_str_y_axis(format_str_y_axis)
|
||||
{
|
||||
SetWindowDirty(WC_GRAPH_LEGEND, 0);
|
||||
this->num_vert_lines = 12;
|
||||
this->num_vert_lines = 24;
|
||||
this->graph_widget = widget;
|
||||
}
|
||||
|
||||
@@ -632,6 +631,7 @@ static const NWidgetPart _nested_operating_profit_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_OPERATING_PROFIT_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
|
||||
NWidget(WWT_SHADEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_STICKYBOX, COLOUR_GREY),
|
||||
@@ -641,7 +641,6 @@ static const NWidgetPart _nested_operating_profit_widgets[] = {
|
||||
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 160), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), SetSizingType(NWST_STEP),
|
||||
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -683,6 +682,7 @@ static const NWidgetPart _nested_income_graph_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_INCOME_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
|
||||
NWidget(WWT_SHADEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_STICKYBOX, COLOUR_GREY),
|
||||
@@ -692,7 +692,6 @@ static const NWidgetPart _nested_income_graph_widgets[] = {
|
||||
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 128), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), SetSizingType(NWST_STEP),
|
||||
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -732,6 +731,7 @@ static const NWidgetPart _nested_delivered_cargo_graph_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_CARGO_DELIVERED_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
|
||||
NWidget(WWT_SHADEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_STICKYBOX, COLOUR_GREY),
|
||||
@@ -741,7 +741,6 @@ static const NWidgetPart _nested_delivered_cargo_graph_widgets[] = {
|
||||
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 128), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), SetSizingType(NWST_STEP),
|
||||
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -787,6 +786,8 @@ static const NWidgetPart _nested_performance_history_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_COMPANY_PERFORMANCE_RATINGS_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_PHG_DETAILED_PERFORMANCE), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_PERFORMANCE_DETAIL_KEY, STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_PHG_KEY), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
|
||||
NWidget(WWT_SHADEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_STICKYBOX, COLOUR_GREY),
|
||||
@@ -796,8 +797,6 @@ static const NWidgetPart _nested_performance_history_widgets[] = {
|
||||
NWidget(WWT_EMPTY, COLOUR_GREY, WID_PHG_GRAPH), SetMinimalSize(576, 224), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_PHG_DETAILED_PERFORMANCE), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_PERFORMANCE_DETAIL_KEY, STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP), SetSizingType(NWST_STEP),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_PHG_KEY), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), SetSizingType(NWST_STEP),
|
||||
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_PHG_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -837,6 +836,7 @@ static const NWidgetPart _nested_company_value_graph_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_GRAPH_COMPANY_VALUES_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP),
|
||||
NWidget(WWT_SHADEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_DEFSIZEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_STICKYBOX, COLOUR_GREY),
|
||||
@@ -846,7 +846,6 @@ static const NWidgetPart _nested_company_value_graph_widgets[] = {
|
||||
NWidget(WWT_EMPTY, COLOUR_GREY, WID_CV_GRAPH), SetMinimalSize(576, 224), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetFill(0, 1), SetResize(0, 1),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_CV_KEY_BUTTON), SetMinimalSize(50, 0), SetMinimalTextLines(1, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM + 2), SetDataTip(STR_GRAPH_KEY_BUTTON, STR_GRAPH_KEY_TOOLTIP), SetSizingType(NWST_STEP),
|
||||
NWidget(WWT_RESIZEBOX, COLOUR_GREY, WID_CV_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -1128,7 +1127,6 @@ private:
|
||||
uint ordinal_width; ///< The width of the ordinal number
|
||||
uint text_width; ///< The width of the actual text
|
||||
uint icon_width; ///< The width of the company icon
|
||||
uint icon_y_offset; ///< The vertical offset for drawing the company icon.
|
||||
int line_height; ///< Height of the text lines
|
||||
|
||||
/**
|
||||
@@ -1175,7 +1173,8 @@ public:
|
||||
{
|
||||
if (widget != WID_CL_BACKGROUND) return;
|
||||
|
||||
uint y = r.top + WD_FRAMERECT_TOP;
|
||||
int icon_y_offset = 1 + (FONT_HEIGHT_NORMAL - this->line_height) / 2;
|
||||
uint y = r.top + WD_FRAMERECT_TOP - icon_y_offset;
|
||||
|
||||
bool rtl = _current_text_dir == TD_RTL;
|
||||
uint ordinal_left = rtl ? r.right - WD_FRAMERECT_LEFT - this->ordinal_width : r.left + WD_FRAMERECT_LEFT;
|
||||
@@ -1188,7 +1187,7 @@ public:
|
||||
const Company *c = this->companies[i];
|
||||
DrawString(ordinal_left, ordinal_right, y, i + STR_ORDINAL_NUMBER_1ST, i == 0 ? TC_WHITE : TC_YELLOW);
|
||||
|
||||
DrawCompanyIcon(c->index, icon_left, y + this->icon_y_offset);
|
||||
DrawCompanyIcon(c->index, icon_left, y + icon_y_offset);
|
||||
|
||||
SetDParam(0, c->index);
|
||||
SetDParam(1, c->index);
|
||||
@@ -1221,7 +1220,6 @@ public:
|
||||
Dimension d = GetSpriteSize(SPR_COMPANY_ICON);
|
||||
this->icon_width = d.width + 2;
|
||||
this->line_height = max<int>(d.height + 2, FONT_HEIGHT_NORMAL);
|
||||
this->icon_y_offset = Center(1, this->line_height, d.height);
|
||||
|
||||
const Company *c;
|
||||
FOR_ALL_COMPANIES(c) {
|
||||
|
||||
@@ -536,7 +536,7 @@ CommandCost CmdAddVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
||||
|
||||
if (new_g == NEW_GROUP) {
|
||||
/* Create new group. */
|
||||
CommandCost ret = CmdCreateGroup(0, flags, v->type, 0, NULL);
|
||||
CommandCost ret = CmdCreateGroup(0, flags, v->type, INVALID_GROUP, NULL);
|
||||
if (ret.Failed()) return ret;
|
||||
|
||||
new_g = _new_group_id;
|
||||
|
||||
@@ -48,7 +48,8 @@ static const NWidgetPart _nested_group_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
/* left part */
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_GL_ALL_VEHICLES), SetFill(1, 0), SetMinimalTextLines(1, WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM), EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalTextLines(1, WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM), SetFill(1, 0), EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_GL_ALL_VEHICLES), SetFill(1, 0), EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY, WID_GL_DEFAULT_VEHICLES), SetFill(1, 0), EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_GL_LIST_GROUP), SetMatrixDataTip(1, 0, STR_GROUPS_CLICK_ON_GROUP_FOR_TOOLTIP),
|
||||
@@ -73,7 +74,7 @@ static const NWidgetPart _nested_group_widgets[] = {
|
||||
/* right part */
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_GL_SORT_BY_ORDER), SetSizingType(NWST_STEP), SetMinimalSize(81, 12), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_GL_SORT_BY_ORDER), SetMinimalSize(81, 12), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_GL_SORT_BY_DROPDOWN), SetMinimalSize(167, 12), SetDataTip(0x0, STR_TOOLTIP_SORT_CRITERIA),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(12, 12), SetResize(1, 0), EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -81,7 +82,7 @@ static const NWidgetPart _nested_group_widgets[] = {
|
||||
NWidget(WWT_MATRIX, COLOUR_GREY, WID_GL_LIST_VEHICLE), SetMinimalSize(248, 0), SetMatrixDataTip(1, 0, STR_NULL), SetResize(1, 1), SetFill(1, 0), SetScrollbar(WID_GL_LIST_VEHICLE_SCROLLBAR),
|
||||
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_GL_LIST_VEHICLE_SCROLLBAR),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY), SetFill(1, 1), SetResize(1, 0), EndContainer(),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY), SetMinimalSize(1, 0), SetFill(1, 1), SetResize(1, 0), EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_GL_AVAILABLE_VEHICLES), SetMinimalSize(106, 12), SetFill(0, 1),
|
||||
SetDataTip(STR_BLACK_STRING, STR_VEHICLE_LIST_AVAILABLE_ENGINES_TOOLTIP),
|
||||
@@ -194,9 +195,8 @@ private:
|
||||
uint ComputeGroupInfoSize()
|
||||
{
|
||||
this->column_size[VGC_NAME] = maxdim(GetStringBoundingBox(STR_GROUP_DEFAULT_TRAINS + this->vli.vtype), GetStringBoundingBox(STR_GROUP_ALL_TRAINS + this->vli.vtype));
|
||||
/* We consider the max average length of characters to be the one of "a" */
|
||||
this->column_size[VGC_NAME].width = max(GetCharacterWidth(FS_NORMAL, 97) * (MAX_LENGTH_GROUP_NAME_CHARS - 4), this->column_size[VGC_NAME].width);
|
||||
this->tiny_step_height = max(11U, this->column_size[VGC_NAME].height);
|
||||
this->column_size[VGC_NAME].width = max(170u, this->column_size[VGC_NAME].width);
|
||||
this->tiny_step_height = this->column_size[VGC_NAME].height;
|
||||
|
||||
this->column_size[VGC_PROTECT] = GetSpriteSize(SPR_GROUP_REPLACE_PROTECT);
|
||||
this->tiny_step_height = max(this->tiny_step_height, this->column_size[VGC_PROTECT].height);
|
||||
@@ -218,7 +218,6 @@ private:
|
||||
this->tiny_step_height = max(this->tiny_step_height, this->column_size[VGC_NUMBER].height);
|
||||
|
||||
this->tiny_step_height += WD_MATRIX_TOP;
|
||||
this->tiny_step_height = GetMinSizing(NWST_STEP, this->tiny_step_height);
|
||||
|
||||
return WD_FRAMERECT_LEFT + 8 +
|
||||
this->column_size[VGC_NAME].width + 8 +
|
||||
@@ -242,7 +241,7 @@ private:
|
||||
{
|
||||
/* Highlight the group if a vehicle is dragged over it */
|
||||
if (g_id == this->group_over) {
|
||||
GfxFillRect(left + WD_FRAMERECT_LEFT, y + WD_FRAMERECT_TOP + WD_MATRIX_TOP, right - WD_FRAMERECT_RIGHT, y + this->tiny_step_height - WD_FRAMERECT_BOTTOM - WD_MATRIX_TOP, _colour_gradient[COLOUR_GREY][7]);
|
||||
GfxFillRect(left + WD_FRAMERECT_LEFT, y + WD_FRAMERECT_TOP, right - WD_FRAMERECT_RIGHT, y + this->tiny_step_height - WD_FRAMERECT_BOTTOM - WD_MATRIX_TOP, _colour_gradient[COLOUR_GREY][7]);
|
||||
}
|
||||
|
||||
if (g_id == NEW_GROUP) return;
|
||||
@@ -368,7 +367,7 @@ public:
|
||||
resize->height = this->tiny_step_height;
|
||||
|
||||
/* Minimum height is the height of the list widget minus all and default vehicles... */
|
||||
size->height = (this->vli.vtype >= VEH_SHIP ? 3.5 : 7) * GetVehicleListHeight(this->vli.vtype, this->tiny_step_height) - 2 * this->tiny_step_height;
|
||||
size->height = 4 * GetVehicleListHeight(this->vli.vtype, this->tiny_step_height) - 2 * this->tiny_step_height;
|
||||
|
||||
/* ... minus the buttons at the bottom ... */
|
||||
uint max_icon_height = GetSpriteSize(this->GetWidget<NWidgetCore>(WID_GL_CREATE_GROUP)->widget_data).height;
|
||||
@@ -380,7 +379,7 @@ public:
|
||||
max_icon_height += (FONT_HEIGHT_NORMAL * 3) + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
|
||||
|
||||
/* Get a multiple of tiny_step_height of that amount */
|
||||
size->height = Ceil(size->height, tiny_step_height);
|
||||
size->height = Ceil(size->height - max_icon_height, tiny_step_height);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -401,7 +400,7 @@ public:
|
||||
case WID_GL_LIST_VEHICLE:
|
||||
this->ComputeGroupInfoSize();
|
||||
resize->height = GetVehicleListHeight(this->vli.vtype, this->tiny_step_height);
|
||||
size->height = (this->vli.vtype >= VEH_SHIP ? 3 : 6) * resize->height;
|
||||
size->height = 4 * resize->height;
|
||||
break;
|
||||
|
||||
case WID_GL_MANAGE_VEHICLES_DROPDOWN: {
|
||||
|
||||
@@ -261,7 +261,7 @@ static const NWidgetPart _nested_build_industry_widgets[] = {
|
||||
|
||||
/** Window definition of the dynamic place industries gui */
|
||||
static WindowDesc _build_industry_desc(
|
||||
WDP_ALIGN_TOOLBAR, "build_industry", 170, 212,
|
||||
WDP_AUTO, "build_industry", 170, 212,
|
||||
WC_BUILD_INDUSTRY, WC_NONE,
|
||||
WDF_CONSTRUCTION,
|
||||
_nested_build_industry_widgets, lengthof(_nested_build_industry_widgets)
|
||||
@@ -278,6 +278,8 @@ class BuildIndustryWindow : public Window {
|
||||
bool enabled[NUM_INDUSTRYTYPES + 1]; ///< availability state, coming from CBID_INDUSTRY_PROBABILITY (if ever)
|
||||
Scrollbar *vscroll;
|
||||
|
||||
/** The offset for the text in the matrix. */
|
||||
static const int MATRIX_TEXT_OFFSET = 17;
|
||||
/** The largest allowed minimum-width of the window, given in line heights */
|
||||
static const int MAX_MINWIDTH_LINEHEIGHTS = 20;
|
||||
|
||||
@@ -401,10 +403,6 @@ public:
|
||||
this->SetButtons();
|
||||
}
|
||||
|
||||
~BuildIndustryWindow() {
|
||||
if (_thd.GetCallbackWnd() == this) this->OnPlaceObjectAbort();
|
||||
}
|
||||
|
||||
virtual void OnInit()
|
||||
{
|
||||
this->SetupArrays();
|
||||
@@ -419,8 +417,8 @@ public:
|
||||
if (this->index[i] == INVALID_INDUSTRYTYPE) continue;
|
||||
d = maxdim(d, GetStringBoundingBox(GetIndustrySpec(this->index[i])->name));
|
||||
}
|
||||
resize->height = GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM);
|
||||
d.width += FONT_HEIGHT_NORMAL * 5 / 4 + padding.width;
|
||||
resize->height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||
d.width += MATRIX_TEXT_OFFSET + padding.width;
|
||||
d.height = 5 * resize->height;
|
||||
*size = maxdim(*size, d);
|
||||
break;
|
||||
@@ -501,22 +499,20 @@ public:
|
||||
switch (widget) {
|
||||
case WID_DPI_MATRIX_WIDGET: {
|
||||
uint text_left, text_right, icon_left, icon_right;
|
||||
uint square_size = FONT_HEIGHT_NORMAL - 2;
|
||||
uint text_offset = FONT_HEIGHT_NORMAL * 5 / 4;
|
||||
if (_current_text_dir == TD_RTL) {
|
||||
icon_right = r.right - WD_MATRIX_RIGHT;
|
||||
icon_left = icon_right - square_size;
|
||||
text_right = icon_right - text_offset;
|
||||
icon_left = icon_right - 10;
|
||||
text_right = icon_right - BuildIndustryWindow::MATRIX_TEXT_OFFSET;
|
||||
text_left = r.left + WD_MATRIX_LEFT;
|
||||
} else {
|
||||
icon_left = r.left + WD_MATRIX_LEFT;
|
||||
icon_right = icon_left + square_size;
|
||||
text_left = icon_left + text_offset;
|
||||
icon_right = icon_left + 10;
|
||||
text_left = icon_left + BuildIndustryWindow::MATRIX_TEXT_OFFSET;
|
||||
text_right = r.right - WD_MATRIX_RIGHT;
|
||||
}
|
||||
|
||||
int y = Center(r.top, this->resize.step_height);
|
||||
for (byte i = 0; i < this->vscroll->GetCapacity() && i + this->vscroll->GetPosition() < this->count; i++, y += this->resize.step_height) {
|
||||
for (byte i = 0; i < this->vscroll->GetCapacity() && i + this->vscroll->GetPosition() < this->count; i++) {
|
||||
int y = r.top + WD_MATRIX_TOP + i * this->resize.step_height;
|
||||
bool selected = this->selected_index == i + this->vscroll->GetPosition();
|
||||
|
||||
if (this->index[i + this->vscroll->GetPosition()] == INVALID_INDUSTRYTYPE) {
|
||||
@@ -527,8 +523,8 @@ public:
|
||||
|
||||
/* Draw the name of the industry in white is selected, otherwise, in orange */
|
||||
DrawString(text_left, text_right, y, indsp->name, selected ? TC_WHITE : TC_ORANGE);
|
||||
GfxFillRect(icon_left, y + 1, icon_right, y + square_size, selected ? PC_WHITE : PC_BLACK);
|
||||
GfxFillRect(icon_left + 1, y + 2, icon_right - 1, y + square_size - 1, indsp->map_colour);
|
||||
GfxFillRect(icon_left, y + 1, icon_right, y + 7, selected ? PC_WHITE : PC_BLACK);
|
||||
GfxFillRect(icon_left + 1, y + 2, icon_right - 1, y + 6, indsp->map_colour);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -647,21 +643,6 @@ public:
|
||||
|
||||
virtual void OnPlaceObject(Point pt, TileIndex tile)
|
||||
{
|
||||
VpStartPlaceSizing(tile, VPM_SINGLE_TILE, DDSP_SINGLE_TILE);
|
||||
MoveAllWindowsOffScreen();
|
||||
}
|
||||
|
||||
virtual void OnPlaceDrag(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt)
|
||||
{
|
||||
VpSelectTilesWithMethod(pt.x, pt.y, select_method);
|
||||
}
|
||||
|
||||
virtual void OnPlaceMouseUp(ViewportPlaceMethod select_method, ViewportDragDropSelectionProcess select_proc, Point pt, TileIndex start_tile, TileIndex end_tile)
|
||||
{
|
||||
if (pt.x == -1) return;
|
||||
assert(end_tile == start_tile);
|
||||
|
||||
MoveAllHiddenWindowsBackToScreen();
|
||||
bool success = true;
|
||||
/* We do not need to protect ourselves against "Random Many Industries" in this mode */
|
||||
const IndustrySpec *indsp = GetIndustrySpec(this->selected_type);
|
||||
@@ -679,14 +660,14 @@ public:
|
||||
_generating_world = true;
|
||||
_ignore_restrictions = true;
|
||||
|
||||
DoCommandP(end_tile, (InteractiveRandomRange(indsp->num_table) << 8) | this->selected_type, seed,
|
||||
DoCommandP(tile, (InteractiveRandomRange(indsp->num_table) << 8) | this->selected_type, seed,
|
||||
CMD_BUILD_INDUSTRY | CMD_MSG(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY), &CcBuildIndustry);
|
||||
|
||||
cur_company.Restore();
|
||||
_ignore_restrictions = false;
|
||||
_generating_world = false;
|
||||
} else {
|
||||
success = DoCommandP(end_tile, (InteractiveRandomRange(indsp->num_table) << 8) | this->selected_type, seed, CMD_BUILD_INDUSTRY | CMD_MSG(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY));
|
||||
success = DoCommandP(tile, (InteractiveRandomRange(indsp->num_table) << 8) | this->selected_type, seed, CMD_BUILD_INDUSTRY | CMD_MSG(STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY));
|
||||
}
|
||||
|
||||
/* If an industry has been built, just reset the cursor and the system */
|
||||
@@ -723,7 +704,6 @@ public:
|
||||
|
||||
virtual void OnPlaceObjectAbort()
|
||||
{
|
||||
MoveAllHiddenWindowsBackToScreen();
|
||||
this->RaiseButtons();
|
||||
}
|
||||
|
||||
@@ -746,7 +726,7 @@ public:
|
||||
void ShowBuildIndustryWindow()
|
||||
{
|
||||
if (_game_mode != GM_EDITOR && !Company::IsValidID(_local_company)) return;
|
||||
DeleteToolbarLinkedWindows();
|
||||
if (BringWindowToFrontById(WC_BUILD_INDUSTRY, 0)) return;
|
||||
new BuildIndustryWindow();
|
||||
}
|
||||
|
||||
@@ -889,7 +869,7 @@ public:
|
||||
if (first) {
|
||||
if (has_accept) y += WD_PAR_VSEP_WIDE;
|
||||
DrawString(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE);
|
||||
y += this->editable == EA_RATE ? GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL) : FONT_HEIGHT_NORMAL;
|
||||
y += FONT_HEIGHT_NORMAL;
|
||||
if (this->editable == EA_RATE) this->production_offset_y = y;
|
||||
first = false;
|
||||
}
|
||||
@@ -904,10 +884,8 @@ public:
|
||||
if (this->editable == EA_RATE) {
|
||||
DrawArrowButtons(left + WD_FRAMETEXT_LEFT, y, COLOUR_YELLOW, (this->clicked_line == IL_RATE1 + j) ? this->clicked_button : 0,
|
||||
i->production_rate[j] > 0, i->production_rate[j] < 255);
|
||||
y += GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL);
|
||||
} else {
|
||||
y += FONT_HEIGHT_NORMAL;
|
||||
}
|
||||
y += FONT_HEIGHT_NORMAL;
|
||||
}
|
||||
|
||||
/* Display production multiplier if editable */
|
||||
@@ -919,7 +897,7 @@ public:
|
||||
DrawString(x, right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_VIEW_PRODUCTION_LEVEL);
|
||||
DrawArrowButtons(left + WD_FRAMETEXT_LEFT, y, COLOUR_YELLOW, (this->clicked_line == IL_MULTIPLIER) ? this->clicked_button : 0,
|
||||
i->prod_level > PRODLEVEL_MINIMUM, i->prod_level < PRODLEVEL_MAXIMUM);
|
||||
y += GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL);
|
||||
y += FONT_HEIGHT_NORMAL;
|
||||
}
|
||||
|
||||
/* Get the extra message for the GUI */
|
||||
@@ -967,14 +945,12 @@ public:
|
||||
case EA_NONE: break;
|
||||
|
||||
case EA_MULTIPLIER:
|
||||
if (IsInsideBS(pt.y, this->production_offset_y, SETTING_BUTTON_HEIGHT)) line = IL_MULTIPLIER;
|
||||
if (IsInsideBS(pt.y, this->production_offset_y, FONT_HEIGHT_NORMAL)) line = IL_MULTIPLIER;
|
||||
break;
|
||||
|
||||
case EA_RATE:
|
||||
if (pt.y >= this->production_offset_y) {
|
||||
if ((pt.y - this->production_offset_y) % GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL) > (uint)SETTING_BUTTON_HEIGHT) break;;
|
||||
|
||||
int row = (pt.y - this->production_offset_y) / GetMinSizing(NWST_STEP, FONT_HEIGHT_NORMAL);
|
||||
int row = (pt.y - this->production_offset_y) / FONT_HEIGHT_NORMAL;
|
||||
for (uint j = 0; j < lengthof(i->produced_cargo); j++) {
|
||||
if (i->produced_cargo[j] == CT_INVALID) continue;
|
||||
row--;
|
||||
@@ -1190,7 +1166,7 @@ static const NWidgetPart _nested_industry_directory_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_BROWN, WID_ID_DROPDOWN_ORDER), SetSizingType(NWST_STEP), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
|
||||
NWidget(WWT_TEXTBTN, COLOUR_BROWN, WID_ID_DROPDOWN_ORDER), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
|
||||
NWidget(WWT_DROPDOWN, COLOUR_BROWN, WID_ID_DROPDOWN_CRITERIA), SetDataTip(STR_JUST_STRING, STR_TOOLTIP_SORT_CRITERIA),
|
||||
NWidget(WWT_PANEL, COLOUR_BROWN), SetResize(1, 0), EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -1395,7 +1371,7 @@ public:
|
||||
|
||||
case WID_ID_INDUSTRY_LIST: {
|
||||
int n = 0;
|
||||
int y = Center(r.top, this->resize.step_height);
|
||||
int y = r.top + WD_FRAMERECT_TOP;
|
||||
if (this->industries.Length() == 0) {
|
||||
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, STR_INDUSTRY_DIRECTORY_NONE);
|
||||
break;
|
||||
@@ -1438,7 +1414,7 @@ public:
|
||||
for (uint i = 0; i < this->industries.Length(); i++) {
|
||||
d = maxdim(d, GetStringBoundingBox(this->GetIndustryString(this->industries[i])));
|
||||
}
|
||||
resize->height = d.height = GetMinSizing(NWST_STEP, d.height);
|
||||
resize->height = d.height;
|
||||
d.height *= 5;
|
||||
d.width += padding.width + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
|
||||
d.height += padding.height + WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "string_func.h"
|
||||
#include "fileio_func.h"
|
||||
|
||||
#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 500) || defined(__ANDROID__)
|
||||
#if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 500)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "language.h"
|
||||
#include "rev.h"
|
||||
#include "highscore.h"
|
||||
#include "tutorial_gui.h"
|
||||
|
||||
#include "widgets/intro_widget.h"
|
||||
|
||||
@@ -62,13 +61,9 @@ struct SelectGameWindow : public Window {
|
||||
virtual void OnInit()
|
||||
{
|
||||
bool missing_sprites = _missing_extra_graphics > 0 && !IsReleasedVersion();
|
||||
missing_sprites = false;
|
||||
this->GetWidget<NWidgetStacked>(WID_SGI_BASESET_SELECTION)->SetDisplayedPlane(missing_sprites ? 0 : SZSP_NONE);
|
||||
|
||||
bool missing_lang = _current_language->missing >= _settings_client.gui.missing_strings_threshold && !IsReleasedVersion();
|
||||
#ifdef __ANDROID__
|
||||
missing_lang = false;
|
||||
#endif
|
||||
this->GetWidget<NWidgetStacked>(WID_SGI_TRANSLATION_SELECTION)->SetDisplayedPlane(missing_lang ? 0 : SZSP_NONE);
|
||||
}
|
||||
|
||||
@@ -163,14 +158,13 @@ struct SelectGameWindow : public Window {
|
||||
}
|
||||
break;
|
||||
case WID_SGI_AI_SETTINGS: ShowAIConfigWindow(); break;
|
||||
case WID_SGI_TUTORIAL: ShowTutorialWindow(); break;
|
||||
case WID_SGI_EXIT: HandleExitGameRequest(); break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static const NWidgetPart _nested_select_game_widgets[] = {
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetSizingType(NWST_BUTTON), SetDataTip(STR_INTRO_CAPTION, STR_NULL),
|
||||
NWidget(WWT_CAPTION, COLOUR_BROWN), SetDataTip(STR_INTRO_CAPTION, STR_NULL),
|
||||
NWidget(WWT_PANEL, COLOUR_BROWN),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 8),
|
||||
|
||||
@@ -264,11 +258,11 @@ static const NWidgetPart _nested_select_game_widgets[] = {
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 6),
|
||||
|
||||
/* 'exit program' button */
|
||||
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, WID_SGI_TUTORIAL), SetMinimalSize(158, 12),
|
||||
SetDataTip(STR_ABOUT_MENU_TUTORIAL, STR_TUTORIAL_WINDOW_TOOLTIP), SetPadding(0, 0, 0, 10), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, WID_SGI_EXIT), SetMinimalSize(158, 12),
|
||||
SetDataTip(STR_INTRO_QUIT, STR_INTRO_TOOLTIP_QUIT), SetPadding(0, 10, 0, 0), SetFill(1, 0),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(NWID_SPACER), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, WID_SGI_EXIT), SetMinimalSize(128, 12),
|
||||
SetDataTip(STR_INTRO_QUIT, STR_INTRO_TOOLTIP_QUIT),
|
||||
NWidget(NWID_SPACER), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 8),
|
||||
|
||||
@@ -4950,5 +4950,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -282,7 +282,7 @@ STR_SORT_BY_TIMETABLE_DELAY :تاخير جد
|
||||
STR_SORT_BY_FACILITY :نوع المحطة
|
||||
STR_SORT_BY_RATING_MAX :اعلى نسبة شحن
|
||||
STR_SORT_BY_RATING_MIN :اقل نسبة شحن
|
||||
STR_SORT_BY_ENGINE_ID :نوع المحرك (قياسي(
|
||||
STR_SORT_BY_ENGINE_ID :نوع المحرك (قياسي)
|
||||
STR_SORT_BY_COST :التكلفة
|
||||
STR_SORT_BY_POWER :الطاقة
|
||||
STR_SORT_BY_TRACTIVE_EFFORT :قوة الجذب
|
||||
@@ -1147,7 +1147,7 @@ STR_CONFIG_SETTING_INDUSTRY_DENSITY :الكثافة
|
||||
STR_CONFIG_SETTING_INDUSTRY_DENSITY_HELPTEXT :إختر مقدار الصناعات التي يجب تكوينها وعلى اي مستوى يجب ان تكون خلال اللعبة
|
||||
STR_CONFIG_SETTING_SNOWLINE_HEIGHT :ارتفاع خط الثلج: {STRING}
|
||||
STR_CONFIG_SETTING_SNOWLINE_HEIGHT_HELPTEXT :تحكم على اي ارتفاع يبدأ نزول الثلج في المناطق القطبية,تؤثر الثلوج على مستوى تطور القطاع الصناعي ونمو المدن
|
||||
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :خشونة التضاريس (صفر التكوين فقط ) :({STRING}
|
||||
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN :خشونة التضاريس: {STRING}
|
||||
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_HELPTEXT :(TerraGenesis only)إختر تكرار الهضبات: الاراض المستويه تحتوي على البضع منها,هضبات موزعه عرضيا اكثر,الاراض الوعرة تحتوي الكثير من الهضاب,التي من الممكن ان تكون متكررة
|
||||
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_SMOOTH :ناعم جدا
|
||||
STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_SMOOTH :ناعم
|
||||
@@ -1946,7 +1946,7 @@ STR_RAIL_TOOLBAR_MAGLEV_CONSTRUCTION_CAPTION :بناء الس
|
||||
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_TRACK :{BLACK}بناء سكة حديد
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_AUTORAIL :{BLACK}بناء سكة القطار باستخدام البناء التلقائي
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}بناء ورشة قطارات (لصيانة و شراء القطارات).
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_TRAIN_DEPOT_FOR_BUILDING :{BLACK}بناء ورشة قطارات (لصيانة و شراء القطارات)
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_CONVERT_RAIL_TO_WAYPOINT :{BLACK}غير السكة الى نقطة عبور
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_STATION :{BLACK}بناء محطة قطار. مفتاح كنترول يسمح بضم المحطات
|
||||
STR_RAIL_TOOLBAR_TOOLTIP_BUILD_RAILROAD_SIGNALS :{BLACK}بناء إشارات السكك الحديدية.
|
||||
@@ -2028,7 +2028,7 @@ STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAMWAY_SECTION :{BLACK}بناء
|
||||
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOROAD :{BLACK}بناء الطرق باستخدام النظام الآلي
|
||||
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_AUTOTRAM :{BLACK}بناء سكة القطار باستخدام النظام الآلي
|
||||
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_ROAD_VEHICLE_DEPOT :{BLACK}بناء ورشة صيانة لعربات الطرق (لشراء و صيانة العربات).
|
||||
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}بناء ورشة لصيانة عربات الترام (لشراء و صيانة عربات الترام).
|
||||
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRAM_VEHICLE_DEPOT :{BLACK}بناء ورشة لصيانة عربات الترام (لشراء و صيانة عربات الترام)
|
||||
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_BUS_STATION :{BLACK}بناء محطة باصات
|
||||
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_PASSENGER_TRAM_STATION :{BLACK}بناء محطة ركاب ترام.
|
||||
STR_ROAD_TOOLBAR_TOOLTIP_BUILD_TRUCK_LOADING_BAY :{BLACK}بناء محطة تحميل عربات. مفتاح كنترول يسمح بمجاورة المحطات.
|
||||
@@ -2590,7 +2590,8 @@ STR_EDIT_SIGN_SIGN_OSKTITLE :{BLACK}ادخل
|
||||
# Town directory window
|
||||
STR_TOWN_DIRECTORY_CAPTION :{WHITE}مدن/ بلدات
|
||||
STR_TOWN_DIRECTORY_NONE :{ORANGE}-بدون-
|
||||
STR_TOWN_DIRECTORY_TOWN :{ORANGE}{TOWN}{BLACK} ) {COMMA})
|
||||
STR_TOWN_DIRECTORY_TOWN :{ORANGE}{RLE}{TOWN}{BLACK} {RLM}({COMMA})
|
||||
STR_TOWN_DIRECTORY_CITY :{ORANGE}{RLE}{TOWN}{YELLOW} (مدينة){BLACK} {RLM}({COMMA})
|
||||
STR_TOWN_DIRECTORY_LIST_TOOLTIP :{BLACK}اسم المدينة - اضغط على الاسم لتوسيط الشاشة عليها. اضغط + كنترول لفتح شاشة عرض جديدة للضاحية.
|
||||
STR_TOWN_POPULATION :{BLACK}سكان العالم: {COMMA}
|
||||
|
||||
@@ -2678,7 +2679,7 @@ STR_STATION_LIST_STATION :{YELLOW}{STATIO
|
||||
STR_STATION_LIST_WAYPOINT :{YELLOW}{WAYPOINT}
|
||||
STR_STATION_LIST_NONE :{YELLOW}- بدون -
|
||||
STR_STATION_LIST_SELECT_ALL_FACILITIES :{BLACK}اختر جميع المرافق
|
||||
STR_STATION_LIST_SELECT_ALL_TYPES :{BLACK}اختر كل انواع الشحن (حتى غير المنتظرة(
|
||||
STR_STATION_LIST_SELECT_ALL_TYPES :{BLACK}اختر كل انواع الشحن (حتى غير المنتظرة)
|
||||
STR_STATION_LIST_NO_WAITING_CARGO :{BLACK}لا يوجد اي شحنة منتظرة
|
||||
|
||||
# Station view window
|
||||
@@ -2897,7 +2898,7 @@ STR_PURCHASE_INFO_SPEED_OCEAN :{BLACK}السر
|
||||
STR_PURCHASE_INFO_SPEED_CANAL :{BLACK}السرعة في القناة/النهر: {GOLD}{VELOCITY}
|
||||
STR_PURCHASE_INFO_RUNNINGCOST :{BLACK}تكلفة التشغيل: {GOLD}{CURRENCY_LONG}/ سنة
|
||||
STR_PURCHASE_INFO_CAPACITY :{BLACK}السعة: {GOLD}{CARGO_LONG} {STRING}
|
||||
STR_PURCHASE_INFO_REFITTABLE :)قابل لتغيير(
|
||||
STR_PURCHASE_INFO_REFITTABLE :(قابل لتغيي)
|
||||
STR_PURCHASE_INFO_DESIGNED_LIFE :{BLACK}تصميم: {GOLD}{NUM}{BLACK} العمر الافتراضي: {GOLD}{COMMA} سنة
|
||||
STR_PURCHASE_INFO_RELIABILITY :{BLACK}الاعتمادية القصوى: {GOLD}{COMMA}%
|
||||
STR_PURCHASE_INFO_COST :{BLACK}التكلفة: {GOLD}{CURRENCY_LONG}
|
||||
@@ -3193,7 +3194,7 @@ STR_VEHICLE_DETAILS_TRAIN_TOTAL_CARGO_TOOLTIP :{BLACK} عرض
|
||||
STR_VEHICLE_DETAILS_TRAIN_ARTICULATED_RV_CAPACITY :{BLACK}السعة: {LTBLUE}
|
||||
|
||||
# Vehicle refit
|
||||
STR_REFIT_CAPTION :{WHITE}{VEHICLE} )تغيير(
|
||||
STR_REFIT_CAPTION :{WHITE}{VEHICLE} (تغيير)
|
||||
STR_REFIT_TITLE :{GOLD}اختر نوع الحمولة ...
|
||||
STR_REFIT_NEW_CAPACITY_COST_OF_REFIT :{BLACK}السعة الجديدة: {GOLD}{CARGO_LONG}{}{BLACK}تكلفة التغيير: {RED}{CURRENCY_LONG}
|
||||
STR_REFIT_NEW_CAPACITY_COST_OF_AIRCRAFT_REFIT :{BLACK}السعة الجديدة: {GOLD}{CARGO_LONG}, {GOLD}{CARGO_LONG}{}{BLACK}تكلفة اعادة التهيئة: {RED}{CURRENCY_LONG}
|
||||
@@ -3415,7 +3416,7 @@ STR_TIMETABLE_RESET_LATENESS :{BLACK}اعد
|
||||
STR_TIMETABLE_RESET_LATENESS_TOOLTIP :{BLACK}عدل وقت التاخير للعداد حتى تصل المركبة في الوقت المحدد
|
||||
|
||||
STR_TIMETABLE_AUTOFILL :{BLACK}تهيئة تلقائية
|
||||
STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}املأ الجدولة تلقائيا بقيم الرحلة التالية (مفتاح كنترول لمحاولة ابقائ وقت الانتظار).
|
||||
STR_TIMETABLE_AUTOFILL_TOOLTIP :{BLACK}مفتاح كنترول لمحاولة ابقائ وقت الانتظار (املأ الجدولة تلقائيا بقيم الرحلة التالية)
|
||||
|
||||
STR_TIMETABLE_EXPECTED :{BLACK}متوقع
|
||||
STR_TIMETABLE_SCHEDULED :{BLACK}مجدول
|
||||
@@ -4409,5 +4410,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4816,5 +4816,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4586,7 +4586,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... гэ
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... няправільны кірунак дарогі
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... на прахадных прыпынках нельга рабіць павароты
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... на прахадных прыпынках нельга рабіць скрыжаваньнi
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... дарога аднабаковая ці заблакавана
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Немагчыма выдаліць частку станцыi...
|
||||
@@ -5457,5 +5456,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4276,7 +4276,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... é u
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... rua na direção errada
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... paradas "drive-thru" não podem ter esquinas
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... paradas "drive-thru" não podem ter junções
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... rua é mão única ou está bloqueada
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Impossível remover parte da estação...
|
||||
@@ -5027,5 +5026,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4879,5 +4879,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4317,7 +4317,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... aque
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... sentit de la carretera en la direcció incorrecta
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... les estacions d'autobús de pas no poden tenir cantonades
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... les estacions d'autobús de pas no poden tenir interseccions
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... la carretera és d'un sol sentit o està blocada.
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}No es pot treure part de la estació...
|
||||
@@ -5068,5 +5067,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4413,7 +4413,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... ovo
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... cesta je orijentirana u krivom smjeru
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... prolazne postaje ne mogu imati zavoje
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... prolazne postaje ne mogu imati raskrižja
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... cesta je jednosmjerna ili je blokirana
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Nije moguće ukloniti dio postaje...
|
||||
@@ -5201,41 +5200,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
STR_ABOUT_MENU_TUTORIAL :{BLACK}Uputstva
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LEGEND :{BLACK}Prikaži legendu mape / opis simbola na mapi
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR :Okomita alatna traka: {STRING}
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR_HELPTEXT :Glavna alatna traka je podijeljena na dvije okomite alatne trake na rubovima ekrana
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR :Kompaktna okomita alatna traka: {STRING}
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR_HELPTEXT :Ne postoji dugme 'Izmijeni alatnu traku' u okomitoj alatnoj traci ali postoje pod-meniji
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE :{BLACK}Veličina tipki
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE_TOOLTIP :{BLACK}Veličina svih elemenata korisničkog sučelja
|
||||
STR_CONFIG_SETTING_FONT_SIZE :{BLACK}Veličina fonta
|
||||
STR_CONFIG_SETTING_FONT_SIZE_TOOLTIP :{BLACK}Veličina svih fontova u igri
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION :Potvrdi akcije: {STRING}
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION_HELPTEXT :Prikaži dijalog potvrde pri gradnji cesta i stanica
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS :{BLACK}Naslovne trake
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS_HELPTEXT :{BLACK}Prikaži naslovne trake za sve prozore ili ih sakrij za uštedu prostora na ekranu
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS :Ukrasi prozora: {STRING}
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS_HELPTEXT :Ukrasi na rubovima prozora
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP :{BLACK}8 bita
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP_HELPTEXT :{BLACK}Postavi dubinu boja videa na 8 bitova po pikselu, ovaj način podržava animaciju vode
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP :{BLACK}16 bita
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP_HELPTEXT :{BLACK}Postavi dubinu boja videa na 16 bitova po pikselu, za ovo treba restart, ovaj način ne podržava animaciju vode
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP :{BLACK}24 bita
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP_HELPTEXT :{BLACK}Postavi dubinu boja videa na 24 bita po pikselu, ovaj način podržava animaciju vode
|
||||
STR_TABLET_CLOSE_TOOLTIP :{BLACK}Zatvori sve otvorene prozore (osim zakačenih)
|
||||
STR_TABLET_SHIFT_TOOLTIP :{BLACK}Pritisnuti za procjenu troškova izvođenja neke akcije
|
||||
STR_TABLET_CTRL_TOOLTIP :{BLACK}Koristiti za sve akcije za koje se koristi tipka "CTRL"
|
||||
STR_TUTORIAL_WINDOW_TITLE :{BLACK}Videi za učenje
|
||||
STR_TUTORIAL_WINDOW_TOOLTIP :{BLACK}Otvori prikazivač videa za gledanje videa za učenje
|
||||
STR_TUTORIAL_ROADS_AND_STATIONS :{BLACK}Građenje cesta i stanica, kupnja vozila
|
||||
STR_TUTORIAL_RAILWAYS :{BLACK}Pruge i vlakovi
|
||||
STR_TUTORIAL_ROAD_VEHICLES :{BLACK}Cestovna vozila
|
||||
STR_TUTORIAL_SHIPS :{BLACK}Brodovi i dokovi
|
||||
STR_TUTORIAL_CARGO :{BLACK}Vrste tereta
|
||||
STR_SAVELOAD_LOAD_NETWORK_BUTTON :{BLACK}Učitaj sa mreže
|
||||
STR_SAVELOAD_LOAD_NETWORK_TOOLTIP :{BLACK}Učitaj igru sa mrežne pohrane podataka
|
||||
STR_SAVELOAD_SAVE_NETWORK_BUTTON :{BLACK}Spremi na mrežu
|
||||
STR_SAVELOAD_SAVE_NETWORK_TOOLTIP :{BLACK}Spremi igru na mrežnu pohranu podataka
|
||||
|
||||
@@ -4339,7 +4339,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... tato
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... silnice je otočena jiným směrem
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... průjezdné zastávky nemohou být v zatáčce
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... průjezdné zastávky nemohou být na křižovatce
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... silnice je jednosměrná nebo uzavřená.
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Nelze odstranit část stanice...
|
||||
@@ -5214,41 +5213,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
STR_ABOUT_MENU_TUTORIAL :{BLACK}Tutoriál
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LEGEND :{BLACK}Zobrazit legendu mapy / popis symbolů na mapě
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR :Svislý panel nástrojů: {STRING}
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR_HELPTEXT :Hlavní panel nástrojů je rozdělen ma dva svislé panely nástrojů na krajích obrazovky
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR :Kompaktní svislý panel nástrojů: {STRING}
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR_HELPTEXT :Žádné 'Přepnout panely nástrojů' tlačítko ve svislém panelu nástrojů, avšak více podmenu
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE :{BLACK}Velikost tlačítka
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE_TOOLTIP :{BLACK}Velikost všech prvků uživatelského rozhraní
|
||||
STR_CONFIG_SETTING_FONT_SIZE :{BLACK}Veliksot fontu
|
||||
STR_CONFIG_SETTING_FONT_SIZE_TOOLTIP :{BLACK}Velikost všech fontů ve hře
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION :Potvrdit akce: {STRING}
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION_HELPTEXT :Zobrazitr potvrzující okno při stavbě silnic a stanic
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS :{BLACK}Titulní pruhy
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS_HELPTEXT :{BLACK}Zobrazit titulní pruhy u všech oken, nebo je schovat pro ušetření místa na displeji
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS :Ozdoby oken: {STRING}
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS_HELPTEXT :Ozdoby na hranách oken
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP :{BLACK}8 bitů
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP_HELPTEXT :{BLACK}Nastavit hloubku videa na 8 bitů / pixel, tento mód podporuje animaci vody.
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP :{BLACK}16 bitů
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP_HELPTEXT :{BLACK}Nastavit hloubku videa na 16 bitů / pixel, vyžaduje restart, tento mód nepodporuje animaci vody.
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP :{BLACK}24 bitů
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP_HELPTEXT :{BLACK}Nastavit hloubku videa na 24 bitů / pixel, tento mód podporuje animaci vody.
|
||||
STR_TABLET_CLOSE_TOOLTIP :{BLACK}Zavřít všechna otevřená okna (vyjma připnutých)
|
||||
STR_TABLET_SHIFT_TOOLTIP :{BLACK}Podrž pro zobrazení odhadované ceny akce
|
||||
STR_TABLET_CTRL_TOOLTIP :{BLACK}Použij pro akce, které užívají klávesu"CTRL"
|
||||
STR_TUTORIAL_WINDOW_TITLE :{BLACK}Tutoriálová videa
|
||||
STR_TUTORIAL_WINDOW_TOOLTIP :{BLACK}Otevřít video přehrávač ke shlédnutí tutoriálových videí
|
||||
STR_TUTORIAL_ROADS_AND_STATIONS :{BLACK}Stavba silnic a stanic, koupě vozidel
|
||||
STR_TUTORIAL_RAILWAYS :{BLACK}Železnice a vlaky
|
||||
STR_TUTORIAL_ROAD_VEHICLES :{BLACK}Silniční vozidla
|
||||
STR_TUTORIAL_SHIPS :{BLACK}Lodě a doky
|
||||
STR_TUTORIAL_CARGO :{BLACK}Typy nákladů
|
||||
STR_SAVELOAD_LOAD_NETWORK_BUTTON :{BLACK}Nahrát ze sítě
|
||||
STR_SAVELOAD_LOAD_NETWORK_TOOLTIP :{BLACK}Nahrát hru ze síťového uložiště
|
||||
STR_SAVELOAD_SAVE_NETWORK_BUTTON :{BLACK}Uložit na síť
|
||||
STR_SAVELOAD_SAVE_NETWORK_TOOLTIP :{BLACK}Zálohovat hru na síťové uložiště
|
||||
|
||||
@@ -4317,7 +4317,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... denn
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... vejen peger i den forkerte retning
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... drive-through stops kan ikke have hjørner
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... drive-through stops kan ikke have kryds
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}vejen er ensrettet eller blokeret
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Kan ikke fjerne en del af en station...
|
||||
@@ -5068,5 +5067,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4317,7 +4317,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... deze
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... weg is in de verkeerde richting
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... doorrij haltes kunnen geen bochten hebben
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... doorrij haltes kunnen geen kruisingen hebben
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... weg is eenrichtingsverkeer of geblokkeerd
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Kan deel van station niet verwijderen...
|
||||
@@ -5068,41 +5067,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
STR_ABOUT_MENU_TUTORIAL :{BLACK}Studieles
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LEGEND :{BLACK}Kaartlegenda weergeven / beschrijving van kaartpictogrammen
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR :Verticale werkbalk: {STRING}
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR_HELPTEXT :De hoofdwerkbalk is onderverdeeld in twee verticale werkbalken aan de zijkanten van het scherm
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR :Compacte verticale werkblak: {STRING}
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR_HELPTEXT :Geen knop 'Werkbalk wisselen' in de verticale werkbalk, maar meer submenu's
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE :{BLACK}Knopgrootte
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE_TOOLTIP :{BLACK}Grootte van alle bedieningselementen
|
||||
STR_CONFIG_SETTING_FONT_SIZE :{BLACK}Lettertypegrootte
|
||||
STR_CONFIG_SETTING_FONT_SIZE_TOOLTIP :{BLACK}Grootte van alle spellettertypen
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION :Handelingen bevestigen: {STRING}
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION_HELPTEXT :Bevestigingsdialoogvenster weergeven bij het bouwen van wegen en stations
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS :{BLACK}Titelbalken
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS_HELPTEXT :{BLACK}Titelbalken op alle vensters weergeven of verbergen om ruimte te besparen
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS :Vensterdecoraties: {STRING}
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS_HELPTEXT :Versieringen op de vensterranden
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP :{BLACK}8 bits
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP_HELPTEXT :{BLACK}Stel de video-kleurdiepte in op 8 bits per pixel, deze videomodus ondersteunt bewegend water
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP :{BLACK}16 bits
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP_HELPTEXT :{BLACK}Stel de video-kleurdiepte in op 16 bits per pixel, herstart noodzakelijk, deze videomodus ondersteunt geen bewegend water
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP :{BLACK}24 bits
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP_HELPTEXT :{BLACK}Stel de video-kleurdiepte in op 24 bits per pixel, deze videomodus ondersteunt bewegend water
|
||||
STR_TABLET_CLOSE_TOOLTIP :{BLACK}Alle open vensters sluiten (behalve vastgezette)
|
||||
STR_TABLET_SHIFT_TOOLTIP :{BLACK}Druk hierop voor een schatting van de kosten van een handeling
|
||||
STR_TABLET_CTRL_TOOLTIP :{BLACK}Gebruik dit voor handelingen waarvoor de toets 'CTRL' wordt gebruikt
|
||||
STR_TUTORIAL_WINDOW_TITLE :{BLACK}Studievideo's
|
||||
STR_TUTORIAL_WINDOW_TOOLTIP :{BLACK}Een videospeler openen om studievideo's te bekijken
|
||||
STR_TUTORIAL_ROADS_AND_STATIONS :{BLACK}Wegen en stations bouwen, voertuigen kopen
|
||||
STR_TUTORIAL_RAILWAYS :{BLACK}Spoorwegen en treinen
|
||||
STR_TUTORIAL_ROAD_VEHICLES :{BLACK}Wegvoertuigen
|
||||
STR_TUTORIAL_SHIPS :{BLACK}Schepen en dokken
|
||||
STR_TUTORIAL_CARGO :{BLACK}Typen vracht
|
||||
STR_SAVELOAD_LOAD_NETWORK_BUTTON :{BLACK}Laden vanaf netwerk
|
||||
STR_SAVELOAD_LOAD_NETWORK_TOOLTIP :{BLACK}Een spel laden uit de netwerkopslag
|
||||
STR_SAVELOAD_SAVE_NETWORK_BUTTON :{BLACK}Opslaan naar netwerk
|
||||
STR_SAVELOAD_SAVE_NETWORK_TOOLTIP :{BLACK}Reservekopie van het spel maken op de netwerkopslag
|
||||
|
||||
@@ -405,13 +405,13 @@ STR_MAP_MENU_SIGN_LIST :Sign list
|
||||
|
||||
############ range for town menu starts
|
||||
STR_TOWN_MENU_TOWN_DIRECTORY :Town directory
|
||||
STR_SUBSIDIES_MENU_SUBSIDIES :Subsidies
|
||||
STR_INDUSTRY_MENU_INDUSTRY_DIRECTORY :Industry directory
|
||||
STR_INDUSTRY_MENU_INDUSTRY_CHAIN :Industry chains
|
||||
STR_INDUSTRY_MENU_FUND_NEW_INDUSTRY :Fund new industry
|
||||
STR_TOWN_MENU_FOUND_TOWN :Found town
|
||||
############ range ends here
|
||||
|
||||
############ range for subsidies menu starts
|
||||
STR_SUBSIDIES_MENU_SUBSIDIES :Subsidies
|
||||
############ range ends here
|
||||
|
||||
############ range for graph menu starts
|
||||
STR_GRAPH_MENU_OPERATING_PROFIT_GRAPH :Operating profit graph
|
||||
STR_GRAPH_MENU_INCOME_GRAPH :Income graph
|
||||
@@ -427,6 +427,12 @@ STR_GRAPH_MENU_DETAILED_PERFORMANCE_RATING :Detailed perfor
|
||||
STR_GRAPH_MENU_HIGHSCORE :Highscore table
|
||||
############ range ends here
|
||||
|
||||
############ range for industry menu starts
|
||||
STR_INDUSTRY_MENU_INDUSTRY_DIRECTORY :Industry directory
|
||||
STR_INDUSTRY_MENU_INDUSTRY_CHAIN :Industry chains
|
||||
STR_INDUSTRY_MENU_FUND_NEW_INDUSTRY :Fund new industry
|
||||
############ range ends here
|
||||
|
||||
############ range for railway construction menu starts
|
||||
STR_RAIL_MENU_RAILROAD_CONSTRUCTION :Railway construction
|
||||
STR_RAIL_MENU_ELRAIL_CONSTRUCTION :Electrified railway construction
|
||||
@@ -466,7 +472,6 @@ STR_NEWS_MENU_DELETE_ALL_MESSAGES :Delete all mess
|
||||
############ range for about menu starts
|
||||
STR_ABOUT_MENU_LAND_BLOCK_INFO :Land area information
|
||||
STR_ABOUT_MENU_SEPARATOR :
|
||||
STR_ABOUT_MENU_TUTORIAL :{BLACK}Tutorial
|
||||
STR_ABOUT_MENU_TOGGLE_CONSOLE :Toggle console
|
||||
STR_ABOUT_MENU_AI_DEBUG :AI/Game script debug
|
||||
STR_ABOUT_MENU_SCREENSHOT :Screenshot
|
||||
@@ -717,7 +722,6 @@ STR_SMALLMAP_TOOLTIP_SHOW_LAND_OWNERS_ON_MAP :{BLACK}Show lan
|
||||
STR_SMALLMAP_TOOLTIP_INDUSTRY_SELECTION :{BLACK}Click on an industry type to toggle displaying it. Ctrl+Click disables all types except the selected one. Ctrl+Click on it again to enable all industry types
|
||||
STR_SMALLMAP_TOOLTIP_COMPANY_SELECTION :{BLACK}Click on a company to toggle displaying its property. Ctrl+Click disables all companies except the selected one. Ctrl+Click on it again to enable all companies
|
||||
STR_SMALLMAP_TOOLTIP_CARGO_SELECTION :{BLACK}Click on a cargo to toggle displaying its property. Ctrl+Click disables all cargoes except the selected one. Ctrl+Click on it again to enable all cargoes
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LEGEND :{BLACK}Show map legend / description of map symbols
|
||||
|
||||
STR_SMALLMAP_LEGENDA_ROADS :{TINY_FONT}{BLACK}Roads
|
||||
STR_SMALLMAP_LEGENDA_RAILROADS :{TINY_FONT}{BLACK}Railways
|
||||
@@ -1222,26 +1226,6 @@ STR_CONFIG_SETTING_SIGNALSIDE_HELPTEXT :Select on which
|
||||
STR_CONFIG_SETTING_SIGNALSIDE_LEFT :On the left
|
||||
STR_CONFIG_SETTING_SIGNALSIDE_DRIVING_SIDE :On the driving side
|
||||
STR_CONFIG_SETTING_SIGNALSIDE_RIGHT :On the right
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR :Vertical toolbar: {STRING2}
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR_HELPTEXT :Main toolbar is split into two vertical toolbars on the sides of the screen
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR :Compact vertical toolbar: {STRING2}
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR_HELPTEXT :No 'Switch toolbars' button in the vertical toolbar, but more sub-menus
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE :{BLACK}Button size
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE_TOOLTIP :{BLACK}Size of all user interface elements
|
||||
STR_CONFIG_SETTING_FONT_SIZE :{BLACK}Font size
|
||||
STR_CONFIG_SETTING_FONT_SIZE_TOOLTIP :{BLACK}Size of all game fonts
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION :Confirm actions: {STRING2}
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION_HELPTEXT :Show confirmation dialog when building roads and stations
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS :{BLACK}Title bars
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS_HELPTEXT :{BLACK}Show title bars for all windows, or hide them to save screen space
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS :Window decorations: {STRING2}
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS_HELPTEXT :Ornaments on window edges
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP :{BLACK}8 bit
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP_HELPTEXT :{BLACK}Set video color depth to 8 bits per pixel, this video mode supports water animation
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP :{BLACK}16 bit
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP_HELPTEXT :{BLACK}Set video color depth to 16 bits per pixel, this requires restart, this video mode does not support water animation
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP :{BLACK}24 bit
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP_HELPTEXT :{BLACK}Set video color depth to 24 bits per pixel, this video mode supports water animation
|
||||
STR_CONFIG_SETTING_SHOWFINANCES :Show finances window at the end of the year: {STRING2}
|
||||
STR_CONFIG_SETTING_SHOWFINANCES_HELPTEXT :If enabled, the finances window pops up at the end of each year to allow easy inspection of the financial status of the company
|
||||
STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT :New orders are 'non-stop' by default: {STRING2}
|
||||
@@ -2516,13 +2500,6 @@ STR_LANDSCAPING_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Raise a
|
||||
STR_LANDSCAPING_LEVEL_LAND_TOOLTIP :{BLACK}Level an area of land to the height of the first selected corner. Ctrl selects the area diagonally. Shift toggles building/showing cost estimate
|
||||
STR_LANDSCAPING_TOOLTIP_PURCHASE_LAND :{BLACK}Purchase land for future use. Shift toggles building/showing cost estimate
|
||||
|
||||
STR_TABLET_CLOSE :{BLACK}X
|
||||
STR_TABLET_CLOSE_TOOLTIP :{BLACK}Close all opened windows (except pinned ones)
|
||||
STR_TABLET_SHIFT :{BLACK}{TINY_FONT}Shft
|
||||
STR_TABLET_SHIFT_TOOLTIP :{BLACK}Press it for getting an estimated cost of executing an action
|
||||
STR_TABLET_CTRL :{BLACK}{TINY_FONT}Ctrl
|
||||
STR_TABLET_CTRL_TOOLTIP :{BLACK}Use it for actions that use the "CTRL" key
|
||||
|
||||
# Object construction window
|
||||
STR_OBJECT_BUILD_CAPTION :{WHITE}Object Selection
|
||||
STR_OBJECT_BUILD_TOOLTIP :{BLACK}Select object to build. Shift toggles building/showing cost estimate
|
||||
@@ -2793,14 +2770,6 @@ STR_FRAMETIME_CAPTION_AI :AI {NUM} {RAW_S
|
||||
############ End of leave-in-this-order
|
||||
|
||||
|
||||
STR_TUTORIAL_WINDOW_TITLE :{BLACK}Tutorial videos
|
||||
STR_TUTORIAL_WINDOW_TOOLTIP :{BLACK}Open a video player to watch tutorial videos
|
||||
STR_TUTORIAL_ROADS_AND_STATIONS :{BLACK}Building roads and stations, buying vehicles
|
||||
STR_TUTORIAL_RAILWAYS :{BLACK}Railways and trains
|
||||
STR_TUTORIAL_ROAD_VEHICLES :{BLACK}Road vehicles
|
||||
STR_TUTORIAL_SHIPS :{BLACK}Ships and docks
|
||||
STR_TUTORIAL_CARGO :{BLACK}Cargo types
|
||||
|
||||
# Save/load game/scenario
|
||||
STR_SAVELOAD_SAVE_CAPTION :{WHITE}Save Game
|
||||
STR_SAVELOAD_LOAD_CAPTION :{WHITE}Load Game
|
||||
@@ -2819,10 +2788,6 @@ STR_SAVELOAD_SAVE_TOOLTIP :{BLACK}Save the
|
||||
STR_SAVELOAD_LOAD_BUTTON :{BLACK}Load
|
||||
STR_SAVELOAD_LOAD_TOOLTIP :{BLACK}Load the selected game
|
||||
STR_SAVELOAD_LOAD_HEIGHTMAP_TOOLTIP :{BLACK}Load the selected heightmap
|
||||
STR_SAVELOAD_LOAD_NETWORK_BUTTON :{BLACK}Load from network
|
||||
STR_SAVELOAD_LOAD_NETWORK_TOOLTIP :{BLACK}Load a game from the network storage
|
||||
STR_SAVELOAD_SAVE_NETWORK_BUTTON :{BLACK}Save to network
|
||||
STR_SAVELOAD_SAVE_NETWORK_TOOLTIP :{BLACK}Back up the game to the network storage
|
||||
STR_SAVELOAD_DETAIL_CAPTION :{BLACK}Game Details
|
||||
STR_SAVELOAD_DETAIL_NOT_AVAILABLE :{BLACK}No information available
|
||||
STR_SAVELOAD_DETAIL_COMPANY_INDEX :{SILVER}{COMMA}: {WHITE}{STRING1}
|
||||
@@ -4352,7 +4317,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... this
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... road facing in the wrong direction
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... drive through stops can't have corners
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... drive through stops can't have junctions
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... road is one way or blocked
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Can't remove part of station...
|
||||
|
||||
@@ -4897,5 +4897,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4317,7 +4317,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... this
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... road facing in the wrong direction
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... drive through stops can't have corners
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... drive through stops can't have junctions
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... road is one way or blocked
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Can't remove part of station...
|
||||
@@ -5068,5 +5067,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4311,5 +4311,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4284,7 +4284,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... see
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... tee on vales suunas
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... nurgad ei saa läbisõidupeatustes olla
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... ristmikud ei saa olla läbisõidupeatustes
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... tee on ühesuunaline või blokeeritud
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Siinset jaamablokki ei saa lammutada...
|
||||
@@ -5033,5 +5032,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4455,5 +4455,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4317,7 +4317,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... kunt
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... tie on väärin päin
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... läpiajettavissa pysäkeissä ei voi olla mutkia
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... läpiajettavissa pysäkeissä ei voi olla risteyksiä
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... tie on yksisuuntainen tai suljettu
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Aseman osaa ei voi poistaa...
|
||||
@@ -5068,5 +5067,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4318,7 +4318,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... cett
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... mauvaise orientation de la route
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... les arrêts ne peuvent pas avoir de virages
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... les arrêts ne peuvent pas avoir de jonctions
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... la route est à sens unique ou bloquée
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Impossible de supprimer une partie de la gare...
|
||||
@@ -5069,5 +5068,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4496,7 +4496,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... tha
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... tha comhair an rathaid cearr
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... chan urrainn dha dh’oiseanan a bhith aig stèiseanan draibhidh troimhe
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... chan urrainn dha ghoibhlean a bhith aig stèiseanan draibhidh troimhe
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... rathad aon-shligheach no bacte
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Cha ghabh pàirt dhen stèisean toirt air falbh...
|
||||
@@ -5404,41 +5403,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
STR_ABOUT_MENU_TUTORIAL :Oideachadh
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LEGEND :{BLACK}Seall treòir a' mhapa / tuairisgeulan air samhlaidhean a' mhapa
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR :Bàr-inneal inghearach: {STRING}
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR_HELPTEXT :Thèid am prìomh bhàr-inneal a sgoltadh 'na bhàraichean-inneal inghearach ri dà thaobh an sgrìn
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR :Bàr-inneal inghearach dùmhlaichte: {STRING}
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR_HELPTEXT :Cha bhi putan air a' bhàr-inneal inghearach gus leum a ghearradh gu bàr-inneal eile ach bidh barrachd fo-chlàran-taice aige
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE :Meud nam putan
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE_TOOLTIP :Meud aig a h-uile nì an eadar-aghaidh
|
||||
STR_CONFIG_SETTING_FONT_SIZE :Meud a' chrutha-chlò
|
||||
STR_CONFIG_SETTING_FONT_SIZE_TOOLTIP :{BLACK}Am meud air gach cruth-clò a' gheama
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION :Dearbhaich na gnìomhan: {STRING}
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION_HELPTEXT :Seall còmhradh dearbhaidh le togail rathaidean is stèiseanan
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS :{BLACK}Bàraichean-tiotail
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS_HELPTEXT :{BLACK}Seall bàr-tiotail air gach uinneag no falaich iad gus rum a shàbhaladh air an sgrìn
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS :Sgeadachadh nan uinneagan: {STRING}
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS_HELPTEXT :Sgeadachadh air oirean nan uinneagan
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP :8 biod
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP_HELPTEXT :Suidhich doimhneachd nan dath aig a' video gu 8 biod gach piogsail. Cuiridh am modh video sin taic ri beòthachadh uisge
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP :16 biod
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP_HELPTEXT :Suidhich doimhneachd nan dath aig a' video gu 16 biod gach piogsail. Bidh feum air ath-thòiseachadh. Cha chuir am modh video sin taic ri beòthachadh uisge
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP :24 biod
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP_HELPTEXT :Suidhich doimhneachd nan dath aig a' video gu 24 biod gach piogsail. Cuiridh am modh video sin taic ri beòthachadh uisge
|
||||
STR_TABLET_CLOSE_TOOLTIP :{BLACK}Dùin a h-uile uinneag (seach an fheadhainn phrìnichte)
|
||||
STR_TABLET_SHIFT_TOOLTIP :{BLACK}Brùth air gus tuairmse air cosgaisean gnìomha fhaighinn
|
||||
STR_TABLET_CTRL_TOOLTIP :{BLACK}Cleachd e airson gnìomhan a chleachdas an iuchair "CTRL"
|
||||
STR_TUTORIAL_WINDOW_TITLE :{BLACK}Videothan oideachaidh
|
||||
STR_TUTORIAL_WINDOW_TOOLTIP :{BLACK}Fosgail cluicheadair video gus coimhead air videothan oideachaidh
|
||||
STR_TUTORIAL_ROADS_AND_STATIONS :{BLACK}Togail rathaidean is stèiseanan, ceannach charbadan
|
||||
STR_TUTORIAL_RAILWAYS :{BLACK}Slighean rèile is trèanaichean
|
||||
STR_TUTORIAL_ROAD_VEHICLES :{BLACK}Carbadan-rathaid
|
||||
STR_TUTORIAL_SHIPS :{BLACK}Longan is puirt
|
||||
STR_TUTORIAL_CARGO :{BLACK}Seòrsaichean carago
|
||||
STR_SAVELOAD_LOAD_NETWORK_BUTTON :{BLACK}Luchdaich on lìonra
|
||||
STR_SAVELOAD_LOAD_NETWORK_TOOLTIP :{BLACK}Luchdaich geama o stòras an lìonraidh
|
||||
STR_SAVELOAD_SAVE_NETWORK_BUTTON :{BLACK}Sàbhail dhan lìonra
|
||||
STR_SAVELOAD_SAVE_NETWORK_TOOLTIP :{BLACK}Cuir lethbhreac-glèidhidh dhen gheama gu stòras an lìonraidh
|
||||
|
||||
@@ -4969,5 +4969,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4302,7 +4302,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... dies
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... Straße verläuft in die falsche Richtung
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... Bus- und Lkw-Haltestellen können nicht um die Kurve gehen
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... Bus- und Lkw-Haltestellen können keine Abzweigung haben
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}...Einbahnstraße oder blockierter Weg
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Dieser Teil der Station kann nicht entfernt werden...
|
||||
@@ -5053,38 +5052,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
STR_ABOUT_MENU_TUTORIAL :Tutorial
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LEGEND :{BLACK}Zeige Kartenlegende / Beschreibung der Kartensymbole
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR :Vertikale Werkzeugsleiste: {STRING}
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR_HELPTEXT :Hauptwerzeugleiste ist in zwei vertikale Leisten an den Bildschirmseiten aufgeteilt
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR :Kompakte vertikale Werkzeugleiste: {STRING}
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE :Schaltflächengröße
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE_TOOLTIP :Größe aller Elemente der Benutzeroberfläche
|
||||
STR_CONFIG_SETTING_FONT_SIZE :{BLACK}Schriftgröße
|
||||
STR_CONFIG_SETTING_FONT_SIZE_TOOLTIP :Größe aller Schriftarten
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION :Aktionen bestätigen: {STRING}
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION_HELPTEXT :Zeige Bestätigungsdialog bei Straßen- und Haltenstellebau
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS :{BLACK}Titelleisten
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS_HELPTEXT :{BLACK}Zeige in allen Fenstern die Titelleiste an oder verbirg sie, um Platz zu sparen.
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP :8 bit
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP_HELPTEXT :Setzt die Farbtiefe auf 8 Bits per Pixel. Dieser Modus unterstützt Wasseranimation
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP :16 bit
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP_HELPTEXT :{BLACK}Setzt die Farbtiefe auf 16 Bit per Pixel. Erfordert einen Neustart. Dieser Modus unterstützt keine Wasseranimation
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP :24 bit
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP_HELPTEXT :Setzt die Farbtiefe auf 24 Bits per Pixel. Dieser Modus unterstützt Wasseranimation
|
||||
STR_TABLET_CLOSE_TOOLTIP :{BLACK}Schließe alle offene Fenster (außer festgepinnte)
|
||||
STR_TABLET_SHIFT_TOOLTIP :{BLACK}Drücke hier, um eine Kostenabschätzung für die Durchführung einer Aktion zu erhalten
|
||||
STR_TABLET_CTRL_TOOLTIP :{BLACK}Für Aktionen benutzen, welche die "STRG" Taste benutzen
|
||||
STR_TUTORIAL_WINDOW_TITLE :{BLACK}Tutorial Videos
|
||||
STR_TUTORIAL_WINDOW_TOOLTIP :{BLACK}Öffne einen Videoplayer, um Tutorial videos anzuschauen
|
||||
STR_TUTORIAL_ROADS_AND_STATIONS :{BLACK}Strassen und Haltestellen bauen, Fahrzeuge kaufen
|
||||
STR_TUTORIAL_RAILWAYS :{BLACK}Eisenbahnen und Züge
|
||||
STR_TUTORIAL_ROAD_VEHICLES :{BLACK}Straßenfahrzeuge
|
||||
STR_TUTORIAL_SHIPS :{BLACK}Schiffe und Docks
|
||||
STR_TUTORIAL_CARGO :{BLACK}Warentypen
|
||||
STR_SAVELOAD_LOAD_NETWORK_BUTTON :{BLACK}Laden vom Netzwerk
|
||||
STR_SAVELOAD_LOAD_NETWORK_TOOLTIP :{BLACK}Öffne ein Spiel aus dem Netzwerkspeicher
|
||||
STR_SAVELOAD_SAVE_NETWORK_BUTTON :{BLACK}Speichern ins Netzwerk
|
||||
STR_SAVELOAD_SAVE_NETWORK_TOOLTIP :{BLACK}Spiel zurück in den Netzwerkspeicher backupen
|
||||
|
||||
@@ -4430,7 +4430,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... αυ
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... ο δρόμος βλέπει σε λάθος κατεύθυνση
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... οι μη τερματικοί σταθμοί δε μπορούν να έχουν στροφές
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... οι μη τερματικοί σταθμοί δε μπορούν να έχουν διασταυρώσεις
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... ο δρόμος είναι μονόδρομος η μπλοκαρισμένος
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Δεν μπορεί να αφαιρεθεί μέρος του σταθμού...
|
||||
@@ -5185,5 +5184,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4275,7 +4275,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... כב
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}הכביש פונה לכיוון לא נכון...
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... לתחנות "על הדרך" לא יכולות להיות פינות
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... לתחנות "על הדרך" לא יכולות להיות צמתים
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... הדרך חד כיוונית או חסומה
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}... לא ניתן לבטל חלק מהתחנה
|
||||
@@ -5028,5 +5027,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4381,7 +4381,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... ez e
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... az út a másik irányba vezet
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... áthaladó megállóhelyeken nem lehet kanyar
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... áthaladó megállóhelyeken nem lehet elágazás
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... az út egyirányú vagy blokkolt
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Nem lehet eltávolítani az állomás részét...
|
||||
@@ -5173,5 +5172,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4706,5 +4706,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4249,7 +4249,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... jala
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... menghadap pada arah yang salah
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... terminal lintas-lalu tak bisa memiliki sudut
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... terminal lintas-lalu tak bisa memiliki simpangan
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... jalannya satu arah atau terhalang
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Tidak dapat menghapus bagian dari stasiun...
|
||||
@@ -5000,5 +4999,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4949,5 +4949,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4347,7 +4347,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... ques
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... strada rivolta nella direzione sbagliata
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... le fermate passanti non possono trovarsi in curva
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... le fermate passanti non possono avere raccordi
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... la strada è bloccata o a senso unico
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Impossibile rimuovere parte della stazione...
|
||||
@@ -5098,35 +5097,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
STR_ABOUT_MENU_TUTORIAL :Istruzioni
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LEGEND :{BLACK}Mostra la legenda della mappa / descrizione dei simboli della mappa
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR :Barra degli strumenti verticale: {STRING}
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR_HELPTEXT :La barra degli strumenti è divisa in due barre verticali sui lati dello schermo
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE :Dimensioni dei pulsanti
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE_TOOLTIP :Dimensioni degli elementi dell'interfaccia
|
||||
STR_CONFIG_SETTING_FONT_SIZE :Dimensioni dei caratteri
|
||||
STR_CONFIG_SETTING_FONT_SIZE_TOOLTIP :Dimensioni dei caratteri nel gioco
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION :Conferma: {STRING}
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION_HELPTEXT :Mostra il dialogo di conferma durante la costruzione di strade e stazioni
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP :8 bit
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP_HELPTEXT :Imposta i colori a 8 bit per pixel. Questa modalità video supporta l'animazione dell'acqua
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP :16 bit
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP_HELPTEXT :Imposta i colori a 16 bit per pixel (richiede il riavvio). Questa modalità video non supporta l'animazione dell'acqua
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP :24 bit
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP_HELPTEXT :Imposta i colori a 24 bit per pixel. Questa modalità video supporta l'animazione dell'acqua
|
||||
STR_TABLET_CLOSE_TOOLTIP :{BLACK}Chiude tutte le schermate aperte (eccetto quelle permanenti)
|
||||
STR_TABLET_SHIFT_TOOLTIP :{BLACK}Premi questo tasto per una stima dei costi dell'azione desiderata
|
||||
STR_TABLET_CTRL_TOOLTIP :{BLACK}Usa per le azioni che usano il tasto "CTRL"
|
||||
STR_TUTORIAL_WINDOW_TITLE :{BLACK}Video di aiuto
|
||||
STR_TUTORIAL_WINDOW_TOOLTIP :{BLACK}Apri un'applicazione video per guardare i video di aiuto
|
||||
STR_TUTORIAL_ROADS_AND_STATIONS :{BLACK}Costruzione di strade e stazioni; acquisto di veicoli
|
||||
STR_TUTORIAL_RAILWAYS :{BLACK}Ferrovie e treni
|
||||
STR_TUTORIAL_ROAD_VEHICLES :{BLACK}Veicoli stradali
|
||||
STR_TUTORIAL_SHIPS :{BLACK}Navi e attracchi
|
||||
STR_TUTORIAL_CARGO :{BLACK}Tipi di merce
|
||||
STR_SAVELOAD_LOAD_NETWORK_BUTTON :{BLACK}Carica dalla rete
|
||||
STR_SAVELOAD_LOAD_NETWORK_TOOLTIP :{BLACK}Carica il gioco dalla memoria di rete
|
||||
STR_SAVELOAD_SAVE_NETWORK_BUTTON :{BLACK}Salva sulla rete
|
||||
STR_SAVELOAD_SAVE_NETWORK_TOOLTIP :{BLACK}Salva il gioco nella memoria di rete
|
||||
|
||||
@@ -4952,41 +4952,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
STR_ABOUT_MENU_TUTORIAL : {BLACK}チュートリアル
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LEGEND :{BLACK}マップシンボルについての説明の表示
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR :垂直ツールバー: {STRING}
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR_HELPTEXT :メインツールバーをスクリーンの両脇に垂直に2つに分割します
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR :コンパクト垂直ツールバー: {STRING}
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR_HELPTEXT :ツールバー切り替えボタンを垂直ツールバーから無くすかわりに、サブメニューを増やします
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE : {BLACK}ボタンサイズ
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE_TOOLTIP : {BLACK}すべてのユーザーインターフェースの構成サイズ
|
||||
STR_CONFIG_SETTING_FONT_SIZE : {BLACK}フォントサイズ
|
||||
STR_CONFIG_SETTING_FONT_SIZE_TOOLTIP : {BLACK}全てのゲームのフォント
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION :アクションの確認: {STRING}
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION_HELPTEXT :道路とステーションの建設時に確認のダイアログの表示
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS :{BLACK}タイトルバー
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS_HELPTEXT :{BLACK}ウィンドウのタイトルバーを表示するか、隠して画面のスペースを確保するか選べます
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS :ウィンドウの装飾: {STRING}
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS_HELPTEXT :ウィンドウの縁を装飾します
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP : {BLACK}8 bit
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP_HELPTEXT : {BLACK}色深度を8 bppに設定します 再起動が必要です このビデオモードは水のアニメーションに対応していません
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP :{BLACK}16 bit
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP_HELPTEXT : {BLACK}色深度を16 bppに設定します 再起動が必要です このビデオモードは水のアニメーションに対応していません
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP : {BLACK}24 bit
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP_HELPTEXT : {BLACK}色深度を24 bppに設定します 再起動が必要です このビデオモードは水のアニメーションに対応していません
|
||||
STR_TABLET_CLOSE_TOOLTIP :{BLACK}全ての開いているウィンドウを閉じます (固定してあるものは除く)
|
||||
STR_TABLET_SHIFT_TOOLTIP :{BLACK}押すことでアクションの決定時に費用の見積もりができます
|
||||
STR_TABLET_CTRL_TOOLTIP :{BLACK} "CTRL" キーを使うアクションのために使います
|
||||
STR_TUTORIAL_WINDOW_TITLE :{BLACK}チュートリアル動画
|
||||
STR_TUTORIAL_WINDOW_TOOLTIP :{BLACK}チュートリアル動画を見るためにビデオプレイヤーを開きます
|
||||
STR_TUTORIAL_ROADS_AND_STATIONS :{BLACK}道路とステーションの建設と、車両の購入
|
||||
STR_TUTORIAL_RAILWAYS :{BLACK}鉄道と列車
|
||||
STR_TUTORIAL_ROAD_VEHICLES :{BLACK}道路車両
|
||||
STR_TUTORIAL_SHIPS :{BLACK}船とドック
|
||||
STR_TUTORIAL_CARGO :{BLACK}貨物のタイプ
|
||||
STR_SAVELOAD_LOAD_NETWORK_BUTTON :{BLACK}ネットワークからロード
|
||||
STR_SAVELOAD_LOAD_NETWORK_TOOLTIP :{BLACK}ネットワークストレージからゲームをロード
|
||||
STR_SAVELOAD_SAVE_NETWORK_BUTTON :{BLACK}ネットワークにセーブ
|
||||
STR_SAVELOAD_SAVE_NETWORK_TOOLTIP :{BLACK}ネットワークストレージにゲームをバックアップ
|
||||
|
||||
@@ -4318,7 +4318,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... 여
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... 도로의 방향과 일치하지 않습니다.
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... 도로 통과 정류장은 곡선도로에 건설할 수 없습니다.
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... 도로 통과 정류장은 교차로에 건설할 수 없습니다.
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... 도로가 일방통행이거나 막혔습니다
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}역의 일부를 제거할 수 없습니다...
|
||||
@@ -5069,41 +5068,3 @@ STR_PLANE :{G=f}{BLACK}{PL
|
||||
STR_SHIP :{G=f}{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
STR_ABOUT_MENU_TUTORIAL : {BLACK}튜토리얼
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LEGEND :{BLACK}지도 범례 / 기호 설명을 보여줌
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR :수직 작업창: {STRING}
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR_HELPTEXT :메인 작업창이 두 개의 화면 양쪽 두개의 수직 작업창으로 나뉨
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR :소형 수직 작업창: {STRING}
|
||||
STR_CONFIG_SETTING_COMPACT_VERTICAL_TOOLBAR_HELPTEXT :수직 작업창에 '작업창 바꾸기'메뉴가 없지만, 부 메뉴가 추가로 있음
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE : {BLACK}버튼 크기
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE_TOOLTIP : {BLACK}모든 사용자 인터페이스의 크기
|
||||
STR_CONFIG_SETTING_FONT_SIZE :{BLACK}폰트 크기
|
||||
STR_CONFIG_SETTING_FONT_SIZE_TOOLTIP :{BLACK}모든 게임 폰트의 크기
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION :명령 확인: {STRING}
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION_HELPTEXT :도로와 정류장을 건설시 확인 팝업을 보임
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS :이름 창
|
||||
STR_CONFIG_SETTING_WINDOWS_TITLEBARS_HELPTEXT :{BLACK}모든 창에 대해 이름을 보여주거나, 화면 공간 절약을 위해 이름을 가리기
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS :창 꾸미기: {STRING}
|
||||
STR_CONFIG_SETTING_WINDOWS_DECORATIONS_HELPTEXT :창 모서리에 꾸밈 효과
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP : {BLACK}8비트
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP_HELPTEXT :그래픽 색상 심도를 픽셀당 8비트로 설정합니다. 이 그래픽 모드는 물이 흐르는 애니메이션 효과를 표현할 수 있습니다.
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP : {BLACK}16비트
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP_HELPTEXT :{BLACK}그래픽 색상 심도를 픽셀당 16비트로 설정합니다. 이 그래픽 모드는 물이 흐르는 애니메이션 효과를 표현할 수 있습니다.
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP :{BLACK}24비트
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP_HELPTEXT :그래픽 색상 심도를 픽셀당 24비트로 설정합니다. 이 그래픽 모드는 물이 흐르는 애니메이션 효과를 표현할 수 있습니다.
|
||||
STR_TABLET_CLOSE_TOOLTIP :{BLACK}열려있는 모든 창 닫기 (고정된 창 제외)
|
||||
STR_TABLET_SHIFT_TOOLTIP :{BLACK}이 행동을 하기 위한 예상 비용을 알아보려면 누르세요.
|
||||
STR_TABLET_CTRL_TOOLTIP :{BLACK}"컨트롤"키를 이용하는 명령을 위해 사용
|
||||
STR_TUTORIAL_WINDOW_TITLE :{BLACK}튜토리얼 영상
|
||||
STR_TUTORIAL_WINDOW_TOOLTIP :{BLACK}튜토리얼 영상을 보기 위해 비디오 플레이어를 열기
|
||||
STR_TUTORIAL_ROADS_AND_STATIONS :{BLACK}도로, 역 건설 및 차량 구입
|
||||
STR_TUTORIAL_RAILWAYS :{BLACK}선로 및 열차
|
||||
STR_TUTORIAL_ROAD_VEHICLES :{BLACK}차량
|
||||
STR_TUTORIAL_SHIPS :{BLACK}선박과 항구
|
||||
STR_TUTORIAL_CARGO :{BLACK}화물 종류
|
||||
STR_SAVELOAD_LOAD_NETWORK_BUTTON :{BLACK}네트워크에서 불러오기
|
||||
STR_SAVELOAD_LOAD_NETWORK_TOOLTIP :{BLACK}네트워크 저장소에서 불러오기
|
||||
STR_SAVELOAD_SAVE_NETWORK_BUTTON :{BLACK}네트워크에 저장
|
||||
STR_SAVELOAD_SAVE_NETWORK_TOOLTIP :{BLACK}네트워크 저장소로 게임을 백업
|
||||
|
||||
@@ -4479,7 +4479,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... via
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... viae directio non convenit
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... stationi perviae non licet esse curva
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... stationi perviae non licet compita habere
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... via est monodromus vel obstructa
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Non licet partem stationis removere...
|
||||
@@ -5345,35 +5344,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
STR_ABOUT_MENU_TUTORIAL :Rudimentum
|
||||
STR_SMALLMAP_TOOLTIP_SHOW_LEGEND :{BLACK}Monstrare formulam graphicam / descriptionem tabulae
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR :Arca instrumentorum directa: {STRING}
|
||||
STR_CONFIG_SETTING_VERTICAL_TOOLBAR_HELPTEXT :Si vis, arca instrumentorum prima dividitur in partes duas apud margines scrinii
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE :Magnitudo globulorum
|
||||
STR_CONFIG_SETTING_BUTTON_SIZE_TOOLTIP :Magnitudo omnium elementorum interfaciei
|
||||
STR_CONFIG_SETTING_FONT_SIZE :Magnitudo fontis typographici
|
||||
STR_CONFIG_SETTING_FONT_SIZE_TOOLTIP :Magnitudo omnium fontium typographicorum in ludo
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION :Confirmare: {STRING}
|
||||
STR_CONFIG_SETTING_BUILD_CONFIRMATION_HELPTEXT :Monstrare confirmationem dum struuntur stationes viaeque
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP :8bpp
|
||||
STR_CONFIG_SETTING_VIDEO_8BPP_HELPTEXT :Eligere modum coloris 8bpp; hic sinit colores aquae moventes
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP :16bpp
|
||||
STR_CONFIG_SETTING_VIDEO_16BPP_HELPTEXT :Eligere modum coloris 16bpp (necesse erit programma exire et resumere); hic NON sinit colores aquae moventes
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP :24bpp
|
||||
STR_CONFIG_SETTING_VIDEO_24BPP_HELPTEXT :Eligere modum coloris 24bpp; hic sinit colores aquae moventes
|
||||
STR_TABLET_CLOSE_TOOLTIP :{BLACK}Claudere omnes fenestras (sed non glutinosas)
|
||||
STR_TABLET_SHIFT_TOOLTIP :{BLACK}Preme ut aestimatio actionis monstretur
|
||||
STR_TABLET_CTRL_TOOLTIP :{BLACK}Utendum est ad actiones cum "CTRL"
|
||||
STR_TUTORIAL_WINDOW_TITLE :{BLACK}Rudimenta visifica
|
||||
STR_TUTORIAL_WINDOW_TOOLTIP :{BLACK}Aperire programma visificum ad rudimenta videnda
|
||||
STR_TUTORIAL_ROADS_AND_STATIONS :{BLACK}Viae stationesque, emptio vehiculorum
|
||||
STR_TUTORIAL_RAILWAYS :{BLACK}Ferriviae traminaque
|
||||
STR_TUTORIAL_ROAD_VEHICLES :{BLACK}Vehicula viaria
|
||||
STR_TUTORIAL_SHIPS :{BLACK}Naves navaliaque
|
||||
STR_TUTORIAL_CARGO :{BLACK}Genera onerum
|
||||
STR_SAVELOAD_LOAD_NETWORK_BUTTON :{BLACK}Legere e nebula
|
||||
STR_SAVELOAD_LOAD_NETWORK_TOOLTIP :{BLACK}Arcessere ludum "e nebula" (i.e. ex Interreti)
|
||||
STR_SAVELOAD_SAVE_NETWORK_BUTTON :{BLACK}Servare in nebula
|
||||
STR_SAVELOAD_SAVE_NETWORK_TOOLTIP :{BLACK}Conservare ludum "in nebula" (i.e. in Interreti)
|
||||
|
||||
@@ -4878,5 +4878,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -5489,5 +5489,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4276,7 +4276,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... d'St
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... Strooss geet an dei falsch Richtung
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... Duerchfahrtstops kënnen keng Kéiren hunn
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... Duerchfahrtstops kënnen keng Kräizungen hunn
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... Einbahnstrooss oder blockéiert
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Kann den Deel vun der Gare net ofrappen...
|
||||
@@ -5027,5 +5026,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4620,5 +4620,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4322,7 +4322,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... denn
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... veien vender i feil retning
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... gjennomkjøringsstopper kan ikke ha hjørner
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... gjennomkjøringsstopper kan ikke ha kryss
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... veien er enveiskjørt eller blokkert
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Kan ikke fjerne del av stasjonen...
|
||||
@@ -5073,5 +5072,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4865,5 +4865,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4666,7 +4666,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... ta d
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... droga jest zorientowana w złym kierunku
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... przystanki przelotowe nie mogą mieć zakrętów
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... przystanki przelotowe nie mogą mieć skrzyżowań
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... droga jest jednokierunkowa lub zablokowana
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Nie można usunąć części stacji...
|
||||
@@ -5454,5 +5453,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
@@ -4318,7 +4318,6 @@ STR_ERROR_DRIVE_THROUGH_ON_TOWN_ROAD :{WHITE}... esta
|
||||
STR_ERROR_DRIVE_THROUGH_DIRECTION :{WHITE}... estrada orientada na direcção incorrecta
|
||||
STR_ERROR_DRIVE_THROUGH_CORNER :{WHITE}... estações de passagem não podem ter curvas
|
||||
STR_ERROR_DRIVE_THROUGH_JUNCTION :{WHITE}... estações de passagem não podem ter cruzamentos
|
||||
STR_ERROR_DRIVE_THROUGH_ON_ONEWAY_ROAD :{WHITE}... estrada de sentido único ou bloqueada
|
||||
|
||||
# Station destruction related errors
|
||||
STR_ERROR_CAN_T_REMOVE_PART_OF_STATION :{WHITE}Não é possível remover parte da estação...
|
||||
@@ -5069,5 +5068,3 @@ STR_PLANE :{BLACK}{PLANE}
|
||||
STR_SHIP :{BLACK}{SHIP}
|
||||
|
||||
STR_TOOLBAR_RAILTYPE_VELOCITY :{STRING} ({VELOCITY})
|
||||
|
||||
# Android strings
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user