(svn r11915) -Codechange: Add a function to draw a sort button's up/down arrow. Arrows are now drawn in a consistent position based on the widget, instead of randomly positioned by pixel.

This commit is contained in:
peter1138
2008-01-18 10:36:55 +00:00
parent bba1a62db1
commit 04da1e1d45
11 changed files with 38 additions and 28 deletions

View File

@@ -1505,11 +1505,7 @@ static void SaveLoadDlgWndProc(Window *w, WindowEvent *e)
}
GfxFillRect(w->widget[7].left + 1, w->widget[7].top + 1, w->widget[7].right, w->widget[7].bottom, 0xD7);
DoDrawString(
_savegame_sort_order & SORT_DESCENDING ? DOWNARROW : UPARROW,
_savegame_sort_order & SORT_BY_NAME ? w->widget[2].right - 9 : w->widget[3].right - 9,
15, TC_BLACK
);
DrawSortButtonState(w, _savegame_sort_order & SORT_BY_NAME ? 2 : 3, _savegame_sort_order & SORT_DESCENDING ? SBS_DOWN : SBS_UP);
y = w->widget[7].top + 1;
for (pos = w->vscroll.pos; pos < _fios_num; pos++) {