protected override void OnValidate() { base.OnValidate(); if (CanValidate() == false) { return; } bButtonReference = GetComponent <BButton>(); if (bButtonReference) { if (toBMenu) { showToMenuReferenceNotSet = false; if (overrideBButtonUIName == true) { bButtonReference.UIElementName = "B_ToM_" + toBMenu.UIElementName; } } else { showToMenuReferenceNotSet = true; LogConsoleError(infoToMenuReferenceNotSet); } } }
private void On_BButton_ButtonPressed(BButton maleficusButton, bool cursorInsideButton) { if (cursorInsideButton == true) { Execute(); } }
public void UnPopulateNavigationButtons() { LogConsole("Unpopulating buttons"); LeftButton = null; RightButton = null; UpperButton = null; BottomButton = null; }
private void On_ButtonReleased(BButton bButton, bool cursorOutside) { if ((cursorOutside == true) && (IS_NOT_NULL(bButtonReference)) && (IS_NOT_NULL(bButtonReference.ParentBFrame))) { bButtonReference.ParentBFrame.UpdateCurrentBMenu(toBMenu); } }
protected override void Awake() { base.Awake(); bButton = GetComponent <BButton>(); if (IS_NOT_NULL(bButton)) { bButton.ButtonPressed += On_BButton_ButtonPressed; } }
protected override void InitializeComponents() { base.InitializeComponents(); // Check Start Highlight BButton highlightedBButtonReference = startHighlightedBButton; //if (highlightedBButtonReference == null) //{ // LogConsoleError("No BButton selected as highlight!"); //} }
public void OnBButtonHighlighted(BButton bButton) { if (IS_NOT_NULL(bButton)) { if (bButton != highlightedBButtonReference) { if (highlightedBButtonReference) { highlightedBButtonReference.OnUnhighlighted(); } highlightedBButtonReference = bButton; } } }
protected override void OnValidate() { base.OnValidate(); if (cameraRayCaster == null) { cameraRayCaster = FindObjectOfType <CameraRayCaster>(); } if (bButton == null) { bButton = GetComponent <BButton>(); } }
public void SetStartHighlightedBButton(BButton bButton) { if (IS_NOT_NULL(bButton)) { if (highlightedBButtonReference) { highlightedBButtonReference.OnUnhighlighted(); } startHighlightedBButton = bButton; highlightedBButtonReference = bButton; highlightedBButtonReference.OnHighlighted(); } }
public void OnBecameActive() { IsActive = true; ShowUIElement(); if (BEventsCollection.IsInstanceSet) { BEventsCollection.UI_HighlightedBMenuUpdated.Invoke(new BEHandle <BMenu>(this), MotherOfManagers.Instance.DebugUIButtonsEvents); } if (startHighlightedBButton) { startHighlightedBButton.OnHighlighted(); highlightedBButtonReference = startHighlightedBButton; } }
private void On_BButton_ButtonPressed(BButton obj) { if (IS_NOT_NULL(bButton) && IS_NOT_NULL(ARManager.Instance)) { bool fixWorldRoot = ARManager.Instance.ToogleFixWorldRoot(); if (fixWorldRoot) { bButton.SetButtonTextColor(fixedColor); bButton.SetButtonText("Root Fixed"); } else { bButton.SetButtonTextColor(freeColor); bButton.SetButtonText("Root Free"); } } }
protected override void OnValidate() { objectNamePrefix = "M_"; base.OnValidate(); if (CanValidate() == false) { return; } // Get all children BMenu childrenBButtons = GetComponentsInChildren <BButton>(); childrenBButtonsList = new List <BBMenuChildBButton>(); foreach (BButton bButton in childrenBButtons) { childrenBButtonsList.Add(new BBMenuChildBButton(bButton, this)); } // Check Start Highlight BMenu highlightedBButtonReference = null; if (startHighlightedBButton) { showNoStartButtonHighlight = false; highlightedBButtonReference = startHighlightedBButton; } else { if ((childrenBButtons.Length > 0) && (childrenBButtons[0])) { startHighlightedBButton = childrenBButtons[0]; showNoStartButtonHighlight = false; highlightedBButtonReference = startHighlightedBButton; } else { //LogConsole(infoNoStartBButtonHighlight); showNoStartButtonHighlight = true; } } }
private void On_INPUT_ButtonPressed(BEHandle <EControllerID, EInputButton> eventHandle) { EInputButton inputButton = eventHandle.Arg2; if (CurrentBButtonHighlighted) { BButton nextButton = null; switch (inputButton) { case EInputButton.CONFIRM: CurrentBButtonHighlighted.OnPressed(); canPressButton = true; break; case EInputButton.LEFT: nextButton = CurrentBButtonHighlighted.GetNextButton(EButtonDirection.LEFT); break; case EInputButton.RIGHT: nextButton = CurrentBButtonHighlighted.GetNextButton(EButtonDirection.RIGHT); break; case EInputButton.UP: nextButton = CurrentBButtonHighlighted.GetNextButton(EButtonDirection.UP); break; case EInputButton.DOWN: nextButton = CurrentBButtonHighlighted.GetNextButton(EButtonDirection.DOWN); break; } // Update highlighted button if (nextButton != null) { CurrentBButtonHighlighted.OnUnhighlighted(); CurrentBButtonHighlighted = nextButton; nextButton.OnHighlighted(); canPressButton = false; } } }
public BButton GetNextButton(EButtonDirection buttonDirection) { BButton buttonToReturn = null; switch (buttonDirection) { case EButtonDirection.LEFT: buttonToReturn = leftButton; break; case EButtonDirection.RIGHT: buttonToReturn = rightButton; break; case EButtonDirection.UP: buttonToReturn = upperButton; break; case EButtonDirection.DOWN: buttonToReturn = buttomButton; break; } return(buttonToReturn); }
private void On_UI_ButtonHighlighted(BEHandle <BButton> bEHandle) { CurrentBButtonHighlighted = bEHandle.Arg1; }
protected override void InitializeComponents() { base.InitializeComponents(); bButtonReference = GetComponent <BButton>(); }
public BBMenuChildBButton(BButton bButton, BMenu bMenu) { childBButton = bButton; bMenuReference = bMenu; }