wiggling around with the whole notion of what a renderer does and what not. Added simple wrapper for GLFWmonitor named display

This commit is contained in:
Hartmut Seichter 2019-01-13 22:14:41 +01:00
parent 3cc0fde1e1
commit 9773103a18
13 changed files with 252 additions and 148 deletions

View file

@ -2,6 +2,7 @@
#include "pw/system/window.hpp"
#include "pw/system/input.hpp"
#include "pw/system/display.hpp"
namespace pw {
@ -11,8 +12,8 @@ void script_system::load(sol::table &ns)
"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)
"position",sol::property(&window::position,&window::set_position),
"fullscreen",sol::property(&window::fullscreen,&window::set_fullscreen)
);
ns.new_usertype<input>("input",
@ -20,9 +21,14 @@ void script_system::load(sol::table &ns)
"get",&input::get,
"mouse_position",sol::readonly_property(&input::mouse_position),
"mouse_button",sol::readonly_property(&input::mouse_button),
"mouse_pressed",sol::readonly_property(&input::mouse_pressed),
"mouse_pressed",sol::readonly_property(&input::mouse_pressed),
"input_string",sol::readonly_property(&input::input_string)
);
ns.new_usertype<display>("display",
"all",&display::all,
"name",sol::readonly_property(&display::name)
);
}
}