Exemple #1
0
    public static int ShowInAppWeb(IntPtr L)
    {
        int       count = LuaDLL.lua_gettop(L);
        const int nRet  = 0;

        if (count == 1 && LuaScriptMgr.CheckTypes(L, 1, typeof(string)))
        {
            string url = LuaScriptMgr.GetString(L, 1);
            PlatformControl.ShowInAppWeb(url);
        }
        else if (count == 2 && LuaScriptMgr.CheckTypes(L, 1, typeof(LuaFunction)))
        {
            string url      = LuaScriptMgr.GetString(L, 1);
            var    callback = LuaScriptMgr.GetLuaFunction(L, 2);
            PlatformControl.ShowInAppWeb(url, callback);
        }
        else
        {
            LogParamError("ShowInAppWeb", count);
        }
        return(GameUtilWrap.CheckReturnNum(L, count, nRet));
    }