aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_slider.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-23 19:03:55 -0400
committerPaul Gilbert2016-07-10 16:11:52 -0400
commitf6f68e547d39957fc4678859a95cbec839cc41e4 (patch)
tree12a9c5c9af3fa758119959c56fcb17ef48305c19 /engines/titanic/pet_control/pet_slider.cpp
parenta8d4e827d23110e978319a2a6d7f036d16c7f66a (diff)
downloadscummvm-rg350-f6f68e547d39957fc4678859a95cbec839cc41e4.tar.gz
scummvm-rg350-f6f68e547d39957fc4678859a95cbec839cc41e4.tar.bz2
scummvm-rg350-f6f68e547d39957fc4678859a95cbec839cc41e4.zip
TITANIC: Implement changing sound slider percentages
Diffstat (limited to 'engines/titanic/pet_control/pet_slider.cpp')
-rw-r--r--engines/titanic/pet_control/pet_slider.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/titanic/pet_control/pet_slider.cpp b/engines/titanic/pet_control/pet_slider.cpp
index 3e579a4b33..1bbad969a2 100644
--- a/engines/titanic/pet_control/pet_slider.cpp
+++ b/engines/titanic/pet_control/pet_slider.cpp
@@ -168,6 +168,18 @@ void CPetSlider::setOrientation(SliderOrientation orientation) {
_orientation |= orientation;
}
+void CPetSlider::stepPosition(int direction) {
+ double val = getOffsetPixels();
+
+ if (direction == -1) {
+ val = MAX(val - 0.1, 0.0);
+ } else if (direction == 1) {
+ val = MIN(val + 0.1, 1.0);
+ }
+
+ setSliderOffset(val);
+}
+
/*------------------------------------------------------------------------*/
void CPetSoundSlider::setupBackground(const CString &name, CPetControl *petControl) {