Text Area 0.92 : now with scrolling and copy&paste.

Started by Monsieur OUXX, Sun 16/11/2014 21:24:48

Previous topic - Next topic

Monsieur OUXX

What does it do : It's like a multi-line textbox. You can type some text, use the keyboard arrows to move the cursor, or click with the mouse. You can click on scrolling arrows to scroll up and down. You can use the buttons (or shortcuts) to copy&paste text.

Optional:
- You can forbid the text area from scrolling. When the user reaches its end, a message tells him he cannot add more text.
- You can use 256-characters fonts or 128-characters fonts. If the user types a special character (e.g. 'é') in 128-characters text area, then it gets converted to s standard character ('e').
- You can add sounds (e.g. typewriter sound, etc.)

Credits:
  Made by the Indiana Jones and the Seven Cities of Gold team (Monsieur Ouxx).
  Inspired by monkey_05_06's Text Area 0.0.1.1 here.

License:
  Use the script (not the images), copy it, modify it any way you want, even for commercial goals.

How to use:
- Download the demo and check out the room script. It's pretty much fully automatic, except you have to create and provide a bunch of GUIControls to the module.
- If the demo is not clear enough, check the header of the module.
- PLEASE NOTE that this module has several modules dependencies (StandaloneClick, StringUtility, etc.), that are provided with it (see the modules in the demo). Just import them in the same order.

Download:
   DOWNLOAD DEMO 0.92

Videos:

    VIDEO 1




    VIDEO 2




History:
- 0.9 : added cursor positionning by clicking or using the arrows. Added "insert" typing mode
- 0.92 : added scrolling, added cut/copy/paste


Known bugs:
- 0.92 :
  (these are all minor bugs, it's pretty stable overall)
   - If you press "return" immediately on the first empty line of text, and try to click there to put the cursor back onto that empty line, then the cursor does not get positioned properly. Simple workaround: You need to use the left keyboard arrow to move it back to the first row.
   - If you past text onto an empty line, it might get pasted at the end of the previous line.
   - If you have two text areas and select text in one, then the selection markers might also appear in the other one.
   - If you insert backslash ('') then it messes with the special characters.
   - special character 'ç' is not recognized (but I think it's an AGS bug)
 

abstauber

Nice, thanks for sharing!
You might want to consider re-licensing the StringUtility, as it's currently under GPL which not all users might like (especially commercial users).

Monsieur OUXX

Quote from: abstauber on Mon 17/11/2014 14:52:36
it's currently under GPL.
I have no idea when and why I did that. I'll change it in the next iteration. Users can already consider it's fully free to use. <-- This statement supercedes the license in the file.
 

monkey0506

Hey, this is pretty cool! :D I always felt like AGS needed some sort of TextArea control. Glad that my old idea inspired you to make this, I never noticed it.

hache1977

Looks great, but the link goes nowhere now, anybody knows where can I get it? Thanks!

SMF spam blocked by CleanTalk