Example #1
0
        protected override void HandleVisibilityChanged(bool visible)
        {
            base.HandleVisibilityChanged(visible);

            if (ModalUI)
            {
                uiManager?.SetModalUI(visible ? this : null);
            }

            if (BlockInputWhenVisible)
            {
                if (scriptPlayer.SkipActive)
                {
                    scriptPlayer.SetSkipEnabled(false);
                }
                if (scriptPlayer.AutoPlayActive)
                {
                    scriptPlayer.SetAutoPlayEnabled(false);
                }
            }
        }
Example #2
0
        protected override void HandleVisibilityChanged(bool visible)
        {
            base.HandleVisibilityChanged(visible);

            if (ModalUI)
            {
                uiManager?.SetModalUI(visible ? this : null);
            }

            if (BlockInputWhenVisible)
            {
                if (scriptPlayer.SkipActive && !(AllowedSamplers?.Contains(InputConfiguration.SkipName) ?? false))
                {
                    scriptPlayer.SetSkipEnabled(false);
                }
                if (scriptPlayer.AutoPlayActive && !(AllowedSamplers?.Contains(InputConfiguration.AutoPlayName) ?? false))
                {
                    scriptPlayer.SetAutoPlayEnabled(false);
                }
            }
        }
Example #3
0
 protected override void OnButtonClick()
 {
     player.SetAutoPlayEnabled(!player.AutoPlayActive);
 }