final commit for today - still searching to get the mouse_button

This commit is contained in:
Hartmut Seichter 2019-01-09 19:58:03 +01:00
parent f840d51f4f
commit fdf7714d11
6 changed files with 55 additions and 16 deletions

View file

@ -3,7 +3,6 @@
#include "pw/system/window.hpp"
#include "pw/system/input.hpp"
namespace pw {
void script_system::load(sol::table &ns)
@ -11,14 +10,16 @@ void script_system::load(sol::table &ns)
ns.new_usertype<window>("window",
"update",&window::update,
"title",sol::writeonly_property(&window::set_title),
"size",sol::property(&window::size,&window::set_size)
"size",sol::property(&window::size,&window::set_size),
"position",sol::property(&window::position,&window::set_position)
);
ns.new_usertype<input>("input",
"new", sol::no_constructor,
"get",&input::get
"get",&input::get,
"mouse_position",sol::readonly_property(&input::mouse_position),
"mouse_button",sol::readonly_property(&input::mouse_button)
);
}
}