コード例 #1
0
 protected void set_text(string s)
 {
     if (m_latest_rt == null)
     {
         throw new SystemException("Unexpected! {F8CC1FAE-9834-4556-A026-1CE44B4ABBFB}");
     }
     UGuiUtil.SetText(m_latest_rt, s);
 }
コード例 #2
0
 protected void set_text_clr()
 {
     if (m_latest_rt == null)
     {
         throw new SystemException("Unexpected! {B4631292-B2B1-494B-A498-B884AB8F706D}");
     }
     UGuiUtil.SetText(m_latest_rt, "");
 }
コード例 #3
0
 protected void set_anchor(string a)
 {
     if (m_latest_rt == null)
     {
         throw new SystemException("Unexpected! {C1BAF5D5-5453-41C9-80D5-333D7F7FCD4A}");
     }
     UGuiUtil.SetAnchor(m_latest_rt, a);
 }
コード例 #4
0
 protected void set_pivot(string a)
 {
     if (m_latest_rt == null)
     {
         throw new SystemException("Unexpected! {FA1BA1D2-CACD-47B6-ABEF-1C227C53E956}");
     }
     UGuiUtil.SetPivot(m_latest_rt, a);
 }
コード例 #5
0
 protected void set_size(float w, float h)
 {
     if (m_latest_rt == null)
     {
         throw new SystemException("Unexpected! {27138646-8AC1-491B-9F0F-63EA9DC8AEEA}");
     }
     UGuiUtil.SetSize(m_latest_rt, w, h);
 }
コード例 #6
0
 protected void set_pos(float x, float y)
 {
     if (m_latest_rt == null)
     {
         throw new SystemException("Unexpected! {B33DAE1A-FAA5-41EF-B45C-FEC61B0EA1DB}");
     }
     UGuiUtil.SetPos(m_latest_rt, x, y);
 }
コード例 #7
0
    protected void set_sprite(string s)
    {
        if (m_latest_rt == null)
        {
            throw new SystemException("Unexpected! {975567DB-3E02-4E63-AF66-49C07F7228D2}");
        }
        var sprite = UISpriteManager.V.GetSprite(s);

        if (sprite != null)
        {
            UGuiUtil.SetSprite(m_latest_rt, sprite);
        }
    }
コード例 #8
0
    void create(string parts, string reff)
    {
        var clone = UGuiUtil.FindAndClone(m_templates, reff, m_parent);

        if (clone != null)
        {
            clone.name  = parts;
            m_latest    = clone;
            m_latest_rt = m_latest.GetComponent <RectTransform>();
        }
        else
        {
            throw new SystemException("Unexpected! {E8337688-F0C2-4506-9DE0-2CD12C0698B9}");
        }
    }
コード例 #9
0
    public void SetError(string msg)
    {
        if (m_canvas.transform.childCount == 0)
        {
            var panel = UGuiUtil.FindAndClone(m_template.transform, "Panel", m_canvas);
            panel.name = errorpanelname;
            UGuiUtil.SetPivot(panel, UIANCHORPOS.MC);
            UGuiUtil.SetAnchor(panel, UIANCHORPOS.MC);
            UGuiUtil.SetSize(panel, ScreenDef.reference_width, ScreenDef.reference_height_fix);
            UGuiUtil.SetPos(panel, 0, 0);
        }

        var clone = (GameObject)GameObject.Instantiate(m_errorDlgUI);

        clone.transform.SetParent(m_canvas.transform);

        UGuiUtil.SetPos(clone, 0, 0);
        UGuiUtil.SetText(clone, msg, "Text");

        //clone.transform.localPosition = VectorUtil.Affect_Z(clone.transform.localPosition,0);
    }