Skip to content
Discussion options

You must be logged in to vote

field.name is the display name, you want an input type token. Remember they aren’t necessarily unique within a device.

mach = manager.machine
portman = mach.ioport
for tag, port in pairs(portman.ports) do
    for name, field in pairs(port.fields) do
        print(portman:input_type_to_token(field.type, field.player))
    end
end

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@cuavas
Comment options

@sairuk
Comment options

Comment options

You must be logged in to vote
5 replies
@Jakobud
Comment options

@cuavas
Comment options

@Jakobud
Comment options

@Jakobud
Comment options

@cuavas
Comment options

Answer selected by Jakobud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants