excessive / DOMy

A DOM-like GUI framework for the *awesome* LÖVE framework
Other
32 stars 2 forks source link

Text input #26

Open pablomayobre opened 9 years ago

pablomayobre commented 9 years ago

Well text input in love is kinda hard, but I made an almost full text editor so it is not THAT hard haha.

Check it out, it is messy (I wrote it in a day) but it haves the functions you may need.

Missing features are copying, cutting, pasting, undo, redo, and that is it I think.

You may need to refactor everything, but I can always help

pablomayobre commented 9 years ago

Oh I didnt implement selection either, but it can be done with the same functions as cursor!

pablomayobre commented 9 years ago

Thranduil also has text inputs, and they are pretty solid, but havent checked the code just yet

pablomayobre commented 9 years ago

I'm not sure of a couple of things in your code, so let me make you test some things.

  1. With the box empty press backspace and delete
  2. Try writing a character and deleting it (with backspace)
  3. Write something, move 1 character to the left and press delete
  4. If you use a huge font and click on the left side of a letter then the cursor will go to the right anyway, even clicking exactly at the width will show this behavior.

This are problems I had with Challenger that your code may have, so I may be able to help.

Karai, this is looking pretty nice! You even got pasting in it... You are missing selection right?

karai17 commented 9 years ago

I've updated the code a bit to be a lot better. Still not perfect, but it's a WIP.