Revert #11993: new number format system does not and cannot work for CJK languages
There are too many intricacies that I am unaware of that are popping up after asking whether things are right or not. I do not want to keep playing whack-a-mole, so just revert the whole thing. This reverts:15be383b93
360fe8b0b6
1aa9a5c0ab
59f56941e5
7e2eefb91f
b741b2ba6f
609d0071d5
9f8fd80112
a253205b93
819c6c756e
This commit is contained in:
@@ -2989,6 +2989,7 @@ struct CustomCurrencyWindow : Window {
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_CC_RATE: SetDParam(0, 1); SetDParam(1, 1); break;
|
||||
case WID_CC_SEPARATOR: SetDParamStr(0, _custom_currency.separator); break;
|
||||
case WID_CC_PREFIX: SetDParamStr(0, _custom_currency.prefix); break;
|
||||
case WID_CC_SUFFIX: SetDParamStr(0, _custom_currency.suffix); break;
|
||||
case WID_CC_YEAR:
|
||||
@@ -3014,6 +3015,7 @@ struct CustomCurrencyWindow : Window {
|
||||
break;
|
||||
|
||||
/* Set the appropriate width for the edit buttons. */
|
||||
case WID_CC_SEPARATOR_EDIT:
|
||||
case WID_CC_PREFIX_EDIT:
|
||||
case WID_CC_SUFFIX_EDIT:
|
||||
*size = maxdim(*size, {(uint)SETTING_BUTTON_WIDTH, (uint)SETTING_BUTTON_HEIGHT});
|
||||
@@ -3056,6 +3058,14 @@ struct CustomCurrencyWindow : Window {
|
||||
afilter = CS_NUMERAL;
|
||||
break;
|
||||
|
||||
case WID_CC_SEPARATOR_EDIT:
|
||||
case WID_CC_SEPARATOR:
|
||||
SetDParamStr(0, _custom_currency.separator);
|
||||
str = STR_JUST_RAW_STRING;
|
||||
len = 7;
|
||||
line = WID_CC_SEPARATOR;
|
||||
break;
|
||||
|
||||
case WID_CC_PREFIX_EDIT:
|
||||
case WID_CC_PREFIX:
|
||||
SetDParamStr(0, _custom_currency.prefix);
|
||||
@@ -3111,6 +3121,10 @@ struct CustomCurrencyWindow : Window {
|
||||
_custom_currency.rate = Clamp(atoi(str), 1, UINT16_MAX);
|
||||
break;
|
||||
|
||||
case WID_CC_SEPARATOR: // Thousands separator
|
||||
_custom_currency.separator = str;
|
||||
break;
|
||||
|
||||
case WID_CC_PREFIX:
|
||||
_custom_currency.prefix = str;
|
||||
break;
|
||||
@@ -3151,6 +3165,10 @@ static constexpr NWidgetPart _nested_cust_currency_widgets[] = {
|
||||
EndContainer(),
|
||||
NWidget(WWT_TEXT, COLOUR_BLUE, WID_CC_RATE), SetDataTip(STR_CURRENCY_EXCHANGE_RATE, STR_CURRENCY_SET_EXCHANGE_RATE_TOOLTIP), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, WidgetDimensions::unscaled.hsep_wide, 0),
|
||||
NWidget(WWT_PUSHBTN, COLOUR_DARK_BLUE, WID_CC_SEPARATOR_EDIT), SetDataTip(0x0, STR_CURRENCY_SET_CUSTOM_CURRENCY_SEPARATOR_TOOLTIP), SetFill(0, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_BLUE, WID_CC_SEPARATOR), SetDataTip(STR_CURRENCY_SEPARATOR, STR_CURRENCY_SET_CUSTOM_CURRENCY_SEPARATOR_TOOLTIP), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, WidgetDimensions::unscaled.hsep_wide, 0),
|
||||
NWidget(WWT_PUSHBTN, COLOUR_DARK_BLUE, WID_CC_PREFIX_EDIT), SetDataTip(0x0, STR_CURRENCY_SET_CUSTOM_CURRENCY_PREFIX_TOOLTIP), SetFill(0, 1),
|
||||
NWidget(WWT_TEXT, COLOUR_BLUE, WID_CC_PREFIX), SetDataTip(STR_CURRENCY_PREFIX, STR_CURRENCY_SET_CUSTOM_CURRENCY_PREFIX_TOOLTIP), SetFill(1, 0),
|
||||
|
Reference in New Issue
Block a user