Beispiel #1
0
            public override void Load(jGuiStage stage, jGuiWindow win, jGuiControl parent, jxE g, jxE overrideAttribute)
            {
                base.Load(stage, win, parent, g, overrideAttribute);

                jxV v = g.AttrVar("MaxLength");

                if (v != null)
                {
                    m_iMaxLength = v.Get_int();
                }

                if (m_Text == null)
                {
                    throw new System.Exception(g.GetTagName() + "' Text is not found ");
                }

                v = g.AttrVar("ReadOnly");
                if (v != null)
                {
                    m_bReadOnly = v.Get_bool();
                }
            }
Beispiel #2
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);
            }
Beispiel #3
0
            public override bool OnGUI()
            {
                if (base.OnGUI() == false)
                {
                    return(false);
                }

                Begin_GUIStyle();
                int saveIndex = m_iCurrGrid;

                if (m_isLayouted)
                {
                    m_iCurrGrid = GUILayout.SelectionGrid(m_iCurrGrid, m_listGridString, m_vColumn.Get_int(), Get_GUILayoutOption());
                }
                else
                {
                    m_iCurrGrid = GUI.SelectionGrid(GetRect(), m_iCurrGrid, m_listGridString, m_vColumn.Get_int());
                }
                End_GUIStyle();

                if (saveIndex != m_iCurrGrid && HasName())
                {
                    m_jGuiStage.CallEventHandler(this);
                }

                return(true);
            }