Jibble

Author Topic: Text Area 0.92 : now with scrolling and copy&paste.  (Read 1725 times)

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
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)
« Last Edit: 16 Nov 2014, 21:28 by Monsieur OUXX »
 

abstauber

  • Cavefish
  • Mittens Knight
  • still mowing the lawn
    • abstauber worked on one or more games that won an AGS Award!
    •  
    • abstauber worked on one or more games that was nominated for an AGS Award!
Re: Text Area 0.92 : now with scrolling and copy&paste.
« Reply #1 on: 17 Nov 2014, 14:52 »
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

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
Re: Text Area 0.92 : now with scrolling and copy&paste.
« Reply #2 on: 17 Nov 2014, 19:09 »
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

  • SEND PIZZA.
    • Best Innovation Award Winner 2017, for his work to help AGS games reach the widest possible audience - through popular distribution platforms (Steam, Galaxy) as well as other operating systems (Android, Linux)
    • monkey0506 worked on one or more games that won an AGS Award!
    •  
    • monkey0506 worked on one or more games that was nominated for an AGS Award!
Re: Text Area 0.92 : now with scrolling and copy&paste.
« Reply #3 on: 25 Jan 2015, 10:15 »
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.

Re: Text Area 0.92 : now with scrolling and copy&paste.
« Reply #4 on: 12 Jun 2020, 16:18 »
Looks great, but the link goes nowhere now, anybody knows where can I get it? Thanks!