153 SetDParam(7, i == _num_resolutions ? STR_RES_OTHER : SPECSTR_RESOLUTION_START + i); |
153 SetDParam(7, i == _num_resolutions ? STR_RES_OTHER : SPECSTR_RESOLUTION_START + i); |
154 SetDParam(8, SPECSTR_SCREENSHOT_START + _cur_screenshot_format); |
154 SetDParam(8, SPECSTR_SCREENSHOT_START + _cur_screenshot_format); |
155 SetWindowWidgetLoweredState(w, 28, _fullscreen); |
155 SetWindowWidgetLoweredState(w, 28, _fullscreen); |
156 |
156 |
157 DrawWindowWidgets(w); |
157 DrawWindowWidgets(w); |
158 DrawString(20, 175, STR_OPTIONS_FULLSCREEN, 0); // fullscreen |
158 DrawString(20, 175, STR_OPTIONS_FULLSCREEN, TC_FROMSTRING); // fullscreen |
159 } break; |
159 } break; |
160 |
160 |
161 case WE_CLICK: |
161 case WE_CLICK: |
162 switch (e->we.click.widget) { |
162 switch (e->we.click.widget) { |
163 case 4: case 5: /* Setup currencies dropdown */ |
163 case 4: case 5: /* Setup currencies dropdown */ |
483 int color = (1 << PALETTE_MODIFIER_GREYOUT) | _colour_gradient[COLOUR_YELLOW][2]; |
483 int color = (1 << PALETTE_MODIFIER_GREYOUT) | _colour_gradient[COLOUR_YELLOW][2]; |
484 GfxFillRect( 6, y + 1, 6 + 8, y + 8, color); |
484 GfxFillRect( 6, y + 1, 6 + 8, y + 8, color); |
485 GfxFillRect(16, y + 1, 16 + 8, y + 8, color); |
485 GfxFillRect(16, y + 1, 16 + 8, y + 8, color); |
486 } |
486 } |
487 |
487 |
488 DrawStringCentered(10, y, STR_6819, 0); |
488 DrawStringCentered(10, y, STR_6819, TC_FROMSTRING); |
489 DrawStringCentered(20, y, STR_681A, 0); |
489 DrawStringCentered(20, y, STR_681A, TC_FROMSTRING); |
490 |
490 |
491 |
491 |
492 value = _game_setting_info[i].str + ((GDType*)&_opt_mod_temp.diff)[i]; |
492 value = _game_setting_info[i].str + ((GDType*)&_opt_mod_temp.diff)[i]; |
493 if (i == 4) value *= 1000; // XXX - handle currency option |
493 if (i == 4) value *= 1000; // XXX - handle currency option |
494 SetDParam(0, value); |
494 SetDParam(0, value); |
495 DrawString(30, y, STR_6805_MAXIMUM_NO_COMPETITORS + i, 0); |
495 DrawString(30, y, STR_6805_MAXIMUM_NO_COMPETITORS + i, TC_FROMSTRING); |
496 |
496 |
497 y += GAMEDIFF_WND_ROWSIZE + 2; // space items apart a bit |
497 y += GAMEDIFF_WND_ROWSIZE + 2; // space items apart a bit |
498 } |
498 } |
499 } break; |
499 } break; |
500 |
500 |
1029 { |
1029 { |
1030 int color = (1 << PALETTE_MODIFIER_GREYOUT) | _colour_gradient[COLOUR_YELLOW][2]; |
1030 int color = (1 << PALETTE_MODIFIER_GREYOUT) | _colour_gradient[COLOUR_YELLOW][2]; |
1031 |
1031 |
1032 DrawFrameRect(x, y + 1, x + 9, y + 9, ctab, (state == 1) ? FR_LOWERED : FR_NONE); |
1032 DrawFrameRect(x, y + 1, x + 9, y + 9, ctab, (state == 1) ? FR_LOWERED : FR_NONE); |
1033 DrawFrameRect(x + 10, y + 1, x + 19, y + 9, ctab, (state == 2) ? FR_LOWERED : FR_NONE); |
1033 DrawFrameRect(x + 10, y + 1, x + 19, y + 9, ctab, (state == 2) ? FR_LOWERED : FR_NONE); |
1034 DrawStringCentered(x + 5, y + 1, STR_6819, 0); // [<] |
1034 DrawStringCentered(x + 5, y + 1, STR_6819, TC_FROMSTRING); // [<] |
1035 DrawStringCentered(x + 15, y + 1, STR_681A, 0); // [>] |
1035 DrawStringCentered(x + 15, y + 1, STR_681A, TC_FROMSTRING); // [>] |
1036 |
1036 |
1037 /* Grey out the buttons that aren't clickable */ |
1037 /* Grey out the buttons that aren't clickable */ |
1038 if (!clickable_left) |
1038 if (!clickable_left) |
1039 GfxFillRect(x + 1, y + 1, x + 1 + 8, y + 8, color); |
1039 GfxFillRect(x + 1, y + 1, x + 1 + 8, y + 8, color); |
1040 if (!clickable_right) |
1040 if (!clickable_right) |
1054 |
1054 |
1055 // exchange rate |
1055 // exchange rate |
1056 DrawArrowButtons(10, y, 3, GB(clk, 0, 2), true, true); |
1056 DrawArrowButtons(10, y, 3, GB(clk, 0, 2), true, true); |
1057 SetDParam(0, 1); |
1057 SetDParam(0, 1); |
1058 SetDParam(1, 1); |
1058 SetDParam(1, 1); |
1059 DrawString(35, y + 1, STR_CURRENCY_EXCHANGE_RATE, 0); |
1059 DrawString(35, y + 1, STR_CURRENCY_EXCHANGE_RATE, TC_FROMSTRING); |
1060 y += 12; |
1060 y += 12; |
1061 |
1061 |
1062 // separator |
1062 // separator |
1063 DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(clk, 2, 2) ? FR_LOWERED : FR_NONE); |
1063 DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(clk, 2, 2) ? FR_LOWERED : FR_NONE); |
1064 x = DrawString(35, y + 1, STR_CURRENCY_SEPARATOR, 0); |
1064 x = DrawString(35, y + 1, STR_CURRENCY_SEPARATOR, TC_FROMSTRING); |
1065 DoDrawString(_str_separator, x + 4, y + 1, 6); |
1065 DoDrawString(_str_separator, x + 4, y + 1, TC_ORANGE); |
1066 y += 12; |
1066 y += 12; |
1067 |
1067 |
1068 // prefix |
1068 // prefix |
1069 DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(clk, 4, 2) ? FR_LOWERED : FR_NONE); |
1069 DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(clk, 4, 2) ? FR_LOWERED : FR_NONE); |
1070 x = DrawString(35, y + 1, STR_CURRENCY_PREFIX, 0); |
1070 x = DrawString(35, y + 1, STR_CURRENCY_PREFIX, TC_FROMSTRING); |
1071 DoDrawString(_custom_currency.prefix, x + 4, y + 1, 6); |
1071 DoDrawString(_custom_currency.prefix, x + 4, y + 1, TC_ORANGE); |
1072 y += 12; |
1072 y += 12; |
1073 |
1073 |
1074 // suffix |
1074 // suffix |
1075 DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(clk, 6, 2) ? FR_LOWERED : FR_NONE); |
1075 DrawFrameRect(10, y + 1, 29, y + 9, 0, GB(clk, 6, 2) ? FR_LOWERED : FR_NONE); |
1076 x = DrawString(35, y + 1, STR_CURRENCY_SUFFIX, 0); |
1076 x = DrawString(35, y + 1, STR_CURRENCY_SUFFIX, TC_FROMSTRING); |
1077 DoDrawString(_custom_currency.suffix, x + 4, y + 1, 6); |
1077 DoDrawString(_custom_currency.suffix, x + 4, y + 1, TC_ORANGE); |
1078 y += 12; |
1078 y += 12; |
1079 |
1079 |
1080 // switch to euro |
1080 // switch to euro |
1081 DrawArrowButtons(10, y, 3, GB(clk, 8, 2), true, true); |
1081 DrawArrowButtons(10, y, 3, GB(clk, 8, 2), true, true); |
1082 SetDParam(0, _custom_currency.to_euro); |
1082 SetDParam(0, _custom_currency.to_euro); |
1083 DrawString(35, y + 1, (_custom_currency.to_euro != CF_NOEURO) ? STR_CURRENCY_SWITCH_TO_EURO : STR_CURRENCY_SWITCH_TO_EURO_NEVER, 0); |
1083 DrawString(35, y + 1, (_custom_currency.to_euro != CF_NOEURO) ? STR_CURRENCY_SWITCH_TO_EURO : STR_CURRENCY_SWITCH_TO_EURO_NEVER, TC_FROMSTRING); |
1084 y += 12; |
1084 y += 12; |
1085 |
1085 |
1086 // Preview |
1086 // Preview |
1087 y += 12; |
1087 y += 12; |
1088 SetDParam(0, 10000); |
1088 SetDParam(0, 10000); |
1089 DrawString(35, y + 1, STR_CURRENCY_PREVIEW, 0); |
1089 DrawString(35, y + 1, STR_CURRENCY_PREVIEW, TC_FROMSTRING); |
1090 break; |
1090 break; |
1091 } |
1091 } |
1092 |
1092 |
1093 case WE_CLICK: { |
1093 case WE_CLICK: { |
1094 int line = (e->we.click.pt.y - 20) / 12; |
1094 int line = (e->we.click.pt.y - 20) / 12; |