mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 13:42:02 +00:00
Fixes slider drawing.
svn-id: r22918
This commit is contained in:
parent
b5bc1c82fa
commit
60f19a0f2c
@ -299,11 +299,11 @@ void SliderWidget::drawWidget(bool hilite) {
|
||||
}
|
||||
|
||||
int SliderWidget::valueToPos(int value) {
|
||||
return ((_w - 4) * (value - _valueMin) / (_valueMax - _valueMin));
|
||||
return (_w * (value - _valueMin) / (_valueMax - _valueMin));
|
||||
}
|
||||
|
||||
int SliderWidget::posToValue(int pos) {
|
||||
return (pos) * (_valueMax - _valueMin) / (_w - 4) + _valueMin;
|
||||
return (pos) * (_valueMax - _valueMin) / _w + _valueMin;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
Loading…
x
Reference in New Issue
Block a user