diff options
author | yexo <yexo@openttd.org> | 2009-02-23 22:00:29 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-02-23 22:00:29 +0000 |
commit | 391fe952b9cfafe9a040f1d18ca01fa83aefc30d (patch) | |
tree | 9f3e8f7fe000e71e21bb4df3474cb1b2a5523249 | |
parent | 932b1c24b23867083c87c6cd1aeca46d686d0cb4 (diff) | |
download | openttd-391fe952b9cfafe9a040f1d18ca01fa83aefc30d.tar.xz |
(svn r15564) -Fix: Refresh all industry windows if the modify production cheat is enabled/disabled.
-rw-r--r-- | src/cheat_gui.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/cheat_gui.cpp b/src/cheat_gui.cpp index 241d83093..3e847d3b6 100644 --- a/src/cheat_gui.cpp +++ b/src/cheat_gui.cpp @@ -55,7 +55,17 @@ static int32 ClickChangeCompanyCheat(int32 p1, int32 p2) } /** - * @param p1 -1 or +1 (down/up) + * @param p1 new value + * @param p2 unused + */ +static int32 ClickSetProdCheat(int32 p1, int32 p2) +{ + InvalidateWindowClasses(WC_INDUSTRY_VIEW); + return p1; +} + +/** + * @param p1 new climate * @param p2 unused */ static int32 ClickChangeClimateCheat(int32 p1, int32 p2) @@ -109,7 +119,7 @@ static const CheatEntry _cheats_ui[] = { {SLE_BOOL, STR_CHEAT_CROSSINGTUNNELS, &_cheats.crossing_tunnels.value, &_cheats.crossing_tunnels.been_used, NULL }, {SLE_BOOL, STR_CHEAT_BUILD_IN_PAUSE, &_cheats.build_in_pause.value, &_cheats.build_in_pause.been_used, NULL }, {SLE_BOOL, STR_CHEAT_NO_JETCRASH, &_cheats.no_jetcrash.value, &_cheats.no_jetcrash.been_used, NULL }, - {SLE_BOOL, STR_CHEAT_SETUP_PROD, &_cheats.setup_prod.value, &_cheats.setup_prod.been_used, NULL }, + {SLE_BOOL, STR_CHEAT_SETUP_PROD, &_cheats.setup_prod.value, &_cheats.setup_prod.been_used, &ClickSetProdCheat }, {SLE_UINT8, STR_CHEAT_SWITCH_CLIMATE, &_settings_game.game_creation.landscape, &_cheats.switch_climate.been_used, &ClickChangeClimateCheat }, {SLE_INT32, STR_CHEAT_CHANGE_DATE, &_cur_year, &_cheats.change_date.been_used, &ClickChangeDateCheat }, }; |