Significantly improves the HUD edit text default behavior (placeholders, key repeat, paste, undo...)
Online Demo: http://www.julien-pierron.com/sample.php?sample=jpdemo&product=jpedittext
Forum Link: http://www.shivaengine.com/developer/forum/viewtopic.php?f=82&t=29258
Req. ShiVa Version:
ShiVa 1.9.2 Engines
Plugin Platform Compatibility:
iOS, Android, WinRT ARM/Phone 8, WinRT x86/_64, Windows Legacy, Mac OS X, Linux, Flash, Web Browser, Palm, Marmalade, BlackBerry, Windows Phone 7, Playstation 3, Playstation 4, Xbox 360, Xbox One, Wii
Seller information: Julien Pierron
JPEditText allows you to add new features to the ShiVa's Edit Texts
The first feature is the possibility to set a placeholder to a HUD Edit Text. When the component is empty, you will be able to set a default text with a specific color. For instance, if you have a search bar, if there's nothing entered yet, JPEditText allow you for instance to display "Search..." in grey until the user enters his search keywords. As soon as the user enters text, the placeholder will disappear and the user's text will show up in the right color. If he deletes the text, the grey "Search..." text will be displayed again. It's really an amazing feature.
Another great feature is is the keyboard keys repeat when a text is added to the component. By default, if you press a key, even if you hold it only one character will be written. With JPEditText, the character will be repeated until the key is released.
This feature also works when moving the edit cursor position with the keyboard arrows and when deleting text with both Del. and BackSpace keyboard keys.
JPEditText also grants the possibility to paste text using the Ctrl+V shortcut and undo using Ctrl+Z.
Some keys doesn't work at all with default Edits behaviour, like the math symbols of the numpad (/ * - +). With JPEditText, they are taken into account!
Finally, JPEditText handles the Return key to add a new line in the text.
In short JPEditText modify the default archaic behaviour of the ShiVa's Edit Texts to obtain smart components by giving them multiple behaviours that are present in most of the text editors.
The usage of JPEditText is very simple, load it in your game, activate it, and... you are done, nothing else to do, JPEditText is completely autonomous!
Note : As this pack is based on the keyboard events, consider buying this pack only if your game will be published on a device using a keyboard that triggers the onKeyboardKeyDown/Up events. For instance, it won't work with the iOS native keyboard which does not triggers those events. It will work for the Android native keyboard (that you can add in your game by using plugins like jpVirtualKeyboard) as it sends the keyboard event.
About Android, JPEditText offers to fix a bug with android applications, that does not allow to delete letters with the native android keyboard backspace key. By using JPEditText, this bug will be gone.
- ShiVa 1.9.2 or greater
- LUA project (not compatible with full c++ projects, compatible with LUA projects that use c++ plugins)
You can find an introduction to the packs and how to load them in your game here:
API & Instructions
Sample projects that use my packs