2

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
Jacket
  • 33
  • 3

2 Answers2

1

Add this in your main.lua

local console_toggle = require("console.console")

function love.textinput(text)
    console_toggle(text)
end
shingo
  • 18,436
  • 5
  • 23
  • 42
0

If you're using a Windows computer, running the game with "lovec ." instead of "love ." will cause the print statements to be displayed on the console.

Wolf City
  • 1
  • 2