diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/options.cpp | 29 | ||||
-rw-r--r-- | gui/options.h | 3 |
2 files changed, 25 insertions, 7 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index 17cb2992e5..532e109ac7 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -74,21 +74,30 @@ GlobalOptionsDialog::GlobalOptionsDialog(NewGui *gui, GameDetector &detector) gfxPopUp->appendEntry("TV2x"); gfxPopUp->appendEntry("DotMatrix"); gfxPopUp->setSelected(0); + + // FIXME - disable GFX popup for now + gfxPopUp->setEnabled(false); + // The MIDI mode popup & a label - new StaticTextWidget(this, 5, 26+1, 100, kLineHeight, "Music driver: ", kTextAlignRight); - PopUpWidget *midiPopUp; - midiPopUp = new PopUpWidget(this, 105, 26, 180, kLineHeight); + StaticTextWidget *foo = new StaticTextWidget(this, 5, 26+1, 100, kLineHeight, "Music driver: ", kTextAlignRight); + foo->setEnabled(false); + _midiPopUp = new PopUpWidget(this, 105, 26, 180, kLineHeight); + int midiSelected = 0, i = 0;; // Populate it const MusicDriver *md = GameDetector::getMusicDrivers(); while (md->name) { - if (GameDetector::isMusicDriverAvailable(md->id)) - midiPopUp->appendEntry(md->description, md->id); + if (GameDetector::isMusicDriverAvailable(md->id)) { + _midiPopUp->appendEntry(md->description, md->id); + if (md->id == _detector._midi_driver) + midiSelected = i; + i++; + } md++; } - midiPopUp->setSelected(0); - + _midiPopUp->setSelected(midiSelected); + // // Sound controllers // @@ -188,6 +197,12 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3 _sfxVolumeLabel->setValue(_soundVolumeSfx); _sfxVolumeLabel->draw(); break; + case kPopUpItemSelectedCmd: + if (sender == _midiPopUp) { + _detector._midi_driver = (int)data; + printf("Setting _detector._midi_driver to %d\n", _detector._midi_driver); + } + break; case kOKCmd: // TODO Write back changes made to config object setResult(1); diff --git a/gui/options.h b/gui/options.h index d15199c76b..4ff51bb266 100644 --- a/gui/options.h +++ b/gui/options.h @@ -27,6 +27,7 @@ class BrowserDialog; class GameDetector; +class PopUpWidget; class GlobalOptionsDialog : public Dialog { typedef ScummVM::String String; @@ -44,6 +45,8 @@ protected: BrowserDialog *_browser; StaticTextWidget*_savePath; + PopUpWidget *_midiPopUp; + int _soundVolumeMaster; int _soundVolumeMusic; int _soundVolumeSfx; |