I18NWrap.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class I18NWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(I18N), typeof(System.Object));
  9. L.RegFunction("T", T);
  10. L.RegFunction("SetLanguageValue", SetLanguageValue);
  11. L.RegFunction("New", _CreateI18N);
  12. L.RegFunction("__tostring", ToLua.op_ToString);
  13. L.EndClass();
  14. }
  15. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  16. static int _CreateI18N(IntPtr L)
  17. {
  18. try
  19. {
  20. int count = LuaDLL.lua_gettop(L);
  21. if (count == 0)
  22. {
  23. I18N obj = new I18N();
  24. ToLua.PushObject(L, obj);
  25. return 1;
  26. }
  27. else
  28. {
  29. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: I18N.New");
  30. }
  31. }
  32. catch (Exception e)
  33. {
  34. return LuaDLL.toluaL_exception(L, e);
  35. }
  36. }
  37. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  38. static int T(IntPtr L)
  39. {
  40. try
  41. {
  42. ToLua.CheckArgsCount(L, 1);
  43. string arg0 = ToLua.CheckString(L, 1);
  44. string o = I18N.T(arg0);
  45. LuaDLL.lua_pushstring(L, o);
  46. return 1;
  47. }
  48. catch (Exception e)
  49. {
  50. return LuaDLL.toluaL_exception(L, e);
  51. }
  52. }
  53. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  54. static int SetLanguageValue(IntPtr L)
  55. {
  56. try
  57. {
  58. int count = LuaDLL.lua_gettop(L);
  59. string arg0 = ToLua.CheckString(L, 1);
  60. string[] arg1 = ToLua.CheckParamsString(L, 2, count - 1);
  61. string o = I18N.SetLanguageValue(arg0, arg1);
  62. LuaDLL.lua_pushstring(L, o);
  63. return 1;
  64. }
  65. catch (Exception e)
  66. {
  67. return LuaDLL.toluaL_exception(L, e);
  68. }
  69. }
  70. }