Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developer Console love2d

Tags:

lua

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
like image 859
Jacket Avatar asked Jan 23 '26 03:01

Jacket


1 Answers

Add this in your main.lua

local console_toggle = require("console.console")

function love.textinput(text)
    console_toggle(text)
end
like image 167
shingo Avatar answered Jan 25 '26 16:01

shingo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!