Skip to content

Commit

Permalink
Hopefully final 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Xalior committed Jan 12, 2024
1 parent 0636256 commit c71f52d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Binary file added Archive/SPUI-0.4.0.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions SPUI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ to make the creation of User Interaction flows from NextBASIC \

Quick Start
==
.SPUI -h will get you the built-in help.
<code>.SPUI -h</code> will get you the built-in help.

When building GUIs the parameter <TYPE> is compulsory.

Expand All @@ -24,4 +24,4 @@ More Information
==
See the /docs/ folder

--Xalior, 20200626
--Xalior, 20240112
Binary file modified SPUI/demos/spui-demo.bas
Binary file not shown.
2 changes: 1 addition & 1 deletion SPUI/demos/spui-demo.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#program spui-demo#autostart 1 REG 127,2 4 ;*************************; 5 ;StalePixels UserInterface; 6 ;*************************; 10 .SPUI menu -d 4 "Showcase" "Tests" "Help" 20 LET %m =% REG 127 30 IF %m = 0 THEN GO TO 9990 40 GO TO %m * 10001000 ;*******************************1010 CLS : REG 127,0 : .SPUI menu -t "Showcase" -r 5 -y 5 "Default" "Narrow" "Long" "Short" "Custom"1020 LET %m =% REG 1271030 IF %m = 0 THEN CLS: GOTO 101040 GO TO %m*100+10001099 ;*******************************1100 CLS : PRINT "Default Menu": PRINT1105 PRINT "16x6" : PRINT1109 PRINT ".SPUI menu One Two Three Four Five"1110 REG 127,0 : .SPUI menu One Two Three Four Five1190 GOTO 10001199 ;*******************************1200 CLS : PRINT "Narrow Menu": PRINT1205 PRINT "6x6" : PRINT1209 PRINT ".SPUI menu -c 6 One Two Three Four"1210 REG 127,0 : .SPUI menu -c 6 One Two Three Four Five Six Siven Eight Nine Ten Eleven Twelve1290 GOTO 10001299 ;*******************************1300 CLS : PRINT "Long Menu": PRINT1305 PRINT "16x12" : PRINT1309 PRINT ".SPUI menu -r 12 One Two Three Four Five Six Siven Eight Nine Ten Eleven Twelve"1310 REG 127,0 : .SPUI menu -r 12 One Two Three Four Five Six Siven Eight Nine Ten Eleven Twelve1390 GOTO 10001399 ;*******************************1400 CLS : PRINT "Short Menu": PRINT1405 PRINT "6x1" : PRINT1409 PRINT ".SPUI menu -r 2 ""One and Done"""1410 REG 127,0 : .SPUI menu -r 2 "One and Done"1490 GOTO 10001499 ;*******************************1500 CLS : PRINT "Custom Menu": PRINT1505 PRINT "6x6@1x1" : PRINT1509 PRINT ".SPUI menu -x 1 -y 1 -t ""Fully Custom"" -c 20 -r 2 ""First option"" ""Two choices"" ""Three thingy"" ""Four is where it normally ends"" ""Five is here"" ""Six & done!"""1510 REG 127,0 : .SPUI menu -x 1 -y 1 -t "Fully Custom" -c 20 -r 2 "First option" "Two choices" "Three thingy" "Four is where it normally ends" "Five is here" "Six & done!"1590 GOTO 10001599 ;*******************************2000 ;*******************************2010 CLS : REG 127,0 : .SPUI menu -t "Errors" -r 5 -y 5 "Too Wide" "Too Narrow" "Too Tall" "Too Short" "Overflow Tests"2020 LET %m =% REG 1272030 IF %m = 0 THEN CLS: GOTO 102040 GO TO %m*100+20002099 ;*******************************2100 CLS : PRINT "MENU TOO WIDE": PRINT 2105 PRINT "COLUMNS (width) must be <31" : PRINT2109 PRINT ".SPUI menu -c 31 One Two Three Four Five"2110 REG 127,0 : .SPUI menu -c 31 One Two Three Four Five2199 ;*******************************2200 CLS : PRINT "MENU TOO NARROW" : PRINT 2205 PRINT "COLUMNS (width) must be >6" : PRINT2209 PRINT ".SPUI menu -c -6 One Two Three Four Five"2210 REG 127,0 : .SPUI menu -c -6 One Two Three Four Five2299 ;*******************************2300 CLS : PRINT "MENU TOO TALL" : PRINT 2305 PRINT "ROWS (height) must be <25" : PRINT 2310 PRINT ".SPUI menu -r 25 One Two Three Four Five"2319 REG 127,0 : .SPUI menu -r 25 One Two Three Four Five2399 ;*******************************2400 CLS : PRINT "MENU TOO SHORT" : PRINT 2405 PRINT "ROWS (height) must be > 1" : PRINT2409 PRINT ".SPUI menu -r 1 One Two Three Four Five"2410 REG 127,0 : .SPUI menu -r 1 One Two Three Four Five2500 ;*******************************2510 REG 127,0 : .SPUI menu -t "Overflows" -r 5 -y 5 "Width" "Height" "Bottom" "Side"2520 LET %m =% REG 1272530 IF %m = 0 THEN GOTO 20002540 GO TO %m*100+25002599 ;*******************************2600 CLS : PRINT "OVERFLOW WIDTH" : PRINT2605 PRINT "Content (x+width) must be <31" : PRINT2609 PRINT ".SPUI menu -x 25 -c 6 One Two Three Four Five"2610 REG 127,0 : .SPUI menu -x 25 -c 6 One Two Three Four Five2699 ;*******************************2700 CLS : PRINT "OVERFLOW HEIGHT" : PRINT2705 PRINT "Content (y+height) must be <23" : PRINT2709 PRINT ".SPUI menu -y 18 -r 5 One Two Three Four Five"2710 REG 127,0 : .SPUI menu -y 18 -r 5 One Two Three Four Five2799 ;*******************************2800 CLS : PRINT "OVERFLOW BOTTOM" : PRINT2805 PRINT "Content overflows screen length" : PRINT2809 PRINT ".SPUI menu -r 20 One Two Three Four Five"2810 REG 127,0 : .SPUI menu -r 20 One Two Three Four Five2899 ;*******************************2900 CLS : PRINT "OVERFLOW SIDE" : PRINT2905 PRINT "Content overflows screen width" : PRINT2909 PRINT ".SPUI menu -x 20 One Two Three Four Five"2910 REG 127,0 : .SPUI menu -x 20 One Two Three Four Five2999 ;*******************************3000 CLS3010 PRINT "--------------------------------"3020 PRINT "Stale Pixels User Interface Tool"3030 PRINT "--------------------------------"3040 PRINT 3050 PRINT " 1) SHOWCASE"3060 PRINT " Correct examples of use. ;)"3070 PRINT 3080 PRINT " 2) TESTS"3090 PRINT " Incorrect examples of use. :("3100 PRINT 3110 PRINT " 3) HELP"3120 PRINT " This page. XD"3130 .SPUI BANNER -t "SPUI Help"3160 PROC WaitKey(1)3170 CLS : GO TO 103999 STOP 8000 DEFPROC WaitKey(m)8005 IF m THEN PRINT #0;" press any key"8010 IF INKEY$ <>"" THEN GO TO 80108020 IF INKEY$ ="" THEN GO TO 80208030 IF INKEY$ <>"" THEN GO TO 80308050 ENDPROC 9990 CLS 9991 PRINT "STOP" 9992 STOP 9998 REMOUNT : .TXT2BAS "spui-demo.txt" : LOAD "spui-demo.bas"9999 REMOUNT : SAVE "spui-demo.bas" LINE 1 : .BAS2TXT "spui-demo.bas" : PRINT "saved!": STOP
#program spui-demo#autostart 1 REG 127,2 4 ;*************************; 5 ;StalePixels UserInterface; 6 ;*************************; 10 .SPUI menu -d 4 "Showcase" "Tests" "Help" 20 LET %m =% REG 127 30 IF %m = 0 THEN GO TO 9990 40 GO TO %m * 10001000 ;*******************************1010 CLS : REG 127,0 : .SPUI menu -t "Showcase" -r 6 -y 5 "Default" "Narrow" "Long" "Short" "Custom" "Config File"1020 LET %m =% REG 1271030 IF %m = 0 THEN CLS: GOTO 101040 GO TO %m*100+10001099 ;*******************************1100 CLS : PRINT "Default Menu": PRINT1105 PRINT "16x6" : PRINT1109 PRINT ".SPUI menu One Two Three Four Five"1110 REG 127,0 : .SPUI menu One Two Three Four Five1190 GOTO 10001199 ;*******************************1200 CLS : PRINT "Narrow Menu": PRINT1205 PRINT "6x6" : PRINT1209 PRINT ".SPUI menu -c 6 One Two Three Four"1210 REG 127,0 : .SPUI menu -c 6 One Two Three Four Five Six Siven Eight Nine Ten Eleven Twelve1290 GOTO 10001299 ;*******************************1300 CLS : PRINT "Long Menu": PRINT1305 PRINT "16x12" : PRINT1309 PRINT ".SPUI menu -r 12 One Two Three Four Five Six Siven Eight Nine Ten Eleven Twelve"1310 REG 127,0 : .SPUI menu -r 12 One Two Three Four Five Six Siven Eight Nine Ten Eleven Twelve1390 GOTO 10001399 ;*******************************1400 CLS : PRINT "Short Menu": PRINT1405 PRINT "6x1" : PRINT1409 PRINT ".SPUI menu -r 2 ""One and Done"""1410 REG 127,0 : .SPUI menu -r 2 "One and Done"1490 GOTO 10001499 ;*******************************1500 CLS : PRINT "Custom Menu": PRINT1505 PRINT "6x6@1x1" : PRINT1509 PRINT ".SPUI menu -x 1 -y 1 -t ""Fully Custom"" -c 20 -r 2 ""First option"" ""Two choices"" ""Three thingy"" ""Four is where it normally ends"" ""Five is here"" ""Six & done!"""1510 REG 127,0 : .SPUI menu -x 1 -y 1 -t "Fully Custom" -c 20 -r 2 "First option" "Two choices" "Three thingy" "Four is where it normally ends" "Five is here" "Six & done!"1590 GOTO 10001599 ;*******************************1600 CLS : PRINT "Config Driven Menu": PRINT1605 PRINT "1937.ini" : PRINT1609 PRINT ".SPUI menu -I 1937.ini"1610 REG 127,0 : .SPUI menu -I 1937.ini1690 GOTO 10001699 ;*******************************2000 ;*******************************2010 CLS : REG 127,0 : .SPUI menu -t "Errors" -r 5 -y 5 "Too Wide" "Too Narrow" "Too Tall" "Too Short" "Overflow Tests"2020 LET %m =% REG 1272030 IF %m = 0 THEN CLS: GOTO 102040 GO TO %m*100+20002099 ;*******************************2100 CLS : PRINT "MENU TOO WIDE": PRINT 2105 PRINT "COLUMNS (width) must be <31" : PRINT2109 PRINT ".SPUI menu -c 31 One Two Three Four Five"2110 REG 127,0 : .SPUI menu -c 31 One Two Three Four Five2199 ;*******************************2200 CLS : PRINT "MENU TOO NARROW" : PRINT 2205 PRINT "COLUMNS (width) must be >6" : PRINT2209 PRINT ".SPUI menu -c -6 One Two Three Four Five"2210 REG 127,0 : .SPUI menu -c -6 One Two Three Four Five2299 ;*******************************2300 CLS : PRINT "MENU TOO TALL" : PRINT 2305 PRINT "ROWS (height) must be <25" : PRINT 2310 PRINT ".SPUI menu -r 25 One Two Three Four Five"2319 REG 127,0 : .SPUI menu -r 25 One Two Three Four Five2399 ;*******************************2400 CLS : PRINT "MENU TOO SHORT" : PRINT 2405 PRINT "ROWS (height) must be > 1" : PRINT2409 PRINT ".SPUI menu -r 1 One Two Three Four Five"2410 REG 127,0 : .SPUI menu -r 1 One Two Three Four Five2500 ;*******************************2510 REG 127,0 : .SPUI menu -t "Overflows" -r 5 -y 5 "Width" "Height" "Bottom" "Side"2520 LET %m =% REG 1272530 IF %m = 0 THEN GOTO 20002540 GO TO %m*100+25002599 ;*******************************2600 CLS : PRINT "OVERFLOW WIDTH" : PRINT2605 PRINT "Content (x+width) must be <31" : PRINT2609 PRINT ".SPUI menu -x 25 -c 6 One Two Three Four Five"2610 REG 127,0 : .SPUI menu -x 25 -c 6 One Two Three Four Five2699 ;*******************************2700 CLS : PRINT "OVERFLOW HEIGHT" : PRINT2705 PRINT "Content (y+height) must be <23" : PRINT2709 PRINT ".SPUI menu -y 18 -r 5 One Two Three Four Five"2710 REG 127,0 : .SPUI menu -y 18 -r 5 One Two Three Four Five2799 ;*******************************2800 CLS : PRINT "OVERFLOW BOTTOM" : PRINT2805 PRINT "Content overflows screen length" : PRINT2809 PRINT ".SPUI menu -r 20 One Two Three Four Five"2810 REG 127,0 : .SPUI menu -r 20 One Two Three Four Five2899 ;*******************************2900 CLS : PRINT "OVERFLOW SIDE" : PRINT2905 PRINT "Content overflows screen width" : PRINT2909 PRINT ".SPUI menu -x 20 One Two Three Four Five"2910 REG 127,0 : .SPUI menu -x 20 One Two Three Four Five2999 ;*******************************3000 CLS3010 PRINT "--------------------------------"3020 PRINT "Stale Pixels User Interface Tool"3030 PRINT "--------------------------------"3040 PRINT 3050 PRINT " 1) SHOWCASE"3060 PRINT " Correct examples of use. ;)"3070 PRINT 3080 PRINT " 2) TESTS"3090 PRINT " Incorrect examples of use. :("3100 PRINT 3110 PRINT " 3) HELP"3120 PRINT " This page. XD"3130 .SPUI BANNER -t "SPUI Help"3160 PROC WaitKey(1)3170 CLS : GO TO 103999 STOP 8000 DEFPROC WaitKey(m)8005 IF m THEN PRINT #0;" press any key"8010 IF INKEY$ <>"" THEN GO TO 80108020 IF INKEY$ ="" THEN GO TO 80208030 IF INKEY$ <>"" THEN GO TO 80308050 ENDPROC 9990 CLS 9991 PRINT "STOP" 9992 STOP 9998 REMOUNT : .TXT2BAS "spui-demo.txt" : LOAD "spui-demo.bas"9999 REMOUNT : SAVE "spui-demo.bas" LINE 1 : .BAS2TXT "spui-demo.bas" : PRINT "saved!": STOP
Expand Down

0 comments on commit c71f52d

Please sign in to comment.