nngn
Loading...
Searching...
No Matches
input.lua File Reference

Functions

local function to_byte (k)
 
local function key_event (key, action, mod)
 
local function resume() nngn local function press (key, mod) key_event(key
 
local function release (key, mod) key_event(key
 
local function register (t, g)
 
local function register_mouse ()
 

Variables

local camera = require "nngn.lib.camera"
 
local collision = require "nngn.lib.collision"
 
local light = require "nngn.lib.light"
 
local nngn_math = require "nngn.lib.math"
 
local menu = require "nngn.lib.menu"
 
local player = require "nngn.lib.player"
 
local textbox = require "nngn.lib.textbox"
 
local timing = require "nngn.lib.timing"
 
local utils = require "nngn.lib.utils"
 
local input< const > = BindingGroup.new()
 
local ctrl_input< const > = BindingGroup.new()
 
local paused_input< const > = BindingGroup.new()
 
local function resume() nngn local function Input KEY_PRESS
 
local function resume() nngn local function Input mod end
 
local function Input KEY_RELEASE
 
local m = 1
 
if mods &Input MOD_SHIFT = 0 then
 
local z< const > = not nngn:renderers():zsprites()
 
if mods &Input MOD_ALT = 0 then return light.sun() end
 
local a = {nngn:lighting():ambient_light()}
 
then for i = 1
 
local shift< const > = mods & Input.MOD_SHIFT ~= 0
 
local alt< const > = mods & Input.MOD_ALT ~= 0
 
 input = input
 
 paused_input = paused_input
 
 ctrl_input = ctrl_input
 
 pause = pause
 
 resume = resume
 
 press = press
 
 release = release
 
 install = install
 

Function Documentation

◆ key_event()

local function key_event ( key ,
action ,
mod  )

◆ press()

local function resume() nngn local function press ( key ,
mod  )

◆ register()

local function register ( t ,
g  )

◆ register_mouse()

local function register_mouse ( )

◆ release()

local function release ( key ,
mod  )

◆ to_byte()

local function to_byte ( k )

Variable Documentation

◆ a

else for do a = {nngn:lighting():ambient_light()}

◆ alt< const >

local alt< const > = mods & Input.MOD_ALT ~= 0

◆ camera

local camera = require "nngn.lib.camera"

◆ collision

local collision = require "nngn.lib.collision"

◆ ctrl_input

ctrl_input = ctrl_input

◆ ctrl_input< const >

◆ end

local function Input mod end

◆ i

else for i = 1

◆ input

input = input

◆ input< const >

◆ install

local function install = install

◆ KEY_PRESS

local function resume() nngn local function Input KEY_PRESS

◆ KEY_RELEASE

local function Input KEY_RELEASE

◆ light

local light = require "nngn.lib.light"

◆ m

m = 1

◆ menu

local menu = require "nngn.lib.menu"

◆ MOD_ALT

if mods& Input MOD_ALT = 0 then return light.sun() end

◆ MOD_SHIFT

if mods& Input MOD_SHIFT = 0 then

◆ nngn_math

local nngn_math = require "nngn.lib.math"

◆ pause

local function pause = pause

◆ paused_input

paused_input = paused_input

◆ paused_input< const >

◆ player

local player = require "nngn.lib.player"

◆ press

press = press

◆ release

release = release

◆ resume

resume = resume

◆ shift< const >

local shift< const > = mods & Input.MOD_SHIFT ~= 0

◆ textbox

local textbox = require "nngn.lib.textbox"

◆ timing

local timing = require "nngn.lib.timing"

◆ utils

local utils = require "nngn.lib.utils"

◆ z< const >

local z< const > = not nngn:renderers():zsprites()