This commit is contained in:
Zan
2024-05-09 14:05:30 -07:00
parent 93d72079dd
commit cfa8289330
2074 changed files with 21518 additions and 11 deletions

View File

@@ -0,0 +1,13 @@
# NumberPad
This is the script for a numberpad that allows input of number for use in other systems.
![NumPad](images/ExampleNumPad.jpg)
NOTE: This is a generic example that supports assigning entered number to a user defined variable.
The comments in the code can be left out of course, but here they are for how to use the system.
1. :1 to :0 are number buttons first field name. The On value is the number (i.e. :5 on value is 5), the off value is 0.
1. :ent :clr are enter and clear buttons first field name. On value is 1, off value is 0.
1. :neg is the negative button first field name. On value is -1, off value is 1
1. :dec is the decimal button first field name. On value is 1000, off value is 1
1. :Entry is the number panel display. :dbg is the variable the final number will be assigned to, rename this as needed.
1. To use: press negative or decimals if needed. Enter the numbers one at a time, making sure they appear on the Entry panel. When complete hit Enter button to assign it to your :dbg variable. You can press Clear button to start over.

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@@ -0,0 +1,20 @@
e=:ent ife then:dbg=:entry :ent=0end goto2+2*((e+:clr)>0)
goto1+2*((:1+:2+:3+:4+:5+:6+:7+:8+:9+:0)>0)
num*=10 num+=:1+:2+:3+:4+:5+:6+:7+:8+:9
:1=0 :2=0 :3=0 :4=0 :5=0 :6=0 :7=0 :8=0 :9=0 :0=0
:entry=(1-:clr)*num*:neg/:dec goto1+5*((:clr+:ent)>0)
num=0 :neg=1 :clr=0 :dec=1 goto1
// :1 to :0 are number buttons first field name. The On value is the
// number (i.e. :5 on value is 5), the off value is 0.
// :ent :clr are enter and clear buttons first field name. On value
// is 1, off value is 0.
// :neg is the negative button first field name. On value is -1, off
// value is 1
// :dec is the decimal button first field name. On value is 1000, off
// value is 1
// :Entry is the number panel display. :dbg is the variable the final
// number will be assigned to, rename this as needed.
// To use: press negative or decimals if needed. Enter the numbers one
// at a time, making sure they appear on the Entry panel. When
// complete hit Enter button to assign it to your :dbg variable.