mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 00:45:10 +00:00
Implement FR#1600020: GUI: Select "No SoundFont"
svn-id: r25556
This commit is contained in:
parent
d5b169d8a6
commit
d90fc8914c
@ -68,6 +68,7 @@ enum {
|
||||
kSubtitleSpeedChanged = 'stsc',
|
||||
kSpeechVolumeChanged = 'vcvc',
|
||||
kChooseSoundFontCmd = 'chsf',
|
||||
kClearSoundFontCmd = 'clsf',
|
||||
kChooseSaveDirCmd = 'chos',
|
||||
kChooseThemeDirCmd = 'chth',
|
||||
kChooseExtraDirCmd = 'chex',
|
||||
@ -321,6 +322,8 @@ void OptionsDialog::close() {
|
||||
String soundFont(_soundFont->getLabel());
|
||||
if (!soundFont.empty() && (soundFont != "None"))
|
||||
ConfMan.set("soundfont", soundFont, _domain);
|
||||
else
|
||||
ConfMan.removeKey("soundfont", _domain);
|
||||
} else {
|
||||
ConfMan.removeKey("multi_midi", _domain);
|
||||
ConfMan.removeKey("native_mt32", _domain);
|
||||
@ -441,6 +444,7 @@ void OptionsDialog::setMIDISettingsState(bool enabled) {
|
||||
|
||||
_soundFontButton->setEnabled(enabled);
|
||||
_soundFont->setEnabled(enabled);
|
||||
_soundFontClearButton->setEnabled(enabled);
|
||||
_multiMidiCheckbox->setEnabled(enabled);
|
||||
_mt32Checkbox->setEnabled(enabled);
|
||||
_enableGSCheckbox->setEnabled(enabled);
|
||||
@ -532,6 +536,7 @@ void OptionsDialog::addMIDIControls(GuiObject *boss, const String &prefix) {
|
||||
// SoundFont
|
||||
_soundFontButton = new ButtonWidget(boss, prefix + "mcFontButton", "SoundFont:", kChooseSoundFontCmd, 0);
|
||||
_soundFont = new StaticTextWidget(boss, prefix + "mcFontPath", "None");
|
||||
_soundFontClearButton = new ButtonWidget(boss, prefix + "mcFontClearButton", "C", kClearSoundFontCmd, 0);
|
||||
|
||||
// Multi midi setting
|
||||
_multiMidiCheckbox = new CheckboxWidget(boss, prefix + "mcMixedCheckbox", "Mixed Adlib/MIDI mode", 0, 0);
|
||||
@ -804,6 +809,11 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
|
||||
}
|
||||
break;
|
||||
}
|
||||
case kClearSoundFontCmd: {
|
||||
_soundFont->setLabel("None");
|
||||
draw();
|
||||
break;
|
||||
}
|
||||
case kChooseThemeCmd: {
|
||||
ThemeBrowser browser;
|
||||
if (browser.runModal() > 0) {
|
||||
|
@ -62,6 +62,7 @@ protected:
|
||||
|
||||
ButtonWidget *_soundFontButton;
|
||||
StaticTextWidget *_soundFont;
|
||||
ButtonWidget *_soundFontClearButton;
|
||||
|
||||
void addGraphicControls(GuiObject *boss, const String &prefix);
|
||||
void addAudioControls(GuiObject *boss, const String &prefix);
|
||||
|
@ -370,7 +370,8 @@ const char *Theme::_defaultConfigINI =
|
||||
"[midiControls]\n"
|
||||
"mcx=10\n"
|
||||
"mcFontButton=mcx opYoffset buttonWidth buttonHeight\n"
|
||||
"mcFontPath=(prev.x2 + 20) (opYoffset + 3) (parent.w - (buttonWidth + 20) - 15) kLineHeight\n"
|
||||
"mcFontPath=(prev.x2 + 20) (opYoffset + 3) (parent.w - (buttonWidth + 20) - 15 - kLineHeight - 10) kLineHeight\n"
|
||||
"mcFontClearButton=(prev.x2 + 10) (opYoffset + 2) kLineHeight kLineHeight\n"
|
||||
"opYoffset=(opYoffset + buttonHeight + 2 * midiControlsSpacing)\n"
|
||||
"mcMixedCheckbox=mcx opYoffset (kFontHeight + 10 + 135) buttonHeight\n"
|
||||
"opYoffset=(opYoffset + buttonHeight + midiControlsSpacing)\n"
|
||||
|
@ -489,7 +489,8 @@ opYoffset=(opYoffset + sliderHeight + 12)
|
||||
mcx=(opXoffset + 10)
|
||||
mcOff=((buttonHeight - kLineHeight) / 2 + 2)
|
||||
mcFontButton=mcx opYoffset buttonWidth buttonHeight
|
||||
mcFontPath=(prev.x2 + 20) (opYoffset + mcOff) (parent.w - (buttonWidth + 20) - 10) kLineHeight
|
||||
mcFontPath=(prev.x2 + 20) (opYoffset + mcOff) (parent.w - (buttonWidth + 20) - 10 - kLineHeight - 20) kLineHeight
|
||||
mcFontClearButton=(prev.x2 + 10) (opYoffset + mcOff) kLineHeight kLineHeight
|
||||
opYoffset=(opYoffset + buttonHeight + 6 * midiControlsSpacing)
|
||||
mcMixedCheckbox=mcx opYoffset (kFontHeight + 10 + 135) buttonHeight
|
||||
opYoffset=(opYoffset + buttonHeight + midiControlsSpacing)
|
||||
|
Loading…
x
Reference in New Issue
Block a user