diff options
author | truelight <truelight@openttd.org> | 2004-08-14 19:55:36 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-08-14 19:55:36 +0000 |
commit | de1ffca437e9c8bfc6e844b4b5689d5485c20f49 (patch) | |
tree | 3ba600f9153af9c1ed20ee02ac1ae70fc2ca1cff | |
parent | bd8513897fb4f617b43d05b8bc1515055f09b978 (diff) | |
download | openttd-de1ffca437e9c8bfc6e844b4b5689d5485c20f49.tar.xz |
(svn r54) -Add: PF_MULTISTRING in Patch menu to select between things instead of numbers (Celestar)
-rw-r--r-- | settings_gui.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/settings_gui.c b/settings_gui.c index 7c281efd8..128b11656 100644 --- a/settings_gui.c +++ b/settings_gui.c @@ -680,6 +680,7 @@ enum { PF_0ISDIS = 1, PF_NOCOMMA = 2, + PF_MULTISTRING = 4, }; static const PatchEntry _patches_ui[] = { @@ -889,8 +890,12 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e) SET_DPARAM32(1, val); if (pe->type == PE_CURRENCY) SET_DPARAM16(0, STR_CONFIG_PATCHES_CURRENCY); - else - SET_DPARAM16(0, pe->flags & PF_NOCOMMA ? STR_CONFIG_PATCHES_INT32 : STR_7024); + else { + if (pe->flags & PF_MULTISTRING) + SET_DPARAM16(0, pe->str + val + 1); + else + SET_DPARAM16(0, pe->flags & PF_NOCOMMA ? STR_CONFIG_PATCHES_INT32 : STR_7024); + } } } DrawString(30, y+1, (pe->str)+disabled, 0); |