private void ToggleLookToScroll() { Log.Info("Look to scroll active key was selected."); if (keyStateService.KeyDownStates[KeyValues.LookToScrollActiveKey].Value.IsDownOrLockedDown()) { Log.Info("Look to scroll is now active."); lookToScrollBoundsWhenActivated = Settings.Default.LookToScrollBounds; lookToScrollLeftoverScrollAmount = new Vector(); if (keyStateService.KeyDownStates[KeyValues.LookToScrollBoundsKey].Value.IsDownOrLockedDown()) { Log.Info("Re-using previous bounds target."); TakeActionsUponLookToScrollStarted(); } else { ChooseLookToScrollBoundsTarget(); } } else { Log.Info("Look to scroll is no longer active."); } }
private void SelectNextLookToScrollBounds() { Log.Info("Look to scroll bounds key was selected."); if (keyStateService.KeyDownStates[KeyValues.LookToScrollActiveKey].Value.IsDownOrLockedDown()) { // If scrolling is active, force the bounds target to be rechosen. This will also cause the // bounds key to become locked down again. ChooseLookToScrollBoundsTarget(); } else if (keyStateService.KeyDownStates[KeyValues.LookToScrollBoundsKey].Value.IsDownOrLockedDown()) { // We're not scrolling, and the bounds key wasn't locked down previously. In this case, just // release the key and cycle to the next bounds value. It'll eventually get locked down for // real when scrolling is toggled on and the bounds target is chosen. keyStateService.KeyDownStates[KeyValues.LookToScrollBoundsKey].Value = KeyDownStates.Up; LookToScrollBounds before = Settings.Default.LookToScrollBounds; LookToScrollBounds after = GetNextEnumValue(before); Settings.Default.LookToScrollBounds = after; Log.InfoFormat("Changed look to scroll bounds from {0} to {1}.", before, after); } else { // We're not scrolling, but the bounds key was locked down previously. By releasing the // key, we'll force the bounds target to be rechosen. Since we might want to do so for // the current bounds value without having to cycle back around, we'll just leave it // alone. The next key press will start cycling. Log.Info("Unlocked look to scroll bounds key. The bounds target will need to be rechosen."); } }
private void SelectNextLookToScrollBounds() { LookToScrollBounds before = Settings.Default.LookToScrollBounds; LookToScrollBounds after = GetNextEnumValue(before); Settings.Default.LookToScrollBounds = after; Log.InfoFormat("Changed look to scroll bounds from {0} to {1}.", before, after); }