Documentation for this module may be created at Module:Button/doc

-- <nowiki>
local p = {}
local getArgs = require('Dev:Arguments').getArgs
local data = mw.loadData('Module:Button/data')

-- Implements {{Button|1=console|2=button}}
function p.main(frame)
    local args = getArgs(frame)
    local console = assert(args.console or args[1], 'Console not found')
    local button = assert(args.button or args[2], 'Button not found')

    if not (console or button) then
        return
    end

    local tmp = data[console:lower()][button:lower()]

    return '[[File:' .. tmp.file .. '|alt=' .. tmp.alt .. '|link=]]'
end

return p
-- </nowiki>
Community content is available under CC-BY-SA unless otherwise noted.