ScummVM API documentation
pet_sound.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef TITANIC_PET_SOUND_H
23 #define TITANIC_PET_SOUND_H
24 
25 #include "titanic/pet_control/pet_glyphs.h"
26 #include "titanic/pet_control/pet_gfx_element.h"
27 #include "titanic/gfx/text_control.h"
28 #include "titanic/pet_control/pet_slider.h"
29 
30 namespace Titanic {
31 
32 class CPetRealLife;
33 
34 class CPetSound : public CPetGlyph {
35  enum SliderType {
36  MASTER_SLIDER = 0, MUSIC_SLIDER = 1, PARROT_SLIDER = 2, SPEECH_SLIDER = 3
37  };
38 private:
39  CPetGfxElement _element;
40  CPetSoundSlider _masterVolume;
41  CPetSoundSlider _musicVolume;
42  CPetSoundSlider _parrotVolume;
43  CPetSoundSlider _speechVolume;
44  CTextControl _textMasterVolume;
45  CTextControl _textMusicVolume;
46  CTextControl _textParrotVolume;
47  CTextControl _textSpeechVolume;
48  CPetSlider *_draggingSlider;
49  SliderType _draggingSliderNum;
50 private:
54  void sliderChanged(double offset, SliderType sliderNum);
55 public:
56  CPetSound();
57 
61  bool setup(CPetControl *petControl, CPetGlyphs *owner) override;
62 
66  bool reset() override;
67 
71  void draw2(CScreenManager *screenManager) override;
72 
76  bool MouseButtonDownMsg(const Point &pt) override;
77 
81  bool MouseDragStartMsg(CMouseDragStartMsg *msg) override;
82 
86  bool MouseDragMoveMsg(CMouseDragMoveMsg *msg) override;
87 
91  bool MouseDragEndMsg(CMouseDragEndMsg *msg) override;
92 
96  bool MouseButtonUpMsg(const Point &pt) override;
97 
101  void highlightCurrent(const Point &pt) override {
102  setSliders();
103  }
104 
108  void getTooltip(CTextControl *text) override;
109 
113  void setSliders();
114 };
115 
116 } // End of namespace Titanic
117 
118 #endif /* TITANIC_PET_SOUND_H */
Definition: mouse_messages.h:150
void draw2(CScreenManager *screenManager) override
bool MouseButtonDownMsg(const Point &pt) override
Definition: text_control.h:35
void highlightCurrent(const Point &pt) override
Definition: pet_sound.h:101
Definition: mouse_messages.h:139
Definition: pet_slider.h:35
void getTooltip(CTextControl *text) override
Definition: screen_manager.h:49
Definition: pet_gfx_element.h:29
Definition: mouse_messages.h:181
Definition: pet_glyphs.h:53
Definition: pet_slider.h:202
bool reset() override
Definition: rect.h:45
Definition: arm.h:30
Definition: pet_sound.h:34
Definition: pet_glyphs.h:244
bool MouseButtonUpMsg(const Point &pt) override
bool setup(CPetControl *petControl, CPetGlyphs *owner) override
bool MouseDragEndMsg(CMouseDragEndMsg *msg) override
bool MouseDragMoveMsg(CMouseDragMoveMsg *msg) override
bool MouseDragStartMsg(CMouseDragStartMsg *msg) override
Definition: pet_control.h:45