InitScreen() public method

public InitScreen ( String pName, System.Action pAction ) : void
pName String
pAction System.Action
return void
Ejemplo n.º 1
0
        private void AddUserMenuBtn(String pTitle, Action pAction)
        {
            GameObject objSubs = Instantiate(Resources.Load(PREFAB_USER_MENU_BTN)) as GameObject;
            UserProfileBtnController controllerSubs = objSubs.GetComponentInChildren <UserProfileBtnController>();

            controllerSubs.InitScreen(pTitle, pAction);
            objSubs.transform.SetParent(_btnDropDownObj.transform);
            Resizer.SetDefScale(objSubs);
        }
        public void InitScreen(XsollaUtils pUtils)
        {
            // set title
            _titleProj.text = pUtils.GetProject().name;

            // user name
            _userName.text = pUtils.GetUser().GetName();

            if (pUtils.GetUser().virtualCurrencyBalance != null)
            {
                GameObject obj = Instantiate(Resources.Load(PREFAB_VIEW_MENU_ITEM_EMPTY)) as GameObject;
                UserProfileBtnController controller = obj.GetComponentInChildren <UserProfileBtnController>();
                controller.InitScreen("History", ShowHistory);
                obj.transform.SetParent(_btnDropDownObj.transform);
            }
        }