From 888f356e58c31f3a88544c7dbb458f9225ae4091 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 28 Nov 2015 12:43:01 +0100 Subject: [PATCH] - use the recently added text input menu item to add the config file for GUS, the patch set for Fluidsynth and the timidity.exe path for Timidity++ to the menu. Even though there is no proper file select box, this is still better than nothing. - changed the text input item so that it realigns itself to show the entire text when in text input mode. --- src/menu/optionmenuitems.h | 13 +++++++++++++ wadsrc/static/menudef.txt | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/menu/optionmenuitems.h b/src/menu/optionmenuitems.h index e87e78483e..c63359f4b4 100644 --- a/src/menu/optionmenuitems.h +++ b/src/menu/optionmenuitems.h @@ -1045,6 +1045,19 @@ public: return text; } + int Draw(FOptionMenuDescriptor*desc, int y, int indent, bool selected) + { + if (mEntering) + { + // reposition the text so that the cursor is visible when in entering mode. + FString text = Represent(); + int tlen = SmallFont->StringWidth(text) * CleanXfac_1; + int newindent = screen->GetWidth() - tlen - CURSORSPACE; + if (newindent < indent) indent = newindent; + } + return FOptionMenuFieldBase::Draw(desc, y, indent, selected); + } + bool MenuEvent ( int mkey, bool fromcontroller ) { if ( mkey == MKEY_Enter ) diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 1b9a2c6061..eef2629d31 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1590,10 +1590,24 @@ OptionMenu AdvSoundOptions Option "OPL Emulator Core", "opl_core", "OplCores" StaticText " " StaticText "GUS Emulation", 1 + TextField "GUS config file", "midi_config" Slider "MIDI voices", "midi_voices", 16, 256, 4, 0 Option "Emulate TiMidity", "midi_timiditylike", "OnOff" Option "Read DMXGUS lumps", "midi_dmxgus", "OnOff" Option "GUS memory size", "gus_memsize", "GusMemory" + StaticText " " + StaticText "FluidSynth", 1 + TextField "Patch set", "fluid_patchset" + Slider "Gain", "fluid_gain", 0, 10, 0.5, 1 + Option "Reverb", "fluid_reverb", "OnOff" + Slider "MIDI voices", "fluid_voices", 16, 4096, 16, 1 + // Leaving out the more advanced stuff for now. + StaticText " " + StaticText "Timidity++", 1 + TextField "Path for executable", "timidity_exe" + Option "Reverb", "timidity_reverb", "OnOff" + Option "Chorus", "timidity_chorus", "OnOff" + Slider "Relative volume", "timidity_mastervolume", 0, 4, 0.2, 1 } /*=======================================