public bool TryExpandPanel() { StateLayer val = default(StateLayer); if (StateManager.TryGetLayer("PlayerUI", ref val) && val.GetChainEnd() == this) { StateManager.SetActiveInputLayer(val); PlayerNavRibbonState playerNavRibbonState = new PlayerNavRibbonState(); val.GetChainRoot().SetChildState(playerNavRibbonState, 0); return(true); } return(false); }
protected override IEnumerator Update() { yield return(m_ui.PlayEnterAnimation(GetWeaponsList())); StateLayer val = default(StateLayer); if (StateManager.TryGetLayer("PlayerUI", ref val)) { m_subState = new DeckEditState(); m_subState.OnCloseComplete += BackFromEditionState; val.GetChainEnd().SetChildState(m_subState, 0); } }
private void OnBugReportClick() { if (BugReportState.isReady) { StateLayer defaultLayer = default(StateLayer); if (!StateManager.TryGetLayer("OptionUI", ref defaultLayer)) { defaultLayer = StateManager.GetDefaultLayer(); } StateManager.SetActiveInputLayer(defaultLayer); BugReportState bugReportState = new BugReportState(); bugReportState.Initialize(); defaultLayer.GetChainEnd().SetChildState(bugReportState, 0); } }
private void OnOptions() { StateLayer val = default(StateLayer); if (StateManager.TryGetLayer("OptionUI", ref val)) { StateManager.SetActiveInputLayer(val); UIManager.instance.NotifyLayerIndexChange(); OptionState optionState = new OptionState { onStateClosed = OnOptionsClosed }; val.GetChainEnd().SetChildState(optionState, 0); } m_popupMenu.Close(); }
private void OnCloneRequest(int titleid, int desc) { PopupInfo info; StateLayer val2 = default(StateLayer); if (DeckUtility.GetRemainingSlotsForWeapon(new DeckInfo(m_selectedSlot.DeckInfo).Weapon) > 0) { StateLayer val = default(StateLayer); if (StateManager.TryGetLayer("PlayerUI", ref val)) { ButtonData[] buttons = new ButtonData[2] { new ButtonData(48064, OnCloneConfirme), new ButtonData(26918, OnCloneCanceld) }; PopupInfoManager.ClearAllMessages(); StateContext chainEnd = val.GetChainEnd(); info = new PopupInfo { title = titleid, message = desc, buttons = buttons, selectedButton = 1, style = PopupStyle.Normal }; PopupInfoManager.Show(chainEnd, info); } } else if (StateManager.TryGetLayer("PlayerUI", ref val2)) { ButtonData[] buttons2 = new ButtonData[1] { new ButtonData(27169, OnCloneCanceld) }; PopupInfoManager.ClearAllMessages(); StateContext chainEnd2 = val2.GetChainEnd(); info = new PopupInfo { title = 4176, message = 52887, buttons = buttons2, selectedButton = 1, style = PopupStyle.Normal }; PopupInfoManager.Show(chainEnd2, info); } }
private void OnBugReport() { if (BugReportState.isReady) { StateLayer defaultLayer = default(StateLayer); if (!StateManager.TryGetLayer("OptionUI", ref defaultLayer)) { defaultLayer = StateManager.GetDefaultLayer(); } StateManager.SetActiveInputLayer(defaultLayer); UIManager.instance.NotifyLayerIndexChange(); BugReportState bugReportState = new BugReportState(); bugReportState.Initialize(); defaultLayer.GetChainEnd().SetChildState(bugReportState, 0); m_popupMenu.Close(); } }
private void OpenState(StateContext state) { m_havreMap.SetInteractable(value: false); StateLayer val = default(StateLayer); StateLayer val2 = default(StateLayer); if (StateManager.TryGetLayer("OptionUI", ref val) && val.HasChildState() && val.GetChildState().HasChildState()) { m_havreMap.SetInteractable(value: true); } else if (StateManager.TryGetLayer("PlayerUI", ref val2)) { if (val2.HasChildState() && val2.GetChildState().HasChildState()) { m_havreMap.SetInteractable(value: true); return; } StateManager.SetActiveInputLayer(val2); val2.GetChainEnd().SetChildState(state, 0); } }
private void OnRemoveRequest() { if (!m_selectedSlot.Preconstructed) { ButtonData[] buttons = new ButtonData[2] { new ButtonData(9912, OnRemoveConfirm), new ButtonData(68421) }; StateLayer val = default(StateLayer); if (StateManager.TryGetLayer("PlayerUI", ref val)) { PopupInfoManager.ClearAllMessages(); PopupInfoManager.Show(val.GetChainEnd(), new PopupInfo { title = 52822, message = 76361, buttons = buttons, selectedButton = 1, style = PopupStyle.Error }); } } }
private void OnSave() { if (m_inAnimation) { return; } if (!m_selectedSlot.DeckInfo.IsValid() && m_wasValid) { ButtonData[] buttons = new ButtonData[2] { new ButtonData(75192, OnSaveConfirm), new ButtonData(38763) }; StateLayer val = default(StateLayer); if (StateManager.TryGetLayer("PlayerUI", ref val)) { PopupInfoManager.ClearAllMessages(); PopupInfoManager.Show(val.GetChainEnd(), new PopupInfo { title = 56031, message = 57158, buttons = buttons, selectedButton = 1, style = PopupStyle.Error }); } } else if (!DeckUtility.DecksAreEqual(m_previousSlot?.DeckInfo, m_selectedSlot?.DeckInfo)) { OnSaveConfirm(); } else { OnExit(); } }