Mercurial > hg > openttd
changeset 17233:f9de7c157fbe draft
(svn r21973) -Fix: Redraw the town authority window after modifying town authority settings.
author | terkhen <terkhen@openttd.org> |
---|---|
date | Sat, 05 Feb 2011 13:42:57 +0000 |
parents | 5d82f4101601 |
children | 08d6a07fe4ce |
files | src/settings.cpp src/table/settings.h |
diffstat | 2 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/settings.cpp +++ b/src/settings.cpp @@ -921,6 +921,17 @@ return true; } +/** + * Update the town authority window after a town authority setting change. + * @param p1 Unused. + * @return Always true. + */ +static bool RedrawTownAuthority(int32 p1) +{ + SetWindowClassesDirty(WC_TOWN_AUTHORITY); + return true; +} + /* * A: competitors * B: competitor start time. Deprecated since savegame version 110.
--- a/src/table/settings.h +++ b/src/table/settings.h @@ -42,6 +42,7 @@ static bool InvalidateCompanyLiveryWindow(int32 p1); static bool InvalidateNewGRFChangeWindows(int32 p1); static bool InvalidateIndustryViewWindow(int32 p1); +static bool RedrawTownAuthority(int32 p1); #ifdef ENABLE_NETWORK static bool UpdateClientName(int32 p1); @@ -448,8 +449,8 @@ SDT_CONDVAR(GameSettings, construction.industry_platform, SLE_UINT8,148, SL_MAX_VERSION, 0, 0, 1, 0, 4, 0, STR_CONFIG_SETTING_INDUSTRY_PLATFORM, NULL), SDT_BOOL(GameSettings, economy.multiple_industry_per_town, 0, 0, false, STR_CONFIG_SETTING_MULTIPINDTOWN, NULL), SDT_CONDNULL( 1, 0, 140), - SDT_BOOL(GameSettings, economy.bribe, 0, 0, true, STR_CONFIG_SETTING_BRIBE, NULL), - SDT_CONDBOOL(GameSettings, economy.exclusive_rights, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_EXCLUSIVE, NULL), + SDT_BOOL(GameSettings, economy.bribe, 0, 0, true, STR_CONFIG_SETTING_BRIBE, RedrawTownAuthority), + SDT_CONDBOOL(GameSettings, economy.exclusive_rights, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_EXCLUSIVE, RedrawTownAuthority), SDT_CONDBOOL(GameSettings, economy.give_money, 79, SL_MAX_VERSION, 0, 0, true, STR_CONFIG_SETTING_ALLOW_GIVE_MONEY, NULL), SDT_VAR(GameSettings, game_creation.snow_line_height, SLE_UINT8, 0, 0, DEF_SNOWLINE_HEIGHT, MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT, 0, STR_CONFIG_SETTING_SNOWLINE_HEIGHT, NULL), SDT_CONDNULL( 4, 0, 143),