Merge branch 'master' of gitlab.com:seichter/pixwerx
This commit is contained in:
commit
53b86a9608
11 changed files with 205 additions and 15 deletions
|
@ -11,6 +11,7 @@
|
|||
|
||||
namespace pw {
|
||||
|
||||
#if defined(__clang)
|
||||
struct window_lua : public window {
|
||||
// overridable function
|
||||
sol::function lua_update;
|
||||
|
@ -23,19 +24,21 @@ struct window_lua : public window {
|
|||
_on_update = [this](window&){this->lua_update();};
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
void script_system::load(sol::table &ns)
|
||||
{
|
||||
|
||||
|
||||
ns.new_usertype<window>("window",
|
||||
// sol::constructors<window_lua(sol::this_state)>(),
|
||||
// "on_update",&window_lua::lua_update,
|
||||
"update",&window::update,
|
||||
"title",sol::writeonly_property(&window::set_title),
|
||||
"size",sol::property(&window::size,&window::set_size),
|
||||
"position",sol::property(&window::position,&window::set_position),
|
||||
"fullscreen",sol::property(&window::fullscreen,&window::set_fullscreen)
|
||||
);
|
||||
"update",&window::update,
|
||||
"title",sol::writeonly_property(&window::set_title),
|
||||
"size",sol::property(&window::size,&window::set_size),
|
||||
"position",sol::property(&window::position,&window::set_position),
|
||||
"fullscreen",sol::property(&window::fullscreen,&window::set_fullscreen)
|
||||
);
|
||||
|
||||
|
||||
ns.new_usertype<input>("input",
|
||||
"new", sol::no_constructor,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue