441 |
441 |
|
442 |
442 |
// ***************************************************************************
|
443 |
443 |
#define LUA_REGISTER_BASIC(_type_) \
|
444 |
|
yes_t is_user_defined(by_value<_type_>); \
|
445 |
|
_type_ convert_lua_to_cpp(lua_State* L, by_value<_type_>, int index) \
|
|
444 |
luabind::detail::yes_t is_user_defined(luabind::detail::by_value<_type_>); \
|
|
445 |
_type_ convert_lua_to_cpp(lua_State* L, luabind::detail::by_value<_type_>, int index) \
|
446 |
446 |
{ \
|
447 |
447 |
return (_type_)lua_tonumber(L, index); \
|
448 |
448 |
} \
|
449 |
|
int match_lua_to_cpp(lua_State* L, by_value<_type_>, int index) \
|
|
449 |
int match_lua_to_cpp(lua_State* L, luabind::detail::by_value<_type_>, int index) \
|
450 |
450 |
{ \
|
451 |
451 |
if (lua_isnumber(L, index)) return 0; else return -1; \
|
452 |
452 |
} \
|
... | ... | |
476 |
476 |
{
|
477 |
477 |
//H_AUTO(Lua_CLuaIHM_registerBasics)
|
478 |
478 |
using namespace luabind;
|
|
479 |
using namespace luabind::detail;
|
479 |
480 |
lua_State *L= ls.getStatePointer();
|
480 |
481 |
|
481 |
482 |
// RGBA
|
... | ... | |
1202 |
1203 |
} \
|
1203 |
1204 |
|
1204 |
1205 |
// ***************************************************************************
|
1205 |
|
#define LUABIND_FUNC(__func__) luabind::function(L, #__func__, &__func__);
|
|
1206 |
#define LUABIND_FUNC(__func__) luabind::def(#__func__, &__func__);
|
1206 |
1207 |
void CLuaIHM::registerIHM(CLuaState &ls)
|
1207 |
1208 |
{
|
1208 |
1209 |
//H_AUTO(Lua_CLuaIHM_registerIHM)
|
... | ... | |
1330 |
1331 |
LUABIND_FUNC(dumpCallStack);
|
1331 |
1332 |
LUABIND_FUNC(getDefine);
|
1332 |
1333 |
LUABIND_FUNC(setContextHelpText);
|
1333 |
|
luabind::function(L, "messageBox", (void(*)(const ucstring &)) &messageBox);
|
1334 |
|
luabind::function(L, "messageBox", (void(*)(const ucstring &, const std::string &)) &messageBox);
|
1335 |
|
luabind::function(L, "messageBox", (void(*)(const ucstring &, const std::string &, int caseMode)) &messageBox);
|
1336 |
|
luabind::function(L, "messageBox", (void(*)(const std::string &)) &messageBox);
|
1337 |
|
luabind::function(L, "messageBoxWithHelp", (void(*)(const ucstring &)) &messageBoxWithHelp);
|
1338 |
|
luabind::function(L, "messageBoxWithHelp", (void(*)(const ucstring &, const std::string &)) &messageBoxWithHelp);
|
1339 |
|
luabind::function(L, "messageBoxWithHelp", (void(*)(const ucstring &, const std::string &, int caseMode)) &messageBoxWithHelp);
|
1340 |
|
luabind::function(L, "messageBoxWithHelp", (void(*)(const std::string &)) &messageBoxWithHelp);
|
1341 |
|
luabind::function(L, "findReplaceAll", (std::string(*)(const std::string &, const std::string &, const std::string &)) &findReplaceAll);
|
1342 |
|
luabind::function(L, "findReplaceAll", (ucstring(*)(const ucstring &, const ucstring &, const ucstring &)) &findReplaceAll);
|
1343 |
|
luabind::function(L, "findReplaceAll", (ucstring(*)(const ucstring &, const std::string &, const std::string &)) &findReplaceAll);
|
1344 |
|
luabind::function(L, "findReplaceAll", (ucstring(*)(const ucstring &, const ucstring &, const std::string &)) &findReplaceAll);
|
1345 |
|
luabind::function(L, "findReplaceAll", (ucstring(*)(const ucstring &, const std::string &, const ucstring &)) &findReplaceAll);
|
|
1334 |
luabind::def( "messageBox", (void(*)(const ucstring &)) &messageBox);
|
|
1335 |
luabind::def( "messageBox", (void(*)(const ucstring &, const std::string &)) &messageBox);
|
|
1336 |
luabind::def( "messageBox", (void(*)(const ucstring &, const std::string &, int caseMode)) &messageBox);
|
|
1337 |
luabind::def( "messageBox", (void(*)(const std::string &)) &messageBox);
|
|
1338 |
luabind::def( "messageBoxWithHelp", (void(*)(const ucstring &)) &messageBoxWithHelp);
|
|
1339 |
luabind::def( "messageBoxWithHelp", (void(*)(const ucstring &, const std::string &)) &messageBoxWithHelp);
|
|
1340 |
luabind::def( "messageBoxWithHelp", (void(*)(const ucstring &, const std::string &, int caseMode)) &messageBoxWithHelp);
|
|
1341 |
luabind::def( "messageBoxWithHelp", (void(*)(const std::string &)) &messageBoxWithHelp);
|
|
1342 |
luabind::def( "findReplaceAll", (std::string(*)(const std::string &, const std::string &, const std::string &)) &findReplaceAll);
|
|
1343 |
luabind::def( "findReplaceAll", (ucstring(*)(const ucstring &, const ucstring &, const ucstring &)) &findReplaceAll);
|
|
1344 |
luabind::def( "findReplaceAll", (ucstring(*)(const ucstring &, const std::string &, const std::string &)) &findReplaceAll);
|
|
1345 |
luabind::def( "findReplaceAll", (ucstring(*)(const ucstring &, const ucstring &, const std::string &)) &findReplaceAll);
|
|
1346 |
luabind::def( "findReplaceAll", (ucstring(*)(const ucstring &, const std::string &, const ucstring &)) &findReplaceAll);
|
1346 |
1347 |
LUABIND_FUNC(getPlayerSelectedSlot)
|
1347 |
1348 |
LUABIND_FUNC(isInGame)
|
1348 |
1349 |
LUABIND_FUNC(pauseBGDownloader);
|
... | ... | |
1450 |
1451 |
#endif
|
1451 |
1452 |
}
|
1452 |
1453 |
};
|
1453 |
|
luabind::function(L, "fileLookup", CMiscFunctions::fileLookup);
|
1454 |
|
luabind::function(L, "shellExecute", CMiscFunctions::shellExecute);
|
|
1454 |
luabind::def( "fileLookup", CMiscFunctions::fileLookup);
|
|
1455 |
luabind::def( "shellExecute", CMiscFunctions::shellExecute);
|
1455 |
1456 |
#endif
|
1456 |
1457 |
}
|
1457 |
1458 |
|