1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-02-02 01:48:27 +00:00
openmw/apps/openmw/mwlua/uibindings.cpp
2021-07-09 20:24:56 +02:00

18 lines
422 B
C++

#include "luabindings.hpp"
#include "luamanagerimp.hpp"
namespace MWLua
{
sol::table initUserInterfacePackage(const Context& context)
{
sol::table api(context.mLua->sol(), sol::create);
api["showMessage"] = [luaManager=context.mLuaManager](std::string_view message)
{
luaManager->addUIMessage(message);
};
return context.mLua->makeReadOnly(api);
}
}