(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 b7f50533c2
commit 68707808c0
11 changed files with 38 additions and 28 deletions

View File

@@ -995,7 +995,7 @@ static void DrawBuildVehicleWindow(Window *w)
if (text_end > wi->bottom) ExpandPurchaseInfoWidget(w, text_end - wi->bottom);
}
DoDrawString(bv->descending_sort_order ? DOWNARROW : UPARROW, 69, 15, TC_BLACK);
DrawSortButtonState(w, BUILD_VEHICLE_WIDGET_SORT_ASSENDING_DESCENDING, bv->descending_sort_order ? SBS_DOWN : SBS_UP);
}
static void BuildVehicleClickEvent(Window *w, WindowEvent *e)