Quantcast
How do I force an editbox widget to numberic but allow negative? - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-08-20, 07:39 PM   #1
Yakkers
A Murloc Raider
Join Date: May 2020
Posts: 4
How do I force an editbox widget to numberic but allow negative?

I'm working on basic settings window for my hit combo popups addon, I'm trying to make a pair of editboxes where the user can set X and Y offsets from the center of the screen. Using the center is the most intuitive way to do it, so I'm trying to figure out how I can get it to allow negative numbers.

Using SetNumeric() or GetNumber() doesn't do it, the former won't let the user type in a negative value and with the latter it'll treat a negative value as non-numeric and just default it to zero.

Is there something else in the EditBox widget I'm not seeing that lets me do this, or is there maybe a different widget I should be using?
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » How do I force an editbox widget to numberic but allow negative?

Thread Tools
Display Modes

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