public override void OnInspectorGUI() { UIArtFont cur = this.target as UIArtFont; EditorGUI.BeginChangeCheck(); cur.m_prefix = EditorGUILayout.TextField("前缀", cur.m_prefix); cur.m_num = EditorGUILayout.TextField("数字", cur.m_num); cur.m_align = (UIArtFont.enAlign)EditorGUILayout.EnumPopup("对齐", cur.m_align); cur.m_space = EditorGUILayout.FloatField("间隔", cur.m_space); if (EditorGUI.EndChangeCheck()) { cur.SetNum(cur.m_num, true); } }
static int SetNum(IntPtr L) { try { ToLua.CheckArgsCount(L, 3); UI.UIArtFont obj = (UI.UIArtFont)ToLua.CheckObject(L, 1, typeof(UI.UIArtFont)); string arg0 = ToLua.CheckString(L, 2); bool arg1 = LuaDLL.luaL_checkboolean(L, 3); obj.SetNum(arg0, arg1); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int set_m_align(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UI.UIArtFont obj = (UI.UIArtFont)o; UI.UIArtFont.enAlign arg0 = (UI.UIArtFont.enAlign)ToLua.CheckObject(L, 2, typeof(UI.UIArtFont.enAlign)); obj.m_align = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_align on a nil value" : e.Message)); } }
static int set_m_space(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UI.UIArtFont obj = (UI.UIArtFont)o; float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.m_space = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_space on a nil value" : e.Message)); } }
static int set_m_num(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UI.UIArtFont obj = (UI.UIArtFont)o; string arg0 = ToLua.CheckString(L, 2); obj.m_num = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_num on a nil value" : e.Message)); } }
static int get_m_align(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UI.UIArtFont obj = (UI.UIArtFont)o; UI.UIArtFont.enAlign ret = obj.m_align; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_align on a nil value" : e.Message)); } }
static int get_m_space(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UI.UIArtFont obj = (UI.UIArtFont)o; float ret = obj.m_space; LuaDLL.lua_pushnumber(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_space on a nil value" : e.Message)); } }
static int get_m_prefix(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); UI.UIArtFont obj = (UI.UIArtFont)o; string ret = obj.m_prefix; LuaDLL.lua_pushstring(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_prefix on a nil value" : e.Message)); } }