From 68707808c015db1cda0723882ffce99977d4593c Mon Sep 17 00:00:00 2001 From: peter1138 Date: Fri, 18 Jan 2008 10:36:55 +0000 Subject: (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. --- src/group_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/group_gui.cpp') diff --git a/src/group_gui.cpp b/src/group_gui.cpp index 515ccf77a..28dca4663 100644 --- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -466,9 +466,9 @@ static void GroupWndProc(Window *w, WindowEvent *e) DrawStringRightAligned(187, y1 + 1, STR_GROUP_TINY_NUM, (gv->group_sel == g->index) ? TC_WHITE : TC_BLACK); } - /* Draw Matrix Vehicle according to the vehicle list built before */ - DoDrawString(gv->l.flags & VL_DESC ? DOWNARROW : UPARROW, 269, 15, TC_BLACK); + DrawSortButtonState(w, GRP_WIDGET_SORT_BY_ORDER, gv->l.flags & VL_DESC ? SBS_DOWN : SBS_UP); + /* Draw Matrix Vehicle according to the vehicle list built before */ max = min(w->vscroll2.pos + w->vscroll2.cap, gv->l.list_length); for (i = w->vscroll2.pos ; i < max ; ++i) { const Vehicle* v = gv->sort_list[i]; -- cgit v1.2.3-54-g00ecf