Ejemplo n.º 1
0
        private static void CreateUIScrollText()
        {
            UIScrollText listView = CreateUIListView <UIScrollText>();

            if (listView == null)
            {
                return;
            }

            UIText text = CreateUIText();

            if (text == null)
            {
                return;
            }

            listView.AddItem(text);

            text.text = "fasd fsadfdf dfdfsd";

            var layoutElement = text.gameObject.AddComponent <LayoutElement>();

            layoutElement.preferredHeight = text.rectTransform.GetHeight();

            text.OnTextChanged += (UIText t) =>
            {
                layoutElement.preferredHeight = text.rectTransform.GetHeight();
            };
        }
Ejemplo n.º 2
0
    public void ClearEx(string pad)
    {
        UIScrollText txtPanel = Name2Pad(pad);

        if (!txtPanel)
        {
            return;
        }
        txtPanel.Clear();
    }
Ejemplo n.º 3
0
    public void AddTextEx(string pad, string text)
    {
        UIScrollText txtPanel = Name2Pad(pad);

        if (!txtPanel)
        {
            return;
        }
        txtPanel.AppendText(text);
    }
Ejemplo n.º 4
0
        static int _s_set_scrollbar(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UIScrollText __cl_gen_to_be_invoked = (UIScrollText)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.scrollbar = (UnityEngine.UI.Scrollbar)translator.GetObject(L, 2, typeof(UnityEngine.UI.Scrollbar));
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
Ejemplo n.º 5
0
        static int _g_get_scrollbar(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UIScrollText __cl_gen_to_be_invoked = (UIScrollText)translator.FastGetCSObj(L, 1);
                translator.Push(L, __cl_gen_to_be_invoked.scrollbar);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
Ejemplo n.º 6
0
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    UIScrollText __cl_gen_ret = new UIScrollText();
                    translator.Push(L, __cl_gen_ret);
                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to UIScrollText constructor!"));
        }
Ejemplo n.º 7
0
        static int _m_Clear(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UIScrollText __cl_gen_to_be_invoked = (UIScrollText)translator.FastGetCSObj(L, 1);


            try {
                {
                    __cl_gen_to_be_invoked.Clear(  );



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Ejemplo n.º 8
0
        static int _m_onUpdate(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UIScrollText __cl_gen_to_be_invoked = (UIScrollText)translator.FastGetCSObj(L, 1);


            try {
                {
                    object param = translator.GetObject(L, 2, typeof(object));

                    __cl_gen_to_be_invoked.onUpdate(param);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Ejemplo n.º 9
0
        static int _m_onUpdateTween(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UIScrollText __cl_gen_to_be_invoked = (UIScrollText)translator.FastGetCSObj(L, 1);


            try {
                {
                    float value = (float)LuaAPI.lua_tonumber(L, 2);

                    __cl_gen_to_be_invoked.onUpdateTween(value);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }