1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 12:32:36 +00:00
OpenMW/apps/openmw/mwlua/uibindings.cpp

19 lines
422 B
C++
Raw Normal View History

2021-01-29 01:54:54 +01:00
#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);
}
}