diff --git a/zscript.txt b/zscript.txt index cbd9693..7d2c5b9 100644 --- a/zscript.txt +++ b/zscript.txt @@ -1,495 +1,11 @@ -version "4.7" +version "4.7.1" -// preset save functions -Class MFXPresetUtility -{ - static clearscope void SavePreset( int slot ) - { - let lmp = Wads.CheckNumForFullname("cvarinfo.marifx"); - String dat = Wads.ReadLump(lmp); - // fucking Windows - dat.Substitute("\r",""); - Array list, ln; - list.Clear(); - dat.Split(list,"\n"); - let dct = Dictionary.Create(); - bool dosave = false; - CVar v; - String pn = ""; - for ( int i=0; i 7 ) Selection = 0; - } - else return OptionMenuItem.MenuEvent(mkey,fromcontroller); - SetSelection(Selection); - Menu.MenuSound("menu/change"); - return true; - } -} - -// keyboard input snaps to increment -// holding shift increments by ten steps -Class OptionMenuItemMFXSlider : OptionMenuItemSlider -{ - bool bShift, bAlt; - - override bool MenuEvent ( int mkey, bool fromcontroller ) - { - double value = GetSliderValue(); - double step = bShift?(mStep*10):bAlt?(mStep*5):mStep; - if ( mkey == Menu.MKEY_Left ) value -= step; - else if ( mkey == Menu.MKEY_Right ) value += step; - else return OptionMenuItem.MenuEvent(mkey,fromcontroller); - if ( value ~== 0 ) value = 0; // This is to prevent formatting anomalies with very small values - value = round(value/step)*step; // truncate to step - SetSliderValue(clamp(value,mMin,mMax)); - Menu.MenuSound("menu/change"); - return true; - } -} - -// passes shift/alt presses to MFXSliders -Class MFXOptionMenu : OptionMenu -{ - override void Init( Menu parent, OptionMenuDescriptor desc ) - { - Super.init(parent,desc); - DontDim = true; - DontBlur = true; - } - - override bool OnUIEvent( UIEvent ev ) - { - for ( int i=0; i list, ln; + list.Clear(); + dat.Split(list,"\n"); + let dct = Dictionary.Create(); + bool dosave = false; + CVar v; + String pn = ""; + for ( int i=0; i 7 ) Selection = 0; + } + else return OptionMenuItem.MenuEvent(mkey,fromcontroller); + SetSelection(Selection); + Menu.MenuSound("menu/change"); + return true; + } +} + +// keyboard input snaps to increment +// holding shift increments by ten steps +Class OptionMenuItemMFXSlider : OptionMenuItemSlider +{ + bool bShift, bAlt; + + override bool MenuEvent ( int mkey, bool fromcontroller ) + { + double value = GetSliderValue(); + double step = bShift?(mStep*10):bAlt?(mStep*5):mStep; + if ( mkey == Menu.MKEY_Left ) value -= step; + else if ( mkey == Menu.MKEY_Right ) value += step; + else return OptionMenuItem.MenuEvent(mkey,fromcontroller); + if ( value ~== 0 ) value = 0; // This is to prevent formatting anomalies with very small values + value = round(value/step)*step; // truncate to step + SetSliderValue(clamp(value,mMin,mMax)); + Menu.MenuSound("menu/change"); + return true; + } +} + +// passes shift/alt presses to MFXSliders +Class MFXOptionMenu : OptionMenu +{ + override void Init( Menu parent, OptionMenuDescriptor desc ) + { + Super.init(parent,desc); + DontDim = true; + DontBlur = true; + } + + override bool OnUIEvent( UIEvent ev ) + { + for ( int i=0; i