JPEditText

JPEditText

Significantly improves the HUD edit text default behavior (placeholders, key repeat, paste, undo...)
Version : 3.0
Price : $30
State : Out

Changelog

v3.0

  • Now compatible with ShiVa 2.0.
  • Plugin API compiled for Mac and Linux in addition to Windows : it will provide API completion in the Script module in ShiVa Editor for each of these operating systems.
  • Now uses a user token instead of an email to activate

v2.2

  • Optimized for ShiVa 1.9.2

v2.1

  • This version 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.

v2.0

  • New feature: placeholders. Use the new JPEditText.setEditTextPlaceholder ( hComponent, sPlaceholderTextOrNil, nOptRed, nOptGreen, nOptBlue, nOptAlpha ) function to define a placeholder of a HUD Edit Text
  • Fixed some issues with the undo feature
  • New function JPEditText.updatePlaceholder ( hComponent ). You may need to call it in some rare cases (like if a component has been destroyed and created again, to update it's placeholder text.

v1.3

  • Internal modifications to prevent eventual conflicts between packs.

v1.2

  • Fixed a random issue blocking the activation of the pack

v1.1

  • Error messages now are easier to understand.

API

--JPEditText API JPEditText.activate ( sUserToken, sActivationKey ) JPEditText.setEditTextPlaceholder ( hComponent, sPlaceholderTextOrNil, nOptRed, nOptGreen, nOptBlue, nOptAlpha ) JPEditText.setReturnKeyEnabled ( bEnabled ) JPEditText.updatePlaceholder ( hComponent )

Description

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.