Update to 14.0-RC1

This commit is contained in:
dP
2024-02-19 04:42:45 +05:30
parent 910fa762b9
commit 53ff9d1f9f
183 changed files with 9531 additions and 5695 deletions

View File

@@ -728,6 +728,7 @@ struct GameOptionsWindow : Window {
this->SetWidgetLoweredState(WID_GO_VIDEO_ACCEL_BUTTON, _video_hw_accel);
this->SetWidgetDirty(WID_GO_VIDEO_ACCEL_BUTTON);
#ifndef __APPLE__
this->SetWidgetLoweredState(WID_GO_VIDEO_VSYNC_BUTTON, _video_hw_accel && _video_vsync);
this->SetWidgetDisabledState(WID_GO_VIDEO_VSYNC_BUTTON, !_video_hw_accel);
this->SetWidgetDirty(WID_GO_VIDEO_VSYNC_BUTTON);
#endif
@@ -968,7 +969,7 @@ struct GameOptionsWindow : Window {
this->SetWidgetDisabledState(WID_GO_REFRESH_RATE_DROPDOWN, _video_vsync);
#ifndef __APPLE__
this->SetWidgetLoweredState(WID_GO_VIDEO_VSYNC_BUTTON, _video_vsync);
this->SetWidgetLoweredState(WID_GO_VIDEO_VSYNC_BUTTON, _video_hw_accel && _video_vsync);
this->SetWidgetDisabledState(WID_GO_VIDEO_VSYNC_BUTTON, !_video_hw_accel);
#endif
@@ -2988,7 +2989,6 @@ 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,7 +3014,6 @@ 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});
@@ -3057,14 +3056,6 @@ 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);
@@ -3120,10 +3111,6 @@ 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;
@@ -3164,10 +3151,6 @@ 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),