public void Initialize(GlowingButton button) { _button = button; _button.onKeyStateChanged += OnKeyStateChanged; _defaultLedFunction = new LedFunctions.LedDelegate(() => { return(_button.key || _hasSavedData); }); _button.ledFunction = _defaultLedFunction; DeleteStoredDataButtonHandler.RegisterDeleter(this); }
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); }
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); } }