MatchSymbol() приватный Метод

Retrieve the symbol at the beginning of the specified sequence, if a match is found.
private MatchSymbol ( string text, int offset, int textLength ) : BMSymbol,
text string
offset int
textLength int
Результат BMSymbol,
Пример #1
0
 static int MatchSymbol(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         UIFont   obj  = (UIFont)ToLua.CheckObject <UIFont>(L, 1);
         string   arg0 = ToLua.CheckString(L, 2);
         int      arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
         int      arg2 = (int)LuaDLL.luaL_checknumber(L, 4);
         BMSymbol o    = obj.MatchSymbol(arg0, arg1, arg2);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Пример #2
0
 static public int MatchSymbol(IntPtr l)
 {
     try {
         UIFont        self = (UIFont)checkSelf(l);
         System.String a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         System.Int32 a3;
         checkType(l, 4, out a3);
         var ret = self.MatchSymbol(a1, a2, a3);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #3
0
    public static int MatchSymbol(IntPtr l)
    {
        int result;

        try
        {
            UIFont uIFont = (UIFont)LuaObject.checkSelf(l);
            string text;
            LuaObject.checkType(l, 2, out text);
            int offset;
            LuaObject.checkType(l, 3, out offset);
            int textLength;
            LuaObject.checkType(l, 4, out textLength);
            BMSymbol o = uIFont.MatchSymbol(text, offset, textLength);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Пример #4
0
 static public BMSymbol GetSymbol(string text, int index, int textLength)
 {
     return((bitmapFont != null) ? bitmapFont.MatchSymbol(text, index, textLength) : null);
 }