.. autogenerated ************* gamelib.input ************* module 'gamelib.input' *Source file: prog/tools/dargbox/gamelib/input.cpp* Usage:: let { get_button_state, get_mouse_pos, get_joystick_axis } = require("gamelib.input") or:: from "gamelib.input" import * .. code-block:: sq //'gamelib.input' exports: { function get_button_state(arg0): integer_or_float or string -> _undocumented_ function get_mouse_pos() function get_joystick_axis(arg0): integer_or_float -> _undocumented_ } .. sq:function:: function get_button_state(arg0) :param arg0: autodoc from typemask/paramscheck :type arg0: integer_or_float or string ``nparamscheck:2`` ``typecheck mask: any_type, integer_or_float or string`` .. sq:function:: function get_mouse_pos() .. sq:function:: function get_joystick_axis(arg0) :param arg0: autodoc from typemask/paramscheck :type arg0: integer_or_float ``nparamscheck:2`` ``typecheck mask: any_type, integer_or_float`` /; dag::ConstSpan::Entry> buttonsRawSlice = btn_name_map.getMapRaw(); Sqrat::Table buttonNames(vm); Sqrat::Table buttonIds(vm); for (auto &e : buttonsRawSlice) { buttonIds.SetValue(e.name, e.id); buttonNames.SetValue(e.id, e.name); } buttonIds.FreezeSelf(); buttonNames.FreezeSelf(); exports.SetValue("buttonIds", buttonIds); exports.SetValue("buttonNames", buttonNames); module_mgr->addNativeModule("gamelib.input", exports); } } // namespace input } // namespace gamelib