Feature: Fully user configurable number format and abbreviations
This commit is contained in:
		@@ -16,6 +16,7 @@ static void InvalidateCompanyLiveryWindow(int32_t new_value);
 | 
			
		||||
static void InvalidateNewGRFChangeWindows(int32_t new_value);
 | 
			
		||||
static void ZoomMinMaxChanged(int32_t new_value);
 | 
			
		||||
static void SpriteZoomMinChanged(int32_t new_value);
 | 
			
		||||
void InitializeNumberFormats();
 | 
			
		||||
 | 
			
		||||
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"};
 | 
			
		||||
@@ -904,6 +905,24 @@ post_cb  = [](auto) { SetupWidgetDimensions(); ReInitAllWindows(true); }
 | 
			
		||||
cat      = SC_BASIC
 | 
			
		||||
startup  = true
 | 
			
		||||
 | 
			
		||||
[SDTC_SSTR]
 | 
			
		||||
var      = gui.number_format
 | 
			
		||||
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
 | 
			
		||||
type     = SLE_STRQ
 | 
			
		||||
def      = nullptr
 | 
			
		||||
pre_cb   = [](auto format) { NumberFormatSeparators separators; return !ParseNumberFormatSeparators(separators, format).has_value(); }
 | 
			
		||||
post_cb  = [](auto) { InitializeNumberFormats(); MarkWholeScreenDirty(); }
 | 
			
		||||
startup  = true
 | 
			
		||||
 | 
			
		||||
[SDTC_SSTR]
 | 
			
		||||
var      = gui.number_abbreviations
 | 
			
		||||
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
 | 
			
		||||
type     = SLE_STRQ
 | 
			
		||||
def      = nullptr
 | 
			
		||||
pre_cb   = [](auto format) { NumberAbbreviations abbreviations; return !ParseNumberAbbreviations(abbreviations, format).has_value(); }
 | 
			
		||||
post_cb  = [](auto) { InitializeNumberFormats(); MarkWholeScreenDirty(); }
 | 
			
		||||
startup  = true
 | 
			
		||||
 | 
			
		||||
[SDTC_SSTR]
 | 
			
		||||
var      = gui.digit_decimal_separator
 | 
			
		||||
flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user