diff options
author | Max Horn | 2003-03-26 20:43:58 +0000 |
---|---|---|
committer | Max Horn | 2003-03-26 20:43:58 +0000 |
commit | f5360cbb6c0123ec1334c0ff293358ca8b784625 (patch) | |
tree | 2986b728d8ae9163bf5aa1a1b51f7699af063386 /gui | |
parent | b3a20b29ba3d92329b965c25ca3601702707ee60 (diff) | |
download | scummvm-rg350-f5360cbb6c0123ec1334c0ff293358ca8b784625.tar.gz scummvm-rg350-f5360cbb6c0123ec1334c0ff293358ca8b784625.tar.bz2 scummvm-rg350-f5360cbb6c0123ec1334c0ff293358ca8b784625.zip |
Hook up the midi driver selection popup; disable GFX popup for now, till we modify the backends to properly allow for it's support
svn-id: r6867
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; |