summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-01-05 19:32:51 +0000
committerfrosch <frosch@openttd.org>2012-01-05 19:32:51 +0000
commit69e197c87fc23e5492f4b59f8e1ba8757d65c41e (patch)
tree667e2d8a3efff34d87d9fcea1fb946279fb38afd /src/ai
parent2fb393fcd0a45c9c34e080714f4bdf7d77ca4fbd (diff)
downloadopenttd-69e197c87fc23e5492f4b59f8e1ba8757d65c41e.tar.xz
(svn r23757) -Codechange: Unify the drawing of toggle buttons for boolean settings.
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/ai_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp
index 3620dfc75..603c0569b 100644
--- a/src/ai/ai_gui.cpp
+++ b/src/ai/ai_gui.cpp
@@ -384,7 +384,7 @@ struct AISettingsWindow : public Window {
}
if ((config_item.flags & SCRIPTCONFIG_BOOLEAN) != 0) {
- DrawFrameRect(buttons_left, y + 2, buttons_left + 19, y + 10, (current_value != 0) ? COLOUR_GREEN : COLOUR_RED, (current_value != 0) ? FR_LOWERED : FR_NONE);
+ DrawBoolButton(buttons_left, y + 2, current_value != 0, editable);
SetDParam(idx++, current_value == 0 ? STR_CONFIG_SETTING_OFF : STR_CONFIG_SETTING_ON);
} else {
DrawArrowButtons(buttons_left, y + 2, COLOUR_YELLOW, (this->clicked_button == i) ? 1 + (this->clicked_increase != rtl) : 0, editable && current_value > config_item.min_value, editable && current_value < config_item.max_value);