|
@@ -52,13 +52,13 @@ void CcBuildWagon(const CommandCost &res
|
|
|
* @param max_width The maximum space available to draw.
|
|
|
* @param selection Selected vehicle that is dragged.
|
|
|
* @return The width of the highlight mark.
|
|
|
*/
|
|
|
static int HighlightDragPosition(int px, int max_width, VehicleID selection)
|
|
|
{
|
|
|
bool rtl = _dynlang.text_dir == TD_RTL;
|
|
|
bool rtl = _current_text_dir == TD_RTL;
|
|
|
|
|
|
assert(selection != INVALID_VEHICLE);
|
|
|
Point offset;
|
|
|
int dragged_width = Train::Get(selection)->GetDisplayImageWidth(&offset) + WD_FRAMERECT_LEFT + WD_FRAMERECT_RIGHT;
|
|
|
|
|
|
int drag_hlight_left = rtl ? max(px -dragged_width, 0) : px;
|
|
@@ -82,13 +82,13 @@ static int HighlightDragPosition(int px,
|
|
|
* @param selection Selected vehicle to draw a frame around
|
|
|
* @param skip Number of pixels to skip at the front (for scrolling)
|
|
|
* @param drag_dest The vehicle another one is dragged over, \c INVALID_VEHICLE if none.
|
|
|
*/
|
|
|
void DrawTrainImage(const Train *v, int left, int right, int y, VehicleID selection, int skip, VehicleID drag_dest)
|
|
|
{
|
|
|
bool rtl = _dynlang.text_dir == TD_RTL;
|
|
|
bool rtl = _current_text_dir == TD_RTL;
|
|
|
Direction dir = rtl ? DIR_E : DIR_W;
|
|
|
|
|
|
DrawPixelInfo tmp_dpi, *old_dpi;
|
|
|
/* Position of highlight box */
|
|
|
int highlight_l = 0;
|
|
|
int highlight_r = 0;
|
|
@@ -332,13 +332,13 @@ int GetTrainDetailsWndVScroll(VehicleID
|
|
|
* @param det_tab Selected details tab
|
|
|
*/
|
|
|
void DrawTrainDetails(const Train *v, int left, int right, int y, int vscroll_pos, uint16 vscroll_cap, TrainDetailsWindowTabs det_tab)
|
|
|
{
|
|
|
/* draw the first 3 details tabs */
|
|
|
if (det_tab != TDW_TAB_TOTALS) {
|
|
|
bool rtl = _dynlang.text_dir == TD_RTL;
|
|
|
bool rtl = _current_text_dir == TD_RTL;
|
|
|
Direction dir = rtl ? DIR_E : DIR_W;
|
|
|
int x = rtl ? right : left;
|
|
|
int sprite_y_offset = 4 + (FONT_HEIGHT_NORMAL - 10) / 2;
|
|
|
int line_height = WD_MATRIX_TOP + FONT_HEIGHT_NORMAL + WD_MATRIX_BOTTOM;
|
|
|
for (; v != NULL && vscroll_pos > -vscroll_cap; v = v->GetNextVehicle()) {
|
|
|
GetCargoSummaryOfArticulatedVehicle(v, &_cargo_summary);
|