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(); }; }
public void ClearEx(string pad) { UIScrollText txtPanel = Name2Pad(pad); if (!txtPanel) { return; } txtPanel.Clear(); }
public void AddTextEx(string pad, string text) { UIScrollText txtPanel = Name2Pad(pad); if (!txtPanel) { return; } txtPanel.AppendText(text); }
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); }
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); }
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!")); }
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)); } }
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)); } }
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)); } }