1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Use better text descriptions. Holding down rate buttons now increase/decrease

This commit is contained in:
duncanspumpkin
2016-07-10 09:26:23 +01:00
parent 1d4fb5cb6f
commit 50c2e52b57
4 changed files with 12 additions and 5 deletions

View File

@@ -4201,6 +4201,8 @@ STR_5889 :Custom currency symbol
STR_5890 :Enter the currency symbol to display
STR_5891 :Default
STR_5892 :{SMALLFONT}{BLACK}Go to the default directory
STR_5893 :Exchange Rate
STR_5894 :Enter the exchange rate
#############
# Scenarios #

View File

@@ -49,6 +49,7 @@ typedef enum {
} CURRENCY_AFFIX;
#define CURRENCY_SYMBOL_MAX_SIZE 8
#define CURRENCY_RATE_MAX_NUM_DIGITS 9
// Currency format specification - inspired by OpenTTD
typedef struct currency_descriptor {

View File

@@ -2672,6 +2672,8 @@ enum {
STR_LOADSAVE_DEFAULT = 5891,
STR_LOADSAVE_DEFAULT_TIP = 5892,
STR_RATE_INPUT_TITLE = 5893,
STR_RATE_INPUT_DESC = 5894,
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
STR_COUNT = 32768
};

View File

@@ -115,6 +115,7 @@ void custom_currency_window_open()
(1 << WIDX_AFFIX_DROPDOWN) |
(1 << WIDX_AFFIX_DROPDOWN_BUTTON);
window->hold_down_widgets = (1 << WIDX_RATE_UP) | (1 << WIDX_RATE_DOWN);
window_init_scroll_widgets(window);
window->colours[0] = 22;
window->colours[1] = 22;
@@ -192,13 +193,14 @@ static void custom_currency_window_mouseup(rct_window *w, int widgetIndex)
{
switch(widgetIndex) {
case WIDX_RATE:
window_text_input_raw_open(
window_text_input_open(
w,
WIDX_RATE,
STR_CUSTOM_CURRENCY_SYMBOL_INPUT_TITLE,
STR_CUSTOM_CURRENCY_SYMBOL_INPUT_DESC,
CurrencyDescriptors[CURRENCY_CUSTOM].symbol_unicode,
CURRENCY_SYMBOL_MAX_SIZE
STR_RATE_INPUT_TITLE,
STR_RATE_INPUT_DESC,
5182,
(uint32)CurrencyDescriptors[CURRENCY_CUSTOM].rate,
CURRENCY_RATE_MAX_NUM_DIGITS
);
break;
}