mirror of https://github.com/OpenTTD/OpenTTD
parent
bc5cd4eeda
commit
6ea3e7e487
|
@ -63,8 +63,9 @@ void DrawSliderWidget(Rect r, int min_value, int max_value, int value, const std
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Draw a slider handle indicating current value. */
|
/* Draw a slider handle indicating current value. */
|
||||||
|
value -= min_value;
|
||||||
if (_current_text_dir == TD_RTL) value = max_value - value;
|
if (_current_text_dir == TD_RTL) value = max_value - value;
|
||||||
x = r.left + ((value - min_value) * (r.right - r.left - sw) / max_value);
|
x = r.left + (value * (r.right - r.left - sw) / max_value);
|
||||||
DrawFrameRect(x, r.top, x + sw, r.bottom, COLOUR_GREY, FR_NONE);
|
DrawFrameRect(x, r.top, x + sw, r.bottom, COLOUR_GREY, FR_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue