public void restoreWindow() { if (!isDialogWindow) { windowAnim = GUI_anim_class.LeftInRightOut; } prepareWindowForAnim(); gameObject.SetActive(true); openNewWindow = false; }
public void setWindowOutAnim(bool isNew) { openNewWindow = isNew; //关闭窗口右出,开新窗口左出 if (isNew) { windowAnim = GUI_anim_class.RightInLeftOut; } else { windowAnim = GUI_anim_class.RightInRightOut; } }
// Use this for initialization void Awake() { _isNewWindow = true; if (!isDialogWindow) { //默认是左进左出 windowAnim = GUI_anim_class.RightInRightOut; //常规窗口有titlebar if (titleStyle == enum_titleStyle.DefaultTitle) { GameObject obj = Create3Dobj("UI/titleTweenGroupNew").obj; TweenerGroup = obj.GetComponent <UIPlayTween> (); obj.transform.parent = transform; obj.transform.localScale = Vector3.one; //语言包转换 titlelabel = obj.transform.FindChild("top/titleLabel").GetComponent <UILabel> (); iconSprite = obj.transform.FindChild("top/iconSprite").GetComponent <UISprite> (); titlelabel.text = LanguageConfigManager.Instance.coverText(windowTitle); obj.transform.FindChild("top/close").GetComponent <ButtonBase> ().fatherWindow = this; } else if (titleStyle == enum_titleStyle.NewTitle) { GameObject obj = Create3Dobj("UI/titleTweenGroupNew").obj; TweenerGroup = obj.GetComponent <UIPlayTween> (); obj.transform.parent = transform; obj.transform.localScale = Vector3.one; //语言包转换 titlelabel = obj.transform.FindChild("top/titleLabel").GetComponent <UILabel> (); iconSprite = obj.transform.FindChild("top/iconSprite").GetComponent <UISprite> (); titlelabel.text = LanguageConfigManager.Instance.coverText(windowTitle); obj.transform.FindChild("top/close").GetComponent <ButtonBase> ().fatherWindow = this; if (showHelpButon) { GameObject helpObj = obj.transform.FindChild("top/buttonHelp").gameObject; helpObj.SetActive(true); helpObj.GetComponent <ButtonBase>().fatherWindow = this; //obj.transform.FindChild("top/buttonHelp").GetComponent<ButtonBase>().fatherWindow = this; } } } prepareWindowForAnim(); OnAwake(); }