Beispiel #1
0
    /// <summary>
    /// 显示提示信息窗口
    /// </summary>
    /// <param name="text">要显示的文本</param>
    /// <param name="duration">自动消失时间间隔</param>
    public static void ShowTipWnd(string text, float duration = 1.0f, int iDep = 0)
    {
        UnityEngine.Debug.Log("xxxxxxxx");
        FreeSizeTipWnd t = WndManager.GetDialog <FreeSizeTipWnd>();

        if (iDep != 0)
        {
            t.iDep = iDep;
        }
        else
        {
            t.iDep = ConstantData.iDepBefore3DModel;
        }
        //t.gameObject.transform.localPosition = U3DUtil.SetZ(t.gameObject.transform.localPosition, TopMostDepthZ);
        t.ShowDuration = duration;
        NGUIUtil.SetLableText(t.MyHead.LblTitle, text);
    }
Beispiel #2
0
    /// <summary>
    /// 显示提示信息窗口
    /// </summary>
    /// <param name="text">要显示的文本对应的KeyCode</param>
    /// <param name="duration">自动消失时间间隔</param>
    public static void ShowTipWndByKey <T>(T skey, float duration = 1.0f, int iDep = 0)
    {
        UnityEngine.Debug.Log("xxxxxxxx");
        if (!Localization.Exists(skey.ToString()))
        {
            NGUIUtil.DebugLog(skey.ToString() + "使用不存在的keyCode!");
            return;
        }

        FreeSizeTipWnd t = WndManager.GetDialog <FreeSizeTipWnd>();

        if (iDep != 0)
        {
            t.iDep = iDep;
        }
        t.ShowDuration = duration;
        // t.gameObject.transform.localPosition =U3DUtil.SetZ(t.gameObject.transform.localPosition, TopMostDepthZ);//保证窗口置顶
        string text = Localization.Get(skey.ToString());

        NGUIUtil.SetLableText(t.MyHead.LblTitle, text);
    }