Exemplo n.º 1
0
            public jxE FindByAttr(string attribute_name, string value, out jxA a)
            {
                a = AttrVar(attribute_name);
                if (a != null)
                {
                    if (value == null)
                    {
                        return(this);
                    }

                    if (a.IsEType(EDataType.e_string))
                    {
                        if (a.Get_string() == value)
                        {
                            return(this);
                        }
                    }
                }
                for (jxE e = m_Child; e != null; e = e.m_Next)
                {
                    jxE eFind = e.FindByAttr(attribute_name, value, out a);
                    if (eFind != null)
                    {
                        return(eFind);
                    }
                }
                return(null);
            }
Exemplo n.º 2
0
            public Rect GetGuiRect(jxE g)
            {
                jxV vRect = g.AttrVar("Rect");

                if (vRect == null)
                {
                    vRect = g.AttrVar("Name");
                }
                if (vRect == null)
                {
                    //jDebug.jWARN(" attribute not found Rect : " + g.GetTagName());
                    return(new Rect(0, 0, 0, 0));
                }

                if (vRect.GetEType() == nXML.EDataType.e_Rect)
                {
                    return(vRect.GetRect());
                }

                if (vRect.GetEType() != nXML.EDataType.e_string)
                {
                    throw new System.Exception("xml : vRect.GetEType() != nXML.EDataType.e_string : " + m_Doc.m_name);
                }

                jxE eRect = m_eNamedRect.Find(vRect.Get_string());

                if (eRect == null)
                {
                    throw new System.Exception(m_Doc.m_name + "  eRect==null");
                }

                return(eRect.GetRect());
            }
Exemplo n.º 3
0
            public override bool OnGUI()
            {
                if (base.OnGUI() == false)
                {
                    return(false);
                }

                Begin_GUIStyle();
                if (m_isLayouted)
                {
                    m_Text = GUILayout.PasswordField(GetText(), m_vMask.Get_string()[0], m_vMaxLength.Get_int(), Get_GUILayoutOption());
                }
                else
                {
                    m_Text = GUI.PasswordField(GetRect(), GetText(), m_vMask.Get_string()[0], m_vMaxLength.Get_int());
                }
                End_GUIStyle();
                return(true);
            }
Exemplo n.º 4
0
            public string AttrOverride(string attribute_name)
            {
                jxA v = AttrVarOverride(attribute_name);

                if (v == null)
                {
                    return(null);
                }
                if (!v.IsEType(nXML.EDataType.e_string))
                {
                    string sError = m_jxE.GetTagName() + "'s attribute<" + attribute_name + "> is not e_string : " + v.GetEType().ToString();
                    throw new System.Exception(sError);
                }
                return(v.Get_string());
            }