GUI: New Slider Widget look and fixes
|Reported by:||salty-horse||Owned by:||fingolfin|
0) Redesign of the slider graphic, based on the
original SCUMM widget.
1) Clicking and holding the mouse on the widget,
dragging outside of it, releasing the click, and then
moving the mouse back in used to behave as if the mouse
is still dragging.
2) Implemented the inline TODO item: When the mouse is
dragged outside the widget, the slider should snap back
to the old value.
3) The posToValue() behaviour didn't feel natural with
low-scale sliders (0-9 values, for example). Position
rounding was added. The overhead doesn't matter much
since sliders never appear in-game.
Items (1) and (2) are due to the handling of the
4) unsigned int casts were used in drawWidget() and
posToValue to silence a warning. I do not believe this
coordinates could ever be negative. Perhaps the widget
width, coordinates and other class parameters/return
values should be declared unsigned (the labelWidth is
5) In handleMouseLeft, ButtonWidget's handleMouse event
is called to handle hilighting. There, draw() is
called, and when we return to handleMouseLeft, draw()
is called once more to reflect the changes. I don't
think anything can/should be done about it.
Man-Machine Interface consulting provided by _sev.
Ticket imported from: #1092378. Ticket imported from: patches/492.