summaryrefslogtreecommitdiffstats
path: root/src/mame/drivers/dgpix.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2018-03-13 07:36:43 +0100
committer Olivier Galibert <galibert@pobox.com>2018-03-14 14:07:14 +0100
commit115bb9936c5cd3faf955d7eb1e251a94e4744b7b (patch)
treef0230f547f6c750f9974c61479eef28cbe4ad571 /src/mame/drivers/dgpix.cpp
parentf155992daab88ad024cec995428a67108218b51d (diff)
Address maps macros removal, pass 1 [O. Galibert]
Diffstat (limited to 'src/mame/drivers/dgpix.cpp')
-rw-r--r--src/mame/drivers/dgpix.cpp38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/mame/drivers/dgpix.cpp b/src/mame/drivers/dgpix.cpp
index 5d204a01845..790684a7441 100644
--- a/src/mame/drivers/dgpix.cpp
+++ b/src/mame/drivers/dgpix.cpp
@@ -324,24 +324,26 @@ READ32_MEMBER(dgpix_state::vblank_r)
return m_vblank->read();
}
-ADDRESS_MAP_START(dgpix_state::cpu_map)
- AM_RANGE(0x00000000, 0x007fffff) AM_RAM
- AM_RANGE(0x40000000, 0x4003ffff) AM_READWRITE(vram_r, vram_w)
- AM_RANGE(0xe0000000, 0xe1ffffff) AM_READWRITE(flash_r, flash_w)
- AM_RANGE(0xe2000000, 0xe3ffffff) AM_READWRITE(flash_r, flash_w)
- AM_RANGE(0xffc00000, 0xffffffff) AM_ROM AM_REGION("flash", 0x1c00000) AM_SHARE("nvram")
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(dgpix_state::io_map)
- AM_RANGE(0x0200, 0x0203) AM_READNOP // used to sync with the protecion PIC? tested bits 0 and 1
- AM_RANGE(0x0400, 0x0403) AM_READWRITE(vblank_r, vbuffer_w)
- AM_RANGE(0x0a10, 0x0a13) AM_READ_PORT("INPUTS")
- AM_RANGE(0x0200, 0x0203) AM_WRITE(coin_w)
- AM_RANGE(0x0c00, 0x0c03) AM_WRITENOP // writes only: 1, 0, 1 at startup
- AM_RANGE(0x0c80, 0x0c83) AM_WRITENOP // sound commands / latches
- AM_RANGE(0x0c80, 0x0c83) AM_READNOP //read at startup -> cmp 0xFE
- AM_RANGE(0x0c84, 0x0c87) AM_READNOP // sound status, checks bit 0x40 and 0x80
-ADDRESS_MAP_END
+void dgpix_state::cpu_map(address_map &map)
+{
+ map(0x00000000, 0x007fffff).ram();
+ map(0x40000000, 0x4003ffff).rw(this, FUNC(dgpix_state::vram_r), FUNC(dgpix_state::vram_w));
+ map(0xe0000000, 0xe1ffffff).rw(this, FUNC(dgpix_state::flash_r), FUNC(dgpix_state::flash_w));
+ map(0xe2000000, 0xe3ffffff).rw(this, FUNC(dgpix_state::flash_r), FUNC(dgpix_state::flash_w));
+ map(0xffc00000, 0xffffffff).rom().region("flash", 0x1c00000).share("nvram");
+}
+
+void dgpix_state::io_map(address_map &map)
+{
+ map(0x0200, 0x0203).nopr(); // used to sync with the protecion PIC? tested bits 0 and 1
+ map(0x0400, 0x0403).rw(this, FUNC(dgpix_state::vblank_r), FUNC(dgpix_state::vbuffer_w));
+ map(0x0a10, 0x0a13).portr("INPUTS");
+ map(0x0200, 0x0203).w(this, FUNC(dgpix_state::coin_w));
+ map(0x0c00, 0x0c03).nopw(); // writes only: 1, 0, 1 at startup
+ map(0x0c80, 0x0c83).nopw(); // sound commands / latches
+ map(0x0c80, 0x0c83).nopr(); //read at startup -> cmp 0xFE
+ map(0x0c84, 0x0c87).nopr(); // sound status, checks bit 0x40 and 0x80
+}
static INPUT_PORTS_START( dgpix )
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456
// license:BSD-3-Clause
// copyright-holders:Miodrag Milanovic,Luca Bruno
/***************************************************************************

    luaengine_input.cpp

    Controls execution of the core MAME system.

***************************************************************************/

#include "emu.h"
#include "luaengine.ipp"

#include "iptseqpoll.h"

#include "inputdev.h"
#include "natkeyboard.h"
#include "render.h"
#include "uiinput.h"

#include <cstring>


namespace {

struct natkbd_kbd_dev
{
	natkbd_kbd_dev(natural_keyboard &m, std::size_t i) : manager(m), index(i) { }

	natural_keyboard &manager;
	std::size_t index;
};


struct natkbd_kbd_list
{
	natkbd_kbd_list(natural_keyboard &m) : manager(m) { }

	natural_keyboard &manager;
};

} // anonymous namespace


namespace sol {

template <> struct is_container<natkbd_kbd_list> : std::true_type { };


template <>
struct usertype_container<natkbd_kbd_list> : lua_engine::immutable_container_helper<natkbd_kbd_list>
{
private:
	template <bool Indexed>
	static int next_pairs(lua_State *L)
	{
		natkbd_kbd_dev &i(stack::unqualified_get<user<natkbd_kbd_dev> >(L, 1));
		if (i.manager.keyboard_count() <= i.index)
			return stack::push(L, lua_nil);
		int result;
		if constexpr (Indexed)
			result = stack::push(L, i.index + 1);
		else
			result = stack::push(L, i.manager.keyboard_device(i.index).tag());
		result += stack::push(L, i);
		++i.index;
		return result;
	}

	template <bool Indexed>
	static int start_pairs(lua_State *L)
	{
		natkbd_kbd_list &self(get_self(L));
		stack::push(L, next_pairs<Indexed>);
		stack::push<user<natkbd_kbd_dev> >(L, self.manager, 0);
		stack::push(L, lua_nil);
		return 3;
	}

public:
	static int at(lua_State *L)
	{
		natkbd_kbd_list &self(get_self(L));
		std::ptrdiff_t const index(stack::unqualified_get<std::ptrdiff_t>(L, 2));
		if ((0 < index) && (self.manager.keyboard_count() >= index))
			return stack::push(L, natkbd_kbd_dev(self.manager, index - 1));
		else
			return stack::push(L, lua_nil);
	}

	static int get(lua_State *L)
	{
		natkbd_kbd_list &self(get_self(L));
		char const *const tag(stack::unqualified_get<char const *>(L));
		for (std::size_t i = 0; self.manager.keyboard_count() > i; ++i)
		{
			if (!std::strcmp(self.manager.keyboard_device(i).tag(), tag))
				return stack::push(L, natkbd_kbd_dev(self.manager, i));
		}
		return stack::push(L, lua_nil);
	}

	static int index_get(lua_State *L)
	{
		return get(L);
	}

	static int size(lua_State *L)
	{
		natkbd_kbd_list &self(get_self(L));
		return stack::push(L, self.manager.keyboard_count());
	}

	static int empty(lua_State *L)
	{
		natkbd_kbd_list &self(get_self(L));
		return stack::push(L, !self.manager.keyboard_count());
	}

	static int next(lua_State *L) { return stack::push(L, next_pairs<false>); }
	static int pairs(lua_State *L) { return start_pairs<false>(L); }
	static int ipairs(lua_State *L) { return start_pairs<true>(L); }
};

} // namespace sol


//-------------------------------------------------
//  initialize_input - register input user types
//-------------------------------------------------

void lua_engine::initialize_input(sol::table &emu)
{

	static const enum_parser<input_seq_type, 3> s_seq_type_parser =
	{
		{ "standard", SEQ_TYPE_STANDARD },
		{ "increment", SEQ_TYPE_INCREMENT },
		{ "decrement", SEQ_TYPE_DECREMENT },
	};


	auto ioport_manager_type = sol().registry().new_usertype<ioport_manager>("ioport", sol::no_constructor);
	ioport_manager_type["count_players"] = &ioport_manager::count_players;
	ioport_manager_type["type_pressed"] = sol::overload(
			&ioport_manager::type_pressed,
			[] (ioport_manager &im, ioport_type type) { return im.type_pressed(type, 0); });
	ioport_manager_type["type_name"] = sol::overload(
			&ioport_manager::type_name,
			[] (ioport_manager &im, ioport_type type) { return im.type_name(type, 0); });
	ioport_manager_type["type_group"] = sol::overload(
			&ioport_manager::type_group,
			[] (ioport_manager &im, ioport_type type) { return im.type_group(type, 0); });
	ioport_manager_type["type_seq"] = sol::overload(
			[] (ioport_manager &im, ioport_type type, int player, char const *seq_type_string)
			{
				input_seq_type seq_type = s_seq_type_parser(seq_type_string);
				return im.type_seq(type, player, seq_type);
			},
			[] (ioport_manager &im, ioport_type type, int player) { return im.type_seq(type, player, SEQ_TYPE_STANDARD); },
			[] (ioport_manager &im, ioport_type type) { return im.type_seq(type, 0, SEQ_TYPE_STANDARD); });
	ioport_manager_type["token_to_input_type"] =
		[] (ioport_manager &im, std::string const &string)
		{
			int player;
			ioport_type const type = im.token_to_input_type(string.c_str(), player);
			return std::make_tuple(type, player);
		};
	ioport_manager_type["input_type_to_token"] = sol::overload(
			&ioport_manager::input_type_to_token,
			[] (ioport_manager &im, ioport_type type) { return im.input_type_to_token(type, 0); });
	ioport_manager_type["ports"] = sol::property([] (ioport_manager &im) { return tag_object_ptr_map<ioport_list>(im.ports()); });


	auto natkeyboard_type = sol().registry().new_usertype<natural_keyboard>("natkeyboard", sol::no_constructor);
	natkeyboard_type["post"] = [] (natural_keyboard &nat, std::string const &text) { nat.post_utf8(text); };
	natkeyboard_type["post_coded"] = [] (natural_keyboard &nat, std::string const &text) { nat.post_coded(text); };
	natkeyboard_type["paste"] = &natural_keyboard::paste;
	natkeyboard_type["dump"] = static_cast<std::string (natural_keyboard::*)() const>(&natural_keyboard::dump);
	natkeyboard_type["empty"] = sol::property(&natural_keyboard::empty);
	natkeyboard_type["full"] = sol::property(&natural_keyboard::full);
	natkeyboard_type["can_post"] = sol::property(&natural_keyboard::can_post);
	natkeyboard_type["is_posting"] = sol::property(&natural_keyboard::is_posting);
	natkeyboard_type["in_use"] = sol::property(&natural_keyboard::in_use, &natural_keyboard::set_in_use);
	natkeyboard_type["keyboards"] = sol::property([] (natural_keyboard &nat) { return natkbd_kbd_list(nat); });


	auto natkbddev_type = sol().registry().new_usertype<natkbd_kbd_dev>("natkeyboard_device", sol::no_constructor);
	natkbddev_type["device"] = sol::property([] (natkbd_kbd_dev const &kbd) -> device_t & { return kbd.manager.keyboard_device(kbd.index); });
	natkbddev_type["tag"] = sol::property([] (natkbd_kbd_dev const &kbd) { return kbd.manager.keyboard_device(kbd.index).tag(); });
	natkbddev_type["basetag"] = sol::property([] (natkbd_kbd_dev const &kbd) { return kbd.manager.keyboard_device(kbd.index).basetag(); });
	natkbddev_type["name"] = sol::property([] (natkbd_kbd_dev const &kbd) { return kbd.manager.keyboard_device(kbd.index).name(); });
	natkbddev_type["shortname"] = sol::property([] (natkbd_kbd_dev const &kbd) { return kbd.manager.keyboard_device(kbd.index).shortname(); });
	natkbddev_type["is_keypad"] = sol::property([] (natkbd_kbd_dev const &kbd) { return kbd.manager.keyboard_is_keypad(kbd.index); });
	natkbddev_type["enabled"] = sol::property(
			[] (natkbd_kbd_dev const &kbd) { return kbd.manager.keyboard_enabled(kbd.index); },
			[] (natkbd_kbd_dev &kbd, bool enable)
			{
				if (enable)
					kbd.manager.enable_keyboard(kbd.index);
				else
					kbd.manager.disable_keyboard(kbd.index);
			});


	auto ioport_port_type = sol().registry().new_usertype<ioport_port>("ioport_port", "new", sol::no_constructor);
	ioport_port_type["read"] = &ioport_port::read;
	ioport_port_type["write"] = &ioport_port::write;
	ioport_port_type["field"] = &ioport_port::field;
	ioport_port_type["device"] = sol::property(&ioport_port::device);
	ioport_port_type["tag"] = sol::property(&ioport_port::tag);
	ioport_port_type["active"] = sol::property(&ioport_port::active);
	ioport_port_type["live"] = sol::property(&ioport_port::live);
	ioport_port_type["fields"] = sol::property(
			[this] (ioport_port &p)
			{
				sol::table f_table = sol().create_table();
				// parse twice for custom and default names, default has priority
				for (ioport_field &field : p.fields())
				{
					if (field.type_class() != INPUT_CLASS_INTERNAL)
						f_table[field.name()] = &field;
				}
				for (ioport_field &field : p.fields())
				{
					if (field.type_class() != INPUT_CLASS_INTERNAL)
					{
						if (field.specific_name())
							f_table[field.specific_name()] = &field;
						else
							f_table[field.manager().type_name(field.type(), field.player())] = &field;
					}
				}
				return f_table;
			});


	auto ioport_field_type = sol().registry().new_usertype<ioport_field>("ioport_field", sol::no_constructor);
	ioport_field_type["set_value"] = &ioport_field::set_value;
	ioport_field_type["set_input_seq"] =
		[] (ioport_field &f, std::string const &seq_type_string, const input_seq &seq)
		{
			input_seq_type seq_type = s_seq_type_parser(seq_type_string);
			ioport_field::user_settings settings;
			f.get_user_settings(settings);
			settings.seq[seq_type] = seq;
			f.set_user_settings(settings);
		};
	ioport_field_type["input_seq"] =
		[] (ioport_field &f, std::string const &seq_type_string)
		{
			input_seq_type seq_type = s_seq_type_parser(seq_type_string);
			return f.seq(seq_type);
		};
	ioport_field_type["set_default_input_seq"] =
		[] (ioport_field &f, std::string const &seq_type_string, input_seq const &seq)
		{
			input_seq_type seq_type = s_seq_type_parser(seq_type_string);
			f.set_defseq(seq_type, seq);
		};
	ioport_field_type["default_input_seq"] =
		[] (ioport_field &f, const std::string &seq_type_string)
		{
			input_seq_type seq_type = s_seq_type_parser(seq_type_string);
			return f.defseq(seq_type);
		};
	ioport_field_type["keyboard_codes"] =
		[this] (ioport_field &f, int which)
		{
			sol::table result = sol().create_table();
			int index = 1;
			for (char32_t code : f.keyboard_codes(which))
				result[index++] = code;
			return result;
		};
	ioport_field_type["device"] = sol::property(&ioport_field::device);
	ioport_field_type["port"] = sol::property(&ioport_field::port);
	ioport_field_type["live"] = sol::property(&ioport_field::live);
	ioport_field_type["type"] = sol::property(&ioport_field::type);
	ioport_field_type["name"] = sol::property(&ioport_field::name);
	ioport_field_type["default_name"] = sol::property(
			[] (ioport_field &f)
			{
				return f.specific_name() ? f.specific_name() : f.manager().type_name(f.type(), f.player());
			});
	ioport_field_type["player"] = sol::property(&ioport_field::player, &ioport_field::set_player);
	ioport_field_type["mask"] = sol::property(&ioport_field::mask);
	ioport_field_type["defvalue"] = sol::property(&ioport_field::defvalue);
	ioport_field_type["sensitivity"] = sol::property(&ioport_field::sensitivity);
	ioport_field_type["way"] = sol::property(&ioport_field::way);
	ioport_field_type["type_class"] = sol::property(
			[] (ioport_field &f)
			{
				switch (f.type_class())
				{
				case INPUT_CLASS_KEYBOARD:      return "keyboard";
				case INPUT_CLASS_CONTROLLER:    return "controller";
				case INPUT_CLASS_CONFIG:        return "config";
				case INPUT_CLASS_DIPSWITCH:     return "dipswitch";
				case INPUT_CLASS_MISC:          return "misc";
				default:                        break;
				}
				throw false;
			});
	ioport_field_type["is_analog"] = sol::property(&ioport_field::is_analog);
	ioport_field_type["is_digital_joystick"] = sol::property(&ioport_field::is_digital_joystick);
	ioport_field_type["enabled"] = sol::property(&ioport_field::enabled);
	ioport_field_type["optional"] = sol::property(&ioport_field::optional);
	ioport_field_type["cocktail"] = sol::property(&ioport_field::cocktail);
	ioport_field_type["toggle"] = sol::property(&ioport_field::toggle);
	ioport_field_type["rotated"] = sol::property(&ioport_field::rotated);
	ioport_field_type["analog_reverse"] = sol::property(&ioport_field::analog_reverse);
	ioport_field_type["analog_reset"] = sol::property(&ioport_field::analog_reset);
	ioport_field_type["analog_wraps"] = sol::property(&ioport_field::analog_wraps);
	ioport_field_type["analog_invert"] = sol::property(&ioport_field::analog_invert);
	ioport_field_type["impulse"] = sol::property(&ioport_field::impulse);
	ioport_field_type["crosshair_scale"] = sol::property(&ioport_field::crosshair_scale, &ioport_field::set_crosshair_scale);
	ioport_field_type["crosshair_offset"] = sol::property(&ioport_field::crosshair_offset, &ioport_field::set_crosshair_offset);
	ioport_field_type["user_value"] = sol::property(
			[] (ioport_field &f)
			{
				ioport_field::user_settings settings;
				f.get_user_settings(settings);
				return settings.value;
			},
			[] (ioport_field &f, ioport_value val)
			{
				ioport_field::user_settings settings;
				f.get_user_settings(settings);
				settings.value = val;
				f.set_user_settings(settings);
			});
	ioport_field_type["settings"] = sol::property(
			[this] (ioport_field &f)
			{
				sol::table result = sol().create_table();
				for (ioport_setting const &setting : f.settings())
					if (setting.enabled())
						result[setting.value()] = setting.name();
				return result;
			});


	auto ioport_field_live_type = sol().registry().new_usertype<ioport_field_live>("ioport_field_live", sol::no_constructor);
	ioport_field_live_type["name"] = &ioport_field_live::name;


	auto input_type = sol().registry().new_usertype<input_manager>("input", sol::no_constructor);
	input_type["code_value"] = &input_manager::code_value;
	input_type["code_pressed"] = &input_manager::code_pressed;
	input_type["code_pressed_once"] = &input_manager::code_pressed_once;
	input_type["code_name"] = &input_manager::code_name;
	input_type["code_to_token"] = &input_manager::code_to_token;
	input_type["code_from_token"] = &input_manager::code_from_token;
	input_type["seq_pressed"] = &input_manager::seq_pressed;
	input_type["seq_clean"] = &input_manager::seq_clean;
	input_type["seq_name"] = &input_manager::seq_name;
	input_type["seq_to_tokens"] = &input_manager::seq_to_tokens;
	input_type["seq_from_tokens"] =
		[] (input_manager &input, std::string_view tokens)
		{
			input_seq seq;
			input.seq_from_tokens(seq, tokens);
			return seq;
		};
	input_type["axis_code_poller"] = [] (input_manager &input) { return std::unique_ptr<input_code_poller>(new axis_code_poller(input)); };
	input_type["switch_code_poller"] = [] (input_manager &input) { return std::unique_ptr<input_code_poller>(new switch_code_poller(input)); };
	input_type["keyboard_code_poller"] = [] (input_manager &input) { return std::unique_ptr<input_code_poller>(new keyboard_code_poller(input)); };
	input_type["axis_sequence_poller"] = [] (input_manager &input) { return std::unique_ptr<input_sequence_poller>(new axis_sequence_poller(input)); };
	input_type["switch_sequence_poller"] = [] (input_manager &input) { return std::unique_ptr<input_sequence_poller>(new switch_sequence_poller(input)); };
	input_type["device_classes"] = sol::property(
			[this] (input_manager &input)
			{
				sol::table result = sol().create_table();
				for (input_device_class devclass_id = DEVICE_CLASS_FIRST_VALID; devclass_id <= DEVICE_CLASS_LAST_VALID; devclass_id++)
				{
					input_class &devclass = input.device_class(devclass_id);
					result[devclass.name()] = &devclass;
				}
				return result;
			});


	auto codepoll_type = sol().registry().new_usertype<input_code_poller>("input_code_poller", sol::no_constructor);
	codepoll_type["reset"] = &input_code_poller::reset;
	codepoll_type["poll"] = &input_code_poller::poll;


	auto seqpoll_type = sol().registry().new_usertype<input_sequence_poller>("input_seq_poller", sol::no_constructor);
	seqpoll_type["start"] = sol::overload(
			[] (input_sequence_poller &poller) { return poller.start(); },
			[] (input_sequence_poller &poller, input_seq const &seq) { return poller.start(seq); });
	seqpoll_type["poll"] = &input_sequence_poller::poll;
	seqpoll_type["sequence"] = sol::property(&input_sequence_poller::sequence);
	seqpoll_type["valid"] = sol::property(&input_sequence_poller::valid);
	seqpoll_type["modified"] = sol::property(&input_sequence_poller::modified);


	auto input_class_type = sol().registry().new_usertype<input_class>("input_class", sol::no_constructor);
	input_class_type["name"] = sol::property(&input_class::name);
	input_class_type["enabled"] = sol::property(&input_class::enabled);
	input_class_type["multi"] = sol::property(&input_class::multi);
	input_class_type["devices"] = sol::property(
			[this] (input_class &devclass)
			{
				sol::table result = sol().create_table();
				int index = 1;
				for (int devindex = 0; devindex <= devclass.maxindex(); devindex++)
				{
					input_device *const dev = devclass.device(devindex);
					if (dev)
						result[index++] = dev;
				}
				return result;
			});


	auto input_device_type = sol().registry().new_usertype<input_device>("input_device", sol::no_constructor);
	input_device_type["name"] = sol::property(&input_device::name);
	input_device_type["id"] = sol::property(&input_device::id);
	input_device_type["devindex"] = sol::property(&input_device::devindex);
	input_device_type["items"] = sol::property(
			[this] (input_device &dev)
			{
				sol::table result = sol().create_table();
				for (input_item_id id = ITEM_ID_FIRST_VALID; id < dev.maxitem(); id++)
				{
					input_device_item *item = dev.item(id);
					if (item)
						result[id] = dev.item(id);
				}
				return result;
			});


	auto input_device_item_type = sol().registry().new_usertype<input_device_item>("input_device_item", sol::no_constructor);
	input_device_item_type["name"] = sol::property(&input_device_item::name);
	input_device_item_type["code"] = sol::property(&input_device_item::code);
	input_device_item_type["token"] = sol::property(&input_device_item::token);
	input_device_item_type["current"] = sol::property(&input_device_item::current);


	auto uiinput_type = sol().registry().new_usertype<ui_input_manager>("uiinput", sol::no_constructor);
	uiinput_type["find_mouse"] =
		[] (ui_input_manager &ui)
		{
			int32_t x, y;
			bool button;
			render_target *rt = ui.find_mouse(&x, &y, &button);
			return std::make_tuple(x, y, button, rt);
		};
	uiinput_type["pressed"] = &ui_input_manager::pressed;
	uiinput_type["pressed_repeat"] = &ui_input_manager::pressed_repeat;
	uiinput_type["presses_enabled"] = sol::property(&ui_input_manager::presses_enabled, &ui_input_manager::set_presses_enabled);

}