//Update更新 public virtual void InputUpdate(UIFormLogic ui) { //Log.Info("{0} {1}", _IsCtrl, StartSelect1P); if (!_IsCtrl) { return; } if (StartSelect1P != null) { currentSelectable1P = StartSelect1P; SaveSelect1P = StartSelect1P; StartSelect1P = null; } if (StartSelect2P != null) { currentSelectable2P = StartSelect2P; SaveSelect2P = StartSelect2P; StartSelect2P = null; } Ctrl1P(); OnBack(); Ctrl2P(); }
private void GetObjects() { ReferenceCollector rc = UIFormLogic.GetComponent <ReferenceCollector>(); m_BtnTest = rc.GetObj <Button>(0); m_BtnTest2 = rc.GetObj <Button>(1); }
public static MapFormParams Create(UIFormLogic uIForm, Game.Stage stage, ProcedureBase procedure = null) { MapFormParams param = ReferencePool.Acquire <MapFormParams>(); param.UIForm = uIForm; param.Stage = stage; return(param); }
internal void EnableSelect(UIFormLogic uiForm, bool isOpen) { for (int i = 0; i < LtButtons.Count; i++) { if (LtButtons[i]) { LtButtons[i].enabled = true; } } if (StartSelect1P == null) { if (isOpen) { if (IsSaveFocuseButton && BeforeSelectable1P != null) { currentSelectable1P = BeforeSelectable1P; } else if (!IsSaveFocuseButton && SaveSelect1P != null) { currentSelectable1P = SaveSelect1P; } } else { if (BeforeSelectable1P != null) { currentSelectable1P = BeforeSelectable1P; } } } if (StartSelect2P == null) { if (isOpen) { if (IsSaveFocuseButton && _BeforeSelectable2P != null) { currentSelectable2P = _BeforeSelectable2P; } else if (!IsSaveFocuseButton && SaveSelect2P) { currentSelectable2P = SaveSelect2P; } } else if (StartSelect2P == null) { if (_BeforeSelectable2P != null) { currentSelectable2P = _BeforeSelectable2P; } } } _IsCtrl = true; }
/// <summary> /// 得到焦点 /// </summary> /// <param UIName="uiForm"></param> /// <returns></returns> internal string[] GetFocus(UIFormLogic uiForm) { string[] focus = null; if (_UIFormCurrentFocus.ContainsKey(uiForm.name)) { focus = new string[2]; for (int i = 0; i < 2; i++) { focus[i] = _UIFormCurrentFocus[uiForm.name][i]; } } return(focus); }
/// <summary> /// 保存焦点 /// </summary> /// <param UIName="uiForm"></param> /// <param UIName="button"></param> internal void SaveFocus(UIFormLogic uiForm, LtButton button, LtButton button_2P) { if (!_UIFormCurrentFocus.ContainsKey(uiForm.name)) { string[] btnCache = new string[2]; _UIFormCurrentFocus.Add(uiForm.name, btnCache); } string[] focus = _UIFormCurrentFocus[uiForm.name]; focus[0] = button.name; if (button_2P != null) { focus[1] = button_2P.name; } else { focus[1] = string.Empty; } }
//public SelectableCtrl(IBaseUIForm uiForm) public SelectableCtrl(UIFormLogic uiForm) { this._UIForm = uiForm; }
public virtual void Clear() { UIForm = null; }
public static void CloseUIForm(this UIComponent uiComponent, UIFormLogic uiForm) { uiComponent.CloseUIForm(uiForm.UIForm); }