; 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/>.
;

; GUI settings as stored in the main configuration file ("openttd.cfg").

[pre-amble]
static void v_PositionMainToolbar(int32 new_value);
static void v_PositionStatusbar(int32 new_value);
static void RedrawSmallmap(int32 new_value);
static void InvalidateCompanyLiveryWindow(int32 new_value);
static void InvalidateNewGRFChangeWindows(int32 new_value);
static void ZoomMinMaxChanged(int32 new_value);
static void SpriteZoomMinChanged(int32 new_value);

static constexpr std::initializer_list<const char*> _autosave_interval{"off", "monthly", "quarterly", "half year", "yearly"};
static constexpr std::initializer_list<const char*> _osk_activation{"disabled", "double", "single", "immediately"};
static constexpr std::initializer_list<const char*> _savegame_date{"long", "short", "iso"};

static const SettingVariant _gui_settings_table[] = {
[post-amble]
};
[templates]
SDTC_BOOL  =  SDTC_BOOL(              $var,        $flags, $def,                              $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to,        $cat, $extra, $startup),
SDTC_OMANY = SDTC_OMANY(              $var, $type, $flags, $def,             $max, $full,     $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to,        $cat, $extra, $startup),
SDTC_VAR   =   SDTC_VAR(              $var, $type, $flags, $def,       $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to,        $cat, $extra, $startup),

[validation]
SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
SDTC_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");

[defaults]
flags    = SF_NONE
interval = 0
str      = STR_NULL
strhelp  = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
strval   = STR_NULL
pre_cb   = nullptr
post_cb  = nullptr
load     = nullptr
from     = SL_MIN_VERSION
to       = SL_MAX_VERSION
cat      = SC_ADVANCED
extra    = 0
startup  = false


[SDTC_OMANY]
var      = gui.autosave
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 1
max      = 4
full     = _autosave_interval
str      = STR_CONFIG_SETTING_AUTOSAVE
strhelp  = STR_CONFIG_SETTING_AUTOSAVE_HELPTEXT
strval   = STR_GAME_OPTIONS_AUTOSAVE_DROPDOWN_OFF
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.threaded_saves
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
cat      = SC_EXPERT

[SDTC_OMANY]
var      = gui.date_format_in_default_names
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 2
max      = 2
full     = _savegame_date
str      = STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES
strhelp  = STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_HELPTEXT
strval   = STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_LONG

[SDTC_BOOL]
var      = gui.show_finances
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
str      = STR_CONFIG_SETTING_SHOWFINANCES
strhelp  = STR_CONFIG_SETTING_SHOWFINANCES_HELPTEXT
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.auto_scrolling
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 0
min      = 0
max      = 3
str      = STR_CONFIG_SETTING_AUTOSCROLL
strhelp  = STR_CONFIG_SETTING_AUTOSCROLL_HELPTEXT
strval   = STR_CONFIG_SETTING_AUTOSCROLL_DISABLED
cat      = SC_BASIC

[SDTC_VAR]
ifdef    = __EMSCRIPTEN__
var      = gui.scroll_mode
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 2
min      = 0
max      = 3
str      = STR_CONFIG_SETTING_SCROLLMODE
strhelp  = STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT
strval   = STR_CONFIG_SETTING_SCROLLMODE_DEFAULT
cat      = SC_BASIC

[SDTC_VAR]
ifndef    = __EMSCRIPTEN__
var      = gui.scroll_mode
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 0
min      = 0
max      = 3
str      = STR_CONFIG_SETTING_SCROLLMODE
strhelp  = STR_CONFIG_SETTING_SCROLLMODE_HELPTEXT
strval   = STR_CONFIG_SETTING_SCROLLMODE_DEFAULT
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.smooth_scroll
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
str      = STR_CONFIG_SETTING_SMOOTH_SCROLLING
strhelp  = STR_CONFIG_SETTING_SMOOTH_SCROLLING_HELPTEXT

[SDTC_BOOL]
var      = gui.right_mouse_wnd_close
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
str      = STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE
strhelp  = STR_CONFIG_SETTING_RIGHT_MOUSE_WND_CLOSE_HELPTEXT
cat      = SC_BASIC

; We might need to emulate a right mouse button on mac
[SDTC_VAR]
ifdef    = __APPLE__
var      = gui.right_mouse_btn_emulation
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 0
min      = 0
max      = 2
str      = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU
strhelp  = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_HELPTEXT
strval   = STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_COMMAND
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.measure_tooltip
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
str      = STR_CONFIG_SETTING_MEASURE_TOOLTIP
strhelp  = STR_CONFIG_SETTING_MEASURE_TOOLTIP_HELPTEXT
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.errmsg_duration
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 5
min      = 0
max      = 20
str      = STR_CONFIG_SETTING_ERRMSG_DURATION
strhelp  = STR_CONFIG_SETTING_ERRMSG_DURATION_HELPTEXT
strval   = STR_CONFIG_SETTING_ERRMSG_DURATION_VALUE

[SDTC_VAR]
var      = gui.hover_delay_ms
type     = SLE_UINT16
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL
def      = 250
min      = 50
max      = 6000
interval = 50
str      = STR_CONFIG_SETTING_HOVER_DELAY
strhelp  = STR_CONFIG_SETTING_HOVER_DELAY_HELPTEXT
strval   = STR_CONFIG_SETTING_HOVER_DELAY_VALUE

[SDTC_OMANY]
var      = gui.osk_activation
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
str      = STR_CONFIG_SETTING_OSK_ACTIVATION
strhelp  = STR_CONFIG_SETTING_OSK_ACTIVATION_HELPTEXT
strval   = STR_CONFIG_SETTING_OSK_ACTIVATION_DISABLED
flags    = SF_GUI_DROPDOWN
full     = _osk_activation
def      = 1
min      = 0
max      = 3
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.toolbar_pos
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 1
min      = 0
max      = 2
str      = STR_CONFIG_SETTING_TOOLBAR_POS
strhelp  = STR_CONFIG_SETTING_TOOLBAR_POS_HELPTEXT
strval   = STR_CONFIG_SETTING_HORIZONTAL_POS_LEFT
post_cb  = v_PositionMainToolbar
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.statusbar_pos
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 1
min      = 0
max      = 2
str      = STR_CONFIG_SETTING_STATUSBAR_POS
strhelp  = STR_CONFIG_SETTING_STATUSBAR_POS_HELPTEXT
strval   = STR_CONFIG_SETTING_HORIZONTAL_POS_LEFT
post_cb  = v_PositionStatusbar
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.window_snap_radius
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL
def      = 10
min      = 1
max      = 32
str      = STR_CONFIG_SETTING_SNAP_RADIUS
strhelp  = STR_CONFIG_SETTING_SNAP_RADIUS_HELPTEXT
strval   = STR_CONFIG_SETTING_SNAP_RADIUS_VALUE
cat      = SC_EXPERT

[SDTC_VAR]
var      = gui.window_soft_limit
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL
def      = 20
min      = 5
max      = 255
interval = 1
str      = STR_CONFIG_SETTING_SOFT_LIMIT
strhelp  = STR_CONFIG_SETTING_SOFT_LIMIT_HELPTEXT
strval   = STR_CONFIG_SETTING_SOFT_LIMIT_VALUE
cat      = SC_EXPERT

[SDTC_VAR]
var      = gui.zoom_min
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = ZOOM_LVL_MIN
min      = ZOOM_LVL_MIN
max      = ZOOM_LVL_OUT_4X
str      = STR_CONFIG_SETTING_ZOOM_MIN
strhelp  = STR_CONFIG_SETTING_ZOOM_MIN_HELPTEXT
strval   = STR_CONFIG_SETTING_ZOOM_LVL_MIN
post_cb  = ZoomMinMaxChanged
startup  = true

[SDTC_VAR]
var      = gui.zoom_max
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = ZOOM_LVL_MAX
min      = ZOOM_LVL_OUT_8X
max      = ZOOM_LVL_MAX
str      = STR_CONFIG_SETTING_ZOOM_MAX
strhelp  = STR_CONFIG_SETTING_ZOOM_MAX_HELPTEXT
strval   = STR_CONFIG_SETTING_ZOOM_LVL_OUT_2X
post_cb  = ZoomMinMaxChanged
startup  = true

[SDTC_VAR]
var      = gui.sprite_zoom_min
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = ZOOM_LVL_MIN
min      = ZOOM_LVL_MIN
max      = ZOOM_LVL_OUT_4X
str      = STR_CONFIG_SETTING_SPRITE_ZOOM_MIN
strhelp  = STR_CONFIG_SETTING_SPRITE_ZOOM_MIN_HELPTEXT
strval   = STR_CONFIG_SETTING_SPRITE_ZOOM_LVL_MIN
post_cb  = SpriteZoomMinChanged

[SDTC_BOOL]
var      = gui.population_in_label
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
str      = STR_CONFIG_SETTING_POPULATION_IN_LABEL
strhelp  = STR_CONFIG_SETTING_POPULATION_IN_LABEL_HELPTEXT
post_cb  = [](auto) { UpdateAllTownVirtCoords(); }

[SDTC_BOOL]
var      = gui.link_terraform_toolbar
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
str      = STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR
strhelp  = STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR_HELPTEXT

[SDTC_VAR]
var      = gui.smallmap_land_colour
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 0
min      = 0
max      = 2
str      = STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR
strhelp  = STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_HELPTEXT
strval   = STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR_GREEN
post_cb  = RedrawSmallmap

[SDTC_VAR]
var      = gui.liveries
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 2
min      = 0
max      = 2
str      = STR_CONFIG_SETTING_LIVERIES
strhelp  = STR_CONFIG_SETTING_LIVERIES_HELPTEXT
strval   = STR_CONFIG_SETTING_LIVERIES_NONE
post_cb  = InvalidateCompanyLiveryWindow

[SDTC_VAR]
var      = gui.starting_colour
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = COLOUR_END
min      = 0
max      = COLOUR_END
str      = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR
strhelp  = STR_CONFIG_SETTING_COMPANY_STARTING_COLOUR_HELPTEXT
strval   = STR_COLOUR_DARK_BLUE

[SDTC_BOOL]
var      = gui.auto_remove_signals
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
str      = STR_CONFIG_SETTING_AUTO_REMOVE_SIGNALS
strhelp  = STR_CONFIG_SETTING_AUTO_REMOVE_SIGNALS_HELPTEXT
cat      = SC_ADVANCED

[SDTC_BOOL]
var      = gui.prefer_teamchat
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
str      = STR_CONFIG_SETTING_PREFER_TEAMCHAT
strhelp  = STR_CONFIG_SETTING_PREFER_TEAMCHAT_HELPTEXT
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.scrollwheel_scrolling
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 0
min      = 0
max      = 2
str      = STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING
strhelp  = STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING_HELPTEXT
strval   = STR_CONFIG_SETTING_SCROLLWHEEL_ZOOM
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.scrollwheel_multiplier
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 5
min      = 1
max      = 15
interval = 1
str      = STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER
strhelp  = STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER_HELPTEXT
strval   = STR_JUST_COMMA
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.pause_on_newgame
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
str      = STR_CONFIG_SETTING_PAUSE_ON_NEW_GAME
strhelp  = STR_CONFIG_SETTING_PAUSE_ON_NEW_GAME_HELPTEXT
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.advanced_vehicle_list
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 1
min      = 0
max      = 2
str      = STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS
strhelp  = STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS_HELPTEXT
strval   = STR_CONFIG_SETTING_COMPANIES_OFF

[SDTC_BOOL]
var      = gui.timetable_in_ticks
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
str      = STR_CONFIG_SETTING_TIMETABLE_IN_TICKS
strhelp  = STR_CONFIG_SETTING_TIMETABLE_IN_TICKS_HELPTEXT
post_cb  = [](auto) { InvalidateWindowClassesData(WC_VEHICLE_TIMETABLE, VIWD_MODIFY_ORDERS); }
cat      = SC_EXPERT

[SDTC_BOOL]
var      = gui.timetable_arrival_departure
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
str      = STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE
strhelp  = STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE_HELPTEXT
post_cb  = [](auto) { InvalidateWindowClassesData(WC_VEHICLE_TIMETABLE, VIWD_MODIFY_ORDERS); }

[SDTC_BOOL]
var      = gui.quick_goto
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
str      = STR_CONFIG_SETTING_QUICKGOTO
strhelp  = STR_CONFIG_SETTING_QUICKGOTO_HELPTEXT
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.loading_indicators
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 1
min      = 0
max      = 2
str      = STR_CONFIG_SETTING_LOADING_INDICATORS
strhelp  = STR_CONFIG_SETTING_LOADING_INDICATORS_HELPTEXT
strval   = STR_CONFIG_SETTING_COMPANIES_OFF
post_cb  = [](auto) { MarkWholeScreenDirty(); }
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.default_rail_type
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 0
min      = 0
max      = 2
str      = STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE
strhelp  = STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_HELPTEXT
strval   = STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE_FIRST
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.signal_gui_mode
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 0
min      = 0
max      = 1
str      = STR_CONFIG_SETTING_SIGNAL_GUI_MODE
strhelp  = STR_CONFIG_SETTING_SIGNAL_GUI_MODE_HELPTEXT
strval   = STR_CONFIG_SETTING_SIGNAL_GUI_MODE_PATH
post_cb  = [](auto) { CloseWindowByClass(WC_BUILD_SIGNAL); }
cat      = SC_ADVANCED

[SDTC_VAR]
var      = gui.default_signal_type
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 5
min      = 0
max      = 5

[SDTC_VAR]
var      = gui.coloured_news_year
type     = SLE_INT32
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 2000
min      = MIN_YEAR
max      = MAX_YEAR
interval = 1
str      = STR_CONFIG_SETTING_COLOURED_NEWS_YEAR
strhelp  = STR_CONFIG_SETTING_COLOURED_NEWS_YEAR_HELPTEXT
strval   = STR_JUST_INT
cat      = SC_EXPERT

[SDTC_VAR]
var      = gui.cycle_signal_types
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 0
min      = 0
max      = 1
interval = 1
str      = STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES
strhelp  = STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES_HELPTEXT
strval   = STR_CONFIG_SETTING_CYCLE_SIGNAL_PBS
cat      = SC_ADVANCED

[SDTC_VAR]
var      = gui.drag_signals_density
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 4
min      = 1
max      = 20
str      = STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY
strhelp  = STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_HELPTEXT
strval   = STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY_VALUE
post_cb  = [](auto) { InvalidateWindowData(WC_BUILD_SIGNAL, 0); }
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.drag_signals_fixed_distance
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
str      = STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE
strhelp  = STR_CONFIG_SETTING_DRAG_SIGNALS_FIXED_DISTANCE_HELPTEXT
cat      = SC_EXPERT

[SDTC_VAR]
var      = gui.semaphore_build_before
type     = SLE_INT32
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 1950
min      = MIN_YEAR
max      = MAX_YEAR
interval = 1
str      = STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE
strhelp  = STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE_HELPTEXT
strval   = STR_JUST_INT
post_cb  = ResetSignalVariant

[SDTC_BOOL]
var      = gui.vehicle_income_warn
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
str      = STR_CONFIG_SETTING_WARN_INCOME_LESS
strhelp  = STR_CONFIG_SETTING_WARN_INCOME_LESS_HELPTEXT
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.order_review_system
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 2
min      = 0
max      = 2
str      = STR_CONFIG_SETTING_ORDER_REVIEW
strhelp  = STR_CONFIG_SETTING_ORDER_REVIEW_HELPTEXT
strval   = STR_CONFIG_SETTING_ORDER_REVIEW_OFF
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.lost_vehicle_warn
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
str      = STR_CONFIG_SETTING_WARN_LOST_VEHICLE
strhelp  = STR_CONFIG_SETTING_WARN_LOST_VEHICLE_HELPTEXT

[SDTC_BOOL]
var      = gui.new_nonstop
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
str      = STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT
strhelp  = STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT_HELPTEXT
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.stop_location
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 2
min      = 0
max      = 2
interval = 1
str      = STR_CONFIG_SETTING_STOP_LOCATION
strhelp  = STR_CONFIG_SETTING_STOP_LOCATION_HELPTEXT
strval   = STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.keep_all_autosave
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false

[SDTC_BOOL]
var      = gui.autosave_on_exit
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.autosave_on_network_disconnect
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
cat      = SC_EXPERT

[SDTC_VAR]
var      = gui.max_num_autosaves
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 16
min      = 0
max      = 255

[SDTC_BOOL]
var      = gui.auto_euro
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true

[SDTC_VAR]
var      = gui.news_message_timeout
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 2
min      = 1
max      = 255

[SDTC_BOOL]
var      = gui.show_track_reservation
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
str      = STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION
strhelp  = STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION_HELPTEXT
post_cb  = [](auto) { MarkWholeScreenDirty(); }
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.station_numtracks
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 1
min      = 1
max      = 7

[SDTC_VAR]
var      = gui.station_platlength
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 5
min      = 1
max      = 7
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.station_dragdrop
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.station_show_coverage
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.persistent_buildingtools
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
str      = STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS
strhelp  = STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS_HELPTEXT
cat      = SC_BASIC

[SDTC_BOOL]
var      = gui.expenses_layout
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true
str      = STR_CONFIG_SETTING_EXPENSES_LAYOUT
strhelp  = STR_CONFIG_SETTING_EXPENSES_LAYOUT_HELPTEXT
post_cb  = [](auto) { MarkWholeScreenDirty(); }

[SDTC_VAR]
var      = gui.station_gui_group_order
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 0
min      = 0
max      = 5
interval = 1

[SDTC_VAR]
var      = gui.station_gui_sort_by
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 0
min      = 0
max      = 3
interval = 1

[SDTC_VAR]
var      = gui.station_gui_sort_order
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 0
min      = 0
max      = 1
interval = 1

[SDTC_VAR]
var      = gui.missing_strings_threshold
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 25
min      = 1
max      = UINT8_MAX
cat      = SC_EXPERT

[SDTC_VAR]
var      = gui.graph_line_thickness
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 3
min      = 1
max      = 5
str      = STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS
strhelp  = STR_CONFIG_SETTING_GRAPH_LINE_THICKNESS_HELPTEXT
strval   = STR_JUST_COMMA
post_cb  = [](auto) { MarkWholeScreenDirty(); }

[SDTC_BOOL]
var      = gui.show_newgrf_name
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
str      = STR_CONFIG_SETTING_SHOW_NEWGRF_NAME
strhelp  = STR_CONFIG_SETTING_SHOW_NEWGRF_NAME_HELPTEXT
post_cb  = [](auto) { MarkWholeScreenDirty(); }
cat      = SC_ADVANCED

; For the dedicated build we'll enable dates in logs by default.
[SDTC_BOOL]
ifdef    = DEDICATED
var      = gui.show_date_in_logs
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = true

[SDTC_BOOL]
ifndef   = DEDICATED
var      = gui.show_date_in_logs
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false

[SDTC_VAR]
var      = gui.settings_restriction_mode
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 0
min      = 0
max      = 2

[SDTC_VAR]
var      = gui.developer
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 1
min      = 0
max      = 2
cat      = SC_EXPERT
post_cb  = [](auto) { DebugReconsiderSendRemoteMessages(); }

[SDTC_BOOL]
var      = gui.newgrf_developer_tools
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
post_cb  = InvalidateNewGRFChangeWindows
cat      = SC_EXPERT

[SDTC_BOOL]
var      = gui.ai_developer_tools
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
post_cb  = [](auto) { InvalidateWindowClassesData(WC_AI_SETTINGS); }
cat      = SC_EXPERT

[SDTC_BOOL]
var      = gui.scenario_developer
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
post_cb  = InvalidateNewGRFChangeWindows

[SDTC_BOOL]
var      = gui.newgrf_show_old_versions
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = false
cat      = SC_EXPERT

[SDTC_VAR]
var      = gui.newgrf_default_palette
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_DROPDOWN
def      = 1
min      = 0
max      = 1
post_cb  = UpdateNewGRFConfigPalette
cat      = SC_EXPERT

[SDTC_VAR]
var      = gui.console_backlog_timeout
type     = SLE_UINT16
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 100
min      = 10
max      = 65500

[SDTC_VAR]
var      = gui.console_backlog_length
type     = SLE_UINT16
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 100
min      = 10
max      = 65500

[SDTC_VAR]
var      = gui.refresh_rate
type     = SLE_UINT16
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 60
min      = 10
max      = 1000
cat      = SC_EXPERT
startup  = true

[SDTC_VAR]
var      = gui.fast_forward_speed_limit
type     = SLE_UINT16
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NO_NETWORK
def      = 2500
min      = 0
max      = 50000
interval = 10
str      = STR_CONFIG_SETTING_FAST_FORWARD_SPEED_LIMIT
strhelp  = STR_CONFIG_SETTING_FAST_FORWARD_SPEED_LIMIT_HELPTEXT
strval   = STR_CONFIG_SETTING_FAST_FORWARD_SPEED_LIMIT_VAL
cat      = SC_BASIC

[SDTC_VAR]
var      = gui.network_chat_box_width_pct
type     = SLE_UINT16
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 40
min      = 10
max      = 100
cat      = SC_EXPERT

[SDTC_VAR]
var      = gui.network_chat_box_height
type     = SLE_UINT8
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 25
min      = 5
max      = 255
cat      = SC_EXPERT

[SDTC_VAR]
var      = gui.network_chat_timeout
type     = SLE_UINT16
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def      = 20
min      = 1
max      = 65535
cat      = SC_EXPERT

