Page 1 of 1
Word Processor
Posted: Mon Oct 15, 2018 6:18 pm
by Tuxion
Hi, I'm a beginner in programming
Sorry for my poor English.
I'm trying to program a word processor to type the letters and numbers that we want one after the other, but I haven't found a way to do it...
Do you have any examples?
Re: Word Processor
Posted: Tue Oct 16, 2018 12:03 am
by Xugro
Here is a very small example. This shows you the basic idea.
Re: Word Processor
Posted: Tue Oct 16, 2018 11:33 am
by Tuxion
Thanks ! But if i want to use the backspace to delete one letter at a time, how do i do that?
Re: Word Processor
Posted: Tue Oct 16, 2018 11:48 am
by rougan
Tuxion wrote: ↑Tue Oct 16, 2018 11:33 am
Thanks ! But if i want to use the backspace to delete one letter at a time, how do i do that?
Have a look here:
https://love2d.org/wiki/love.textinput
There's an example for erasing text when backspace is pressed.
Re: Word Processor
Posted: Tue Oct 16, 2018 12:35 pm
by Tuxion
Thank you! it works but I don't understand what this utf8 is for, what is its function?
I see a require but I don't have the utf8.lua, how can it work?
Re: Word Processor
Posted: Tue Oct 16, 2018 12:51 pm
by NotARaptor
Hi Tuxion - the linked page explains what it is and why it is used, and has a link to the library itself.
Re: Word Processor
Posted: Tue Oct 16, 2018 2:48 pm
by pgimeno
utf8 is a LÖVE built-in library. Other built-in libraries are socket and enet, and from LuaJIT, ffi and jit.
Re: Word Processor
Posted: Tue Oct 16, 2018 5:07 pm
by ivan
UTF8 allows you to use strings containing non English characters.
Re: Word Processor
Posted: Wed Oct 17, 2018 9:32 am
by Tuxion
ok thanks i have what i need