diff options
author | Torbjörn Andersson | 2005-05-16 06:33:33 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-05-16 06:33:33 +0000 |
commit | 6bcfb6ed97bef820b1b3d071b9fdd34a2bbe8f7a (patch) | |
tree | 8c9f63d422650a058a8a07b1247bd910890773dd /gui | |
parent | a0648d054f21cab4c64bb651b141ccd0c22c9559 (diff) | |
download | scummvm-rg350-6bcfb6ed97bef820b1b3d071b9fdd34a2bbe8f7a.tar.gz scummvm-rg350-6bcfb6ed97bef820b1b3d071b9fdd34a2bbe8f7a.tar.bz2 scummvm-rg350-6bcfb6ed97bef820b1b3d071b9fdd34a2bbe8f7a.zip |
Fixed the SoundFont button's behaviour in the Edit Game dialog.
svn-id: r18125
Diffstat (limited to 'gui')
-rw-r--r-- | gui/launcher.cpp | 14 | ||||
-rw-r--r-- | gui/options.cpp | 4 | ||||
-rw-r--r-- | gui/options.h | 3 |
3 files changed, 19 insertions, 2 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp index e7460b1842..ba03f00b1e 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -65,6 +65,8 @@ enum { kCmdGlobalMIDIOverride = 'OMID', kCmdGlobalVolumeOverride = 'OVOL', + kCmdChooseSoundFontCmd = 'chsf', + kCmdExtraBrowser = 'PEXT', kCmdGameBrowser = 'PGME', kCmdSaveBrowser = 'PSAV' @@ -375,6 +377,18 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat draw(); break; + case kCmdChooseSoundFontCmd: { + BrowserDialog browser("Select SoundFont", false); + + if (browser.runModal() > 0) { + // User made this choice... + FilesystemNode file(browser.getResult()); + _soundFont->setLabel(file.path()); + draw(); + } + break; + } + // Change path for the game case kCmdGameBrowser: { BrowserDialog browser("Select additional game directory", true); diff --git a/gui/options.cpp b/gui/options.cpp index b9516b32ff..5116d67178 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -291,6 +291,8 @@ void OptionsDialog::setAudioSettingsState(bool enabled) { void OptionsDialog::setMIDISettingsState(bool enabled) { _enableMIDISettings = enabled; + _soundFontButton->setEnabled(enabled); + _soundFont->setEnabled(enabled); _multiMidiCheckbox->setEnabled(enabled); _mt32Checkbox->setEnabled(enabled); _enableGSCheckbox->setEnabled(enabled); @@ -383,7 +385,7 @@ int OptionsDialog::addMIDIControls(GuiObject *boss, int yoffset) { const int w = _w - 20; // SoundFont - new ButtonWidget(boss, x, yoffset, kButtonWidth + 14, 16, "SoundFont: ", kChooseSoundFontCmd, 0); + _soundFontButton = new ButtonWidget(boss, x, yoffset, kButtonWidth + 14, 16, "SoundFont: ", kChooseSoundFontCmd, 0); _soundFont = new StaticTextWidget(boss, x + kButtonWidth + 20, yoffset + 3, _w - (x + kButtonWidth + 20) - 10, kLineHeight, "None", kTextAlignLeft); yoffset += 18; diff --git a/gui/options.h b/gui/options.h index cfa40fae0e..9a68f16ca0 100644 --- a/gui/options.h +++ b/gui/options.h @@ -52,7 +52,8 @@ public: protected: /** Config domain this dialog is used to edit. */ String _domain; - + + ButtonWidget *_soundFontButton; StaticTextWidget *_soundFont; int addGraphicControls(GuiObject *boss, int yoffset); |