Exemplo n.º 1
0
        private void BlinkToggle()
        {
            if (cc != null)
            {
                Logger.LogDebug("BlinkToggle start");
                blinkFlag = cc.GetEyesBlinkFlag();
                Logger.LogDebug($"before: {blinkFlag}");

                cc.ChangeEyesBlinkFlag(!blinkFlag);

                blinkFlag = cc.GetEyesBlinkFlag();
                Logger.LogDebug($"after: {blinkFlag}");
            }
            else
            {
                Logger.LogInfo("Not in Maker and/or Character not loaded.");
            }
        }
Exemplo n.º 2
0
        private void MakerAPI_Enter(object sender, RegisterCustomControlsEvent e)
        {
            cc        = MakerAPI.GetCharacterControl();
            blinkFlag = cc.GetEyesBlinkFlag();
            //Logger.LogDebug("on enter: " + blinkFlag);

            sidebarToggle       = e.AddSidebarControl(new SidebarToggle("Disable eye blink", true, this));
            sidebarToggle.Value = blinkFlag;
            sidebarToggle.ValueChanged.Subscribe(b => BlinkToggle()); //need to fix so BlinkToggle doesn't get called when control is created
        }