I want to make a button bring up a SkyUI MCM slider window.

Post » Sat Mar 09, 2013 5:56 pm

I've already figured out a script which makes a button do something and created a MCM menu where you can customize various features but the only way I know how to make a slider window pop up is by clicking a button in the MCM menu.

But how do I make a button just open it straight away?


Here is the script for the keypress detection:
Scriptname _wzWaitScript01 extends QuestGlobalVariable Property KeyPressTime autobool bIsHotkeyPressedint Property iHotKey = 20 autoint waitOIDEvent OnInit()    RegisterForSingleUpdate(KeyPressTime.GetValue())EndEventEvent OnUpdate()if bIsHotkeyPressed != input.IsKeyPressed(iHotKey)    bIsHotkeyPressed = !bIsHotkeyPressed        if bIsHotkeyPressed            debug.Notification("Key Pressed")        endif    endifRegisterForSingleUpdate(KeyPressTime.GetValue())endEvent


Here is the script for the MCM menu:
Scriptname _wzMCMwait extends SKI_ConfigBase  GlobalVariable Property KeyDurVal autoint KeyDurOID;Menu FormattingEvent OnPageReset(string page)        AddHeaderOption("General Settings")            KeyDurOID = AddSliderOption("Keypress Delay", KeyDurVal.GetValue())endEvent;KeyPressDelay Slider settingsEvent OnOptionSliderOpen(Int option)    if (option == KeyDurOID)        SetSliderDialogStartvalue(KeyDurVal.GetValue())        SetSliderDialogDefaultValue(0.25)        SetSliderDialogRange(0.05, 2.0)        SetSliderDialogInterval(0.05)    endifendEvent;What happens after KeyPressDelay slider has been acceptedEvent OnOptionSliderAccept(Int option, float value)    if (option == KeyDurOID)        KeyDurVal.SetValue(value)        SetSliderOptionValue(KeyDurOID, KeyDurVal.GetValue())        debug.Notification(KeyDurVal.GetValue())    endIfendEvent;Information TooltipsEvent OnOptionHighLight(int option)    If (option == KeyDurOID)        SetInfoText("Changes how responsive the key will be. WARNING: Less time = more performance hit but more responsive")    endIfendEvent
User avatar
Symone Velez
 
Posts: 3434
Joined: Thu Sep 07, 2006 12:39 am

Return to V - Skyrim