public void CloseAllPanels() { foreach (ButtonDemoToggle button in m_panelButtons) { TogglePanelDataBinder panelDataBinder = PanelDataBinderDictionary[button].GetComponent <TogglePanelDataBinder>(); // panel.SetActive(false); // find a replacement for this panelDataBinder.SetCurrentData(false); } }
public void ChangeActivePanel(ButtonDemoToggle clickedButton) { // Debug.Log (clickedButton.transform.parent.name + ".ChangeActivePanel() - 1"); ArmHUDState.Change(ARMHUDSTATE_PANELVISIBLE); foreach (ButtonDemoToggle button in m_panelButtons) { if (button == clickedButton) { TogglePanelDataBinder panelDataBinder = PanelDataBinderDictionary[button].GetComponent <TogglePanelDataBinder>(); if (panelDataBinder.GetCurrentData() == false) { ArmHUDState.Change(ARMHUDSTATE_SETTINGS_ONLY); // panelDataBinder.SetCurrentData(true); // } else { // panelDataBinder.SetCurrentData(true); } } else { TogglePanelDataBinder panelDataBinder = PanelDataBinderDictionary[button].GetComponent <TogglePanelDataBinder>(); panelDataBinder.SetCurrentData(false); } } }