GetEndOfLineThatFits() static public method

Get the end of line that would fit into a field of given width.
static public GetEndOfLineThatFits ( string text ) : string
text string
return string
    static int GetEndOfLineThatFits(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        string arg0 = LuaScriptMgr.GetLuaString(L, 1);
        string o    = NGUIText.GetEndOfLineThatFits(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Example #2
0
 static public int GetEndOfLineThatFits_s(IntPtr l)
 {
     try {
         System.String a1;
         checkType(l, 1, out a1);
         var ret = NGUIText.GetEndOfLineThatFits(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #3
0
 static int GetEndOfLineThatFits(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         string arg0 = ToLua.CheckString(L, 1);
         string o    = NGUIText.GetEndOfLineThatFits(arg0);
         LuaDLL.lua_pushstring(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #4
0
    private static int GetEndOfLineThatFits(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 1);
            string text = ToLua.CheckString(L, 1);
            string endOfLineThatFits = NGUIText.GetEndOfLineThatFits(text);
            LuaDLL.lua_pushstring(L, endOfLineThatFits);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }