Hi, I'm doing (or trying) a engine with LOVE and me don't find nothing.
can u help me pls
How To Make A Text Editor?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
How To Make A Text Editor?
I'm me, and you are you
Re: How To Make A Text Editor?
something like this?
https://love2d.org/wiki/love.textinput#Examples
https://love2d.org/wiki/love.textinput#Examples
Re: How To Make A Text Editor?
I try it, gives me error, and when i press a key in keyboard, don't show anything!!
Code: Select all
If anyMistake('sorry me, English is not my language!') then
F = 'Okay?'
End
I'm me, and you are you
Re: How To Make A Text Editor?
This code example from the manual works:
If there is an error then you need to show the error. Otherwise nobody can help.
Your three code lines do not work because:
You typed "If" and "End" but it has to be lower case, as you can see in the example.
You set a variable "F" but never do anything with it.
You call a function "anyMistake" but where is that function defined? Or is it just non-sense pseudo code?
Code: Select all
function love.load()
text = "Type away! -- "
end
function love.textinput(t)
text = text .. t
end
function love.draw()
love.graphics.printf(text, 0, 0, love.graphics.getWidth())
end
Your three code lines do not work because:
You typed "If" and "End" but it has to be lower case, as you can see in the example.
You set a variable "F" but never do anything with it.
You call a function "anyMistake" but where is that function defined? Or is it just non-sense pseudo code?
Who is online
Users browsing this forum: Google [Bot] and 6 guests