class PF::Controller(T)

Overview

Handle button to action mapping in a dynamic way

Defined in:

controller.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(mapping : Hash(T, String)) #

[View source]

Class Method Detail

def self.detect_layout #

Detect the current keyboard layout


[View source]

Instance Method Detail

def any_held? #

[View source]
def held?(name) #

Returns true if a registered button is being held


[View source]
def map_event(event : SDL::Event | Nil) #

Map


[View source]
def none_held? #

[View source]
def press(button) #

[View source]
def pressed?(name) #

Returns true the first time called if a button has been pressed


[View source]
def registered?(button) #

[View source]
def release(button) #

[View source]
def released?(name) #

Returns true the first time called after a button has been released


[View source]