The core scripts of the framework.
The View of MVVM(Model, ViewModel, View), holds all holder(panel) and components to response for model updates.
The ViewModel.
protected Action<int> onPlayEfx; //particular for Efx type of Particle protected Action<int, UIStateType> onUpdateState; protected Action<int, bool> onUpdateState_ShowOrHide; protected Action<int, UIEventType> onUpdateEvent; protected Action<int, Vector2> onUpdatePos; protected Action<int, Vector2> onUpdateSize; protected Action<int, string> onUpdateTxt; protected Action<int, string> onUpdateName; protected Action<int, List<string>> onUpdateGroupNames; protected Action<int, TextAnchor> onUpdateTxtAlign; protected Action<int, string> onUpdateImg;//net image surpport protected Func<int, string, GameObject> onUpdateWebView; protected Action<int, ValueType, ValueType> onUpdateProg; protected Action<int, float> onUpdateSlider; protected Action<int, int,int> onUpdateSliderMaxAndMinValue; protected Action<int, bool> onUpdateTogl; protected Action<int, int> onUpdateGroupIdx; protected Action<int, string> onUpdateIptInitStr; protected Action<int, int> onUpdateIptLimit; protected Action<int, Color> onUpdateColor; protected Action<int, string> onUpdateEmoji; protected Action<int, int> onUpdateLstFocus;//for lst self protected Action<int, Vector2> onUpdateLstPos; protected Action<GameObject, int> onSetParent; ... ...
Manage all ui scenes.
API:
public bool HasEntered (int sceneid) public void EnterScene(int sceneid) public void ExitScene () public void OnEnd () public bool IsSceneDefaultUI (int panelTypID) public int GetSceneDefaultToppestUI (int sceneID) public bool Logout () ... ...
Offer common public functions.
public GameObject Load (int panelTypeID) public GameObject Load (UIPanelType uiPanelType, string prefabName = null) public void Close (int instanceID) public void ToggleGO (GameObject go, bool isActive) public void Show(int insID) public void Hide(int insID) public void ShowAll() public void HideAll() public void RestartAll () public void CommonBack () public void LoadCheckDialog (string title, string des, IDictionary<UIEnum_CheckDlgBtnType, string> btnsTextDict = null, Action<UIEnum_CheckDlgBtnType> onBtnResponce = null) ... ...