lualove2d

Developer Console love2d


So I found on github this library for love2d that adds a developer console into my game so I followed that steps and got stuck at this one, it says:

"In the love.textinput function add the following line (console_toggle(text)), text should be replaced with whatever is your 1st argument name in love.textinput"

Can someone help with what this means please?

Github page of the dev console: https://github.com/rinqu-eu/love2d-console

Thanks.

Edit: This is my code:

etc = {}

function etc:load()
    local console_toggle = require("console.console")
     love.textinput(console_toggle())
end

function etc:update(dt)

end

function etc:draw()

end

Solution

  • Add this in your main.lua

    local console_toggle = require("console.console")
    
    function love.textinput(text)
        console_toggle(text)
    end