Thread Tools Display Modes
05/18/15, 09:08 PM   #1
stAjora
Join Date: Apr 2015
Posts: 20
Currency Input Box

How would I go about creating an currency input box (text box that only accepts numerical characters)
I tried to Zgoo the sendGold in the mailbox and banks deposit gold boxes but I'm not sure what I'm looking at. I did find "ZO_DefaultEditForBackdrop" for text input so unless anyone has an easier solution I guess I'm just going to try to write restraints onto that.

[edit]

Maybe not, using DefaultEditForBackdrop kills the visibility of text input for the chat window.

Last edited by stAjora : 05/18/15 at 09:11 PM.
  Reply With Quote
05/19/15, 03:07 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,993
Have a llok at this file:
http://esodata.uesp.net/current/src/...lsend.lua.html

It includes the mail send COD money box and is using some functions like
ZO_DefaultMoneyInputField_SetUsePlayerGoldAsMax

Maybe there is an edit field with the type ZO_DefaultMoneyInputField then, or you can use the same functions to provide an input field with callback functions and maximuma moutn = player gold.
  Reply With Quote
05/19/15, 03:36 AM   #3
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
EditControl has methods AddValidCharacter(string) (probably only one character per call) and RemoveAllValidCharacters(). For common filters there's SetTextType(integer):

h5. TextType
* TEXT_TYPE_ALL
* TEXT_TYPE_ALPHABETIC
* TEXT_TYPE_NUMERIC
* TEXT_TYPE_NUMERIC_UNSIGNED_INT
* TEXT_TYPE_PASSWORD

XML attribute is textType, e.g. textType="NUMERIC_UNSIGNED_INT"
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Currency Input Box


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off