コード例 #1
0
        public void Teardown()
        {
            if (_button != null)
            {
                _button.onKeyStateChanged -= OnKeyStateChanged;
                _button.ledFunction        = null;
                _button = null;
            }

            DeleteStoredDataButtonHandler.UnregisterDeleter(this);
        }
コード例 #2
0
        public void Initialize(GlowingButton button)
        {
            _button = button;
            _button.onKeyStateChanged += OnKeyStateChanged;

            _defaultLedFunction = new LedFunctions.LedDelegate(() =>
            {
                return(_button.key || _hasSavedData);
            });

            _button.ledFunction = _defaultLedFunction;

            DeleteStoredDataButtonHandler.RegisterDeleter(this);
        }
コード例 #3
0
        public void Initialize(GlowingButton button)
        {
            _button = button;
            _button.onKeyStateChanged += OnKeyStateChanged;

            _defaultLedFunction = new LedFunctions.LedDelegate(() =>
            {
                return(_button.key ||
                       (_hasSavedData && ((areObjectsSelected && LedFunctions.LedFlashing.slow.GetLedState(button)) || !areObjectsSelected)));
            });

            _button.ledFunction = _defaultLedFunction;

            DeleteStoredDataButtonHandler.RegisterDeleter(this);
        }
コード例 #4
0
        public void Initialize(GlowingButton button)
        {
            _button = button;
            _button.onKeyStateChanged += OnKeyStateChanged;

            _defaultLedFunction = new LedFunctions.LedDelegate(() =>
            {
                return(_button.key ||
                       (isWindowFocused && LedFunctions.LedFlashing.slow.GetLedState(button)) ||
                       (_hasSavedData && !isWindowFocused));
            });

            _button.ledFunction = _defaultLedFunction;

            DeleteStoredDataButtonHandler.RegisterDeleter(this);

            if (!string.IsNullOrEmpty(_focusedWindowTypeName) && _hasSavedData)
            {
                _focusedWindowType = System.Type.GetType(_focusedWindowTypeName);
            }
        }