diff options
Diffstat (limited to 'docs/source/techspecs/luareference.rst')
-rw-r--r-- | docs/source/techspecs/luareference.rst | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/docs/source/techspecs/luareference.rst b/docs/source/techspecs/luareference.rst index eacbdd0a05f..d15c74efe0b 100644 --- a/docs/source/techspecs/luareference.rst +++ b/docs/source/techspecs/luareference.rst @@ -1557,17 +1557,37 @@ Methods ioport:count_players() Returns the number of player controllers in the system. +ioport:type_pressed(type, [player]) + Returns a Boolean indicating whether the specified input is currently + pressed. The input port type is an enumerated value. The player number is + a zero-based index. If the player number is not supplied, it is assumed to + be zero. +ioport:type_name(type, [player]) + Returns the display name for the specified input type and player number. + The input type is an enumerated value. The player number is a zero-based + index. If the player number is not supplied, it is assumed to be zero. ioport:type_group(type, player) - Returns the I/O port group for the specified I/O port type and player - number. The I/O port type is an enumerated value. The player number is a - zero-based index. Returns an integer giving the grouping for the input. + Returns the input group for the specified input type and player number. The + input type is an enumerated value. The player number is a zero-based index. + Returns an integer giving the grouping for the input. If the player number + is not supplied, it is assumed to be zero. This should be called with values obtained from I/O port fields to provide canonical grouping in an input configuration UI. -ioport:type_seq(type, player, seqtype) - Get the configured input sequence for the specified input type, player and - sequence type. The sequence type must be ``"standard"``, ``"increment"`` - or ``"decrement"``. This provides access to general input configuration. +ioport:type_seq(type, [player], [seqtype]) + Get the configured input sequence for the specified input type, player + number and sequence type. The input type is an enumerated value. The + player number is a zero-based index. If the player number is not supplied, + it is assumed to be zero. If the sequence type is supplied, it must be + ``"standard"``, ``"increment"`` or ``"decrement"``; if it is not supplied, + it is assumed to be ``"standard"``. + + This provides access to general input configuration. +ioport:token_to_input_type(string) + Returns the input type and player number for the specified input type token. +ioport:input_type_to_token(type, [player]) + Returns the token string for the specified input type and player number. If + the player number is not supplied, it assumed to be zero. Properties ^^^^^^^^^^ |