private void SetStartPositions() { SetDefaultStartPosition(); LastHighlighted = DefaultStartOnThisNode; LastSelected = DefaultStartOnThisNode; if (_groupsList.Count <= 1) { return; } GroupIndex = BranchGroups.SetGroupIndex(DefaultStartOnThisNode, _groupsList); }
private void SetHighlightedNode() { if (LastHighlighted.IsNull()) { return; } if (_canActivateBranch) { LastHighlighted.SetNodeAsActive(); } GroupIndex = BranchGroups.SetGroupIndex(LastHighlighted, _groupsList); }
private bool MustActivateKeysFirst_Branch() { if (_currentSwitchFunction != SwitchFunction.Branch) { _currentSwitchFunction = SwitchFunction.Branch; SwitchType = SwitchType.Activate; ChangeControls?.Invoke(this); var activeBranch = _myDataHub.ActiveBranch; activeBranch.GroupIndex = BranchGroups.SwitchBranchGroup(activeBranch.BranchGroupsList, activeBranch.GroupIndex, SwitchType.Activate); return(true); } return(false); }
public bool BranchGroupSwitchProcess() { if (_myDataHub.ActiveBranch.BranchGroupsList.Count <= 1) { return(false); } if (_inputScheme.PressedPositiveSwitch()) { if (MustActivateKeysFirst_Branch()) { return(true); } DoSwitch(SwitchType.Positive, BranchSwitch); return(true); } if (_inputScheme.PressedNegativeSwitch()) { if (MustActivateKeysFirst_Branch()) { return(true); } DoSwitch(SwitchType.Negative, BranchSwitch); return(true); } return(false); void BranchSwitch() { var activeBranch = _myDataHub.ActiveBranch; activeBranch.GroupIndex = BranchGroups.SwitchBranchGroup(activeBranch.BranchGroupsList, activeBranch.GroupIndex, SwitchType); } }
private void CheckForControlBar() => BranchGroups.AddControlBarToGroupList(_groupsList, _myHub.HomeBranches, this);