FULLPIPE: Implement ModalMainMenu::setSliderPos()

This commit is contained in:
Eugene Sandulenko 2014-04-18 21:18:04 +03:00
parent e6c6eac9af
commit 23f15c754f
4 changed files with 29 additions and 1 deletions

View File

@ -71,6 +71,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_flgSoundList = true;
_sfxVolume = 0;
_musicVolume = 0;
_inputController = 0;
_inputDisabled = false;

View File

@ -164,6 +164,7 @@ public:
void setMusicVolume(int vol);
int _sfxVolume;
int _musicVolume;
GlobalMessageQueueList *_globalMessageQueueList;
MessageHandler *_messageHandlers;

View File

@ -1144,7 +1144,31 @@ void ModalMainMenu::enableDebugMenuButton() {
}
void ModalMainMenu::setSliderPos() {
warning("STUB: ModalMainMenu::setSliderPos()");
int x = 173 * (g_fp->_sfxVolume + 3000) / 3000 + 65;
PictureObject *obj = _areas[_menuSliderIdx]->picObjD;
if (x >= 65) {
if (x > 238)
x = 238;
} else {
x = 65;
}
obj->setOXY(x, obj->_oy);
_areas[_menuSliderIdx]->picObjL->setOXY(x, obj->_oy);
x = 173 * g_fp->_musicVolume / 255 + 65;
obj = _areas[_musicSliderIdx]->picObjD;
if (x >= 65) {
if (x > 238)
x = 238;
} else {
x = 65;
}
obj->setOXY(x, obj->_oy);
_areas[_musicSliderIdx]->picObjL->setOXY(x, obj->_oy);
}
ModalHelp::ModalHelp() {

View File

@ -204,6 +204,8 @@ void FullpipeEngine::updateSoundVolume() {
}
void FullpipeEngine::setMusicVolume(int vol) {
_musicVolume = vol;
debug(3, "STUB FullpipeEngine::setMusicVolume()");
}