aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_slider.h
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-22 22:32:28 -0400
committerPaul Gilbert2016-07-10 16:11:45 -0400
commitf79ebfa3e26cc748ef495a96da8acb9e005b3324 (patch)
treec4f9867aab26b6ef9072bc4edf2ad0200b2d02c7 /engines/titanic/pet_control/pet_slider.h
parent4915f8900aff374b2a71545e788cb95d9da7138a (diff)
downloadscummvm-rg350-f79ebfa3e26cc748ef495a96da8acb9e005b3324.tar.gz
scummvm-rg350-f79ebfa3e26cc748ef495a96da8acb9e005b3324.tar.bz2
scummvm-rg350-f79ebfa3e26cc748ef495a96da8acb9e005b3324.zip
TITANIC: Added PET Sound tab setup
Diffstat (limited to 'engines/titanic/pet_control/pet_slider.h')
-rw-r--r--engines/titanic/pet_control/pet_slider.h41
1 files changed, 36 insertions, 5 deletions
diff --git a/engines/titanic/pet_control/pet_slider.h b/engines/titanic/pet_control/pet_slider.h
index a8ef3cbf36..7a61741143 100644
--- a/engines/titanic/pet_control/pet_slider.h
+++ b/engines/titanic/pet_control/pet_slider.h
@@ -35,7 +35,7 @@ class CPetControl;
class CPetSlider {
private:
- int _flags;
+ int _orientation;
Rect _bounds;
Rect _slidingRect;
int _thumbWidth;
@@ -126,11 +126,11 @@ public:
*/
virtual bool resetThumbFocus();
- virtual void proc10();
- virtual void proc11();
+ virtual void proc10(const Point &pt);
+ virtual bool proc11() { return true; }
virtual bool proc12(const Point &pt);
- virtual void proc13();
- virtual void proc14();
+ virtual bool proc13() { return false; }
+ virtual bool proc14() { return false; }
virtual bool contains(const Point &pt) const;
@@ -149,6 +149,37 @@ public:
* Set a new slider offset in pixels
*/
virtual void setOffsetPixels(int offset);
+
+ /**
+ * Enables a given orientation
+ */
+ void setOrientation(SliderOrientation orientation);
+
+ /**
+ * Set the bounds for the slider
+ */
+ void setBounds(const Rect &r) { _bounds = r; }
+
+ /**
+ * Set the sliding bounds for the slider
+ */
+ void setSlidingBounds(const Rect &r) { _slidingRect = r; }
+
+ /**
+ * Set the size of the slider thumb
+ */
+ void setThumbSize(const Point &pt) {
+ _thumbWidth = pt.x;
+ _thumbHeight = pt.y;
+ }
+
+ /**
+ * Move the slider
+ */
+ void translate(const Point &pt) {
+ _bounds.translate(pt.x, pt.y);
+ _slidingRect.translate(pt.x, pt.y);
+ }
};
class CPetSoundSlider : public CPetSlider {