diff -r 3890328d06f9 src/settings_gui.cpp --- a/src/settings_gui.cpp Sun Nov 02 12:53:58 2008 +0100 +++ b/src/settings_gui.cpp Sun Nov 02 13:15:01 2008 +0100 @@ -818,6 +818,13 @@ int y = SETTINGTREE_TOP_OFFSET; for (i = 0; i != page->num; i++) { const SettingDesc *sd = page->entries[i].setting; + DrawPatch(patches_ptr, sd, x, y, this->click - (i * 2)); + y += SETTING_HEIGHT; + } + } + + void DrawPatch(GameSettings *patches_ptr, const SettingDesc *sd, int x, int y, int state) + { const SettingDescBase *sdb = &sd->desc; const void *var = GetVariableAddress(patches_ptr, &sd->save); bool editable = true; @@ -841,7 +848,7 @@ value = (int32)ReadValue(var, sd->save.conv); /* Draw [<][>] boxes for settings of an integer-type */ - DrawArrowButtons(x, y, COLOUR_YELLOW, this->click - (i * 2), (editable && value != sdb->min), (editable && value != sdb->max)); + DrawArrowButtons(x, y, COLOUR_YELLOW, state, (editable && value != sdb->min), (editable && value != sdb->max)); disabled = (value == 0) && (sdb->flags & SGF_0ISDISABLED); if (disabled) { @@ -858,8 +865,6 @@ } } DrawString(x + 25, y, (sdb->str) + disabled, TC_FROMSTRING); - y += SETTING_HEIGHT; - } } virtual void OnClick(Point pt, int widget)