This Basic program allows the user to create profession looking GUI's, backgrounds, and graphics in a short amount of time and all on the calculator. The user can choose to create everything from Text (big, small, horizontal and vertical), Lines (horiz. and vert.) Circles, Boxes with or without shadows, border, tabs, title bar, use a pen to draw or eraser to erase and then name and save up to 4 pictures. The readme contains all the key mappings necessary to perform all of the possible tasks.

Screenshots:




here is a very quick example:




I need all your honest opinions on this program. It can be downloaded here
Welcome to Cemetech! Looks nice and useful to me. Here's the source for curious people. BTW, I see a ton of optimizations that need to be made, imho.

BASIC Code wrote:
::"GUI CREATOR
:ClrDraw
:AxesOff
:FnOff
:ClrHome
:ZStandard
:ZSquare
:Text(0,77,"V1.02"
:Text(‾1,15,15,"GUI CREATOR
:Text(25,32,"BY MATT B
:Text(32,5,"SUPPORTED BY TICALCS.NET
:Text(55,22,"[PRESS ANY KEY]
:Repeat getKey
:End
:Lbl A
:ClrHome
:ClrDraw
:Menu(" CHOOSE ","ADD NEW",ST,"PRESETS",PR,"ERASER",ER,"VIEW",VI,"SYSTEM",OP,"EXIT",EX)
:Lbl ST
:Menu(" CHOOSE ","TEXT",TX,"LINE",LN,"CIRCLE",CR,"BOX",BX,"PEN",PN,"BACK",BK)
:Lbl BX
:RecallPic 5
:0→Xmin
:0→YMax
:94→Xmax
:‾62→Ymin
:15→A
:‾15→B
:45→C
:‾45→D
:0→L
:While 1=1
:RecallPic 5
:Line(A,B,C,B)
:Line(C,B,C,D)
:Line(C,D,A,D)
:Line(A,D,A,B)
:If L=1
:Then
:Line(A-1,B-1,A-1,D-1)
:Line(A-1,D-1,C-1,D-1)
:End
:getKey→K
:If K>0
:Then
:If K=26
:Then
:ClrDraw
:A+1→A
:C+1→C
:End
:If K=95
:Then
:ClrDraw
:A-1→A
:C+1→C
:End
:If K=85
:Then
:ClrDraw
:A+1→A
:C-1→C
:End
:If K=75
:Then
:ClrDraw
:B+1→B
:D-1→D
:End
:If K=65
:Then
:ClrDraw
:B-1→B
:D+1→D
:End
:If K=105
:Then
:StorePic 5
:Goto A
:End
:If K=22
:Then
:ClrDraw
:Goto A
:End
:If K=24
:Then
:ClrDraw
:A-1→A
:C-1→C
:End
:If K=34
:Then
:ClrDraw
:B-1→B
:D-1→D
:End
:If K=25
:Then
:ClrDraw
:B+1→B
:D+1→D
:End
:If K=63
:Then
:ClrDraw
:1→L
:End
:If K=64
:Then
:ClrDraw
:0→L
:End
:End
:End
:Lbl ER
:RecallPic 5
:StorePic 6
:30→A
:46→B
:1→L
:Lbl ET
:While 1=1
:Pxl-On(A,B)
:getKey→K
:If K>0
:Then
:Pxl-Off(A,B)
:RecallPic 6
:If K=65
:Then
:Pxl-Change(A,B)
:0→F
:While F≤7
:F+1→F
:End
:Pxl-Change(A,B)
:End
:If K=25
:A-1→A
:If K=34
:A+1→A
:If K=24
:B-1→B
:If K=26
:B+1→B
:If K=22
:Then
:ClrDraw
:Goto A
:End
:If K=75
:Goto ED
:If K=105
:Then
:StorePic 5
:Goto A
:End
:End
:End
:Lbl ED
:While 1=1
:Pxl-Off(A,B)
:getKey→K
:If K>0
:Then
:If K=25
:A-1→A
:If K=34
:A+1→A
:If K=24
:B-1→B
:If K=26
:B+1→B
:If K=22
:Then
:ClrDraw
:Goto A
:End
:If K=65
:Then
:Pxl-Change(A,B)
:0→F
:While F≤7
:F+1→F
:End
:Pxl-Change(A,B)
:End
:If K=75
:Then
:StorePic 6
:Goto ET
:End
:If K=105
:Then
:StorePic 5
:Goto A
:End
:End
:End
:Lbl PN
:RecallPic 5
:30→A
:45→B
:1→L
:Lbl PT
:While 1=1
:Pxl-On(A,B)
:getKey→K
:If K>0
:Then
:Pxl-Off(A,B
:RecallPic 5
:If K=65
:Then
:Pxl-Change(A,B
:0→F
:While F≤7
:F+1→F
:End
:Pxl-Change(A,B
:End
:If K=25
:A-1→A
:If K=34
:A+1→A
:If K=24
:B-1→B
:If K=26
:B+1→B
:If K=22
:Then
:ClrDraw
:Goto A
:End
:If K=75
:Goto PD
:If K=105
:Then
:StorePic 5
:Goto A
:End
:End
:End
:Lbl PD
:0→Z
:While 1=1
:Pxl-On(A,B)
:If L=2
:Then
:Pxl-On(A+1,B
:Pxl-On(A-1,B
:Pxl-On(A,B+1
:Pxl-On(A,B-1
:End
:If Z=1
:Then
:StorePic 5
:Goto A
:End
:getKey→K
:If K>0
:Then
:If K=95
:2→L
:If K=85
:1→L
:If K=25
:A-1→A
:If K=34
:A+1→A
:If K=24
:B-1→B
:If K=26
:B+1→B
:If K=22
:Then
:ClrDraw
:Goto A
:End
:If K=65
:Then
:Pxl-Change(A,B)
:0→F
:While F≤7
:F+1→F
:End
:Pxl-Change(A,B)
:End
:If K=75
:Goto PT
:If K=105
:Then
:1→Z
:End
:End
:End
:Lbl LN
:Menu(" CHOOSE ","HORIZONTAL",HL,"VERTICAL",VL,"BACK",ST)
:
:Lbl PR
:Menu(" CHOOSE ","BORDER",BR,"TITLE BAR",TB,"TABS",TT,"BACK",BK)
:
:Lbl TT
:Menu(" CHOOSE ","CREATE",TA,"LABEL",TL,"BACK",PR)
:Lbl TL
:1→Z
:0→K
:0→A
:RecallPic 5
:While Z≤5
:Lbl TN
:ClrHome
:Disp ""
:Output(1,6,"TAB")
:Output(1,10,Z)
:Input "NAME:",Str6
:length(Str6)→B
:If B>4
:Then
:ClrHome
:Output(2,2,"ERROR:TOO BIG"
:Pause
:Goto TN
:End
:If B=4
:Then
:If Z=1
:2→A
:If Z=2
:21→A
:If Z=3
:40→A
:If Z=4
:58→A
:If Z=5
:77→A
:End
:If B=3
:Then
:If Z=1
:4→A
:If Z=2
:23→A
:If Z=3
:42→A
:If Z=4
:60→A
:If Z=5
:79→A
:End
:If B=2
:Then
:If Z=1
:6→A
:If Z=2
:25→A
:If Z=3
:44→A
:If Z=4
:62→A
:If Z=5
:81→A
:End
:If B=1
:Then
:If Z=1
:9→A
:If Z=2
:28→A
:If Z=3
:45→A
:If Z=4
:65→A
:If Z=5
:83→A
:End
:Text(55,A,Str6)
:StorePic 5
:RecallPic 5
:Repeat getKey
:End
:Z+1→Z
:End
:End
:Lbl TA
:RecallPic 5
:0→L
:While 1=1
:getKey→K
:If K>0
:Then
:If K=22
:Then
:ClrDraw
:Goto A
:End
:If K=92
:Then
:ClrDraw
:RecallPic 5
:Line(‾14.7,‾7.5,‾9.5,‾7.5)
:Line(‾8.7,‾7.5,‾3.2,‾7.5)
:Line(‾2.7,‾7.5,2.6,‾7.5)
:Line(3.3,‾7.5,8.6,‾7.5)
:Line(9.3,‾7.5,14.5,‾7.5)
:Line(‾15,‾7.9,‾15,‾10)
:Line(15,‾7.9,15,‾10)
:Line(‾9,‾7.9,‾9,‾10)
:Line(‾3,‾7.9,‾3,‾10)
:Line(3,‾7.9,3,‾10)
:Line(9,‾7.9,9,‾10)
:End
:If K=93
:Then
:ClrDraw
:RecallPic 5
:Line(‾15,‾7,15,‾7)
:Line(‾9,‾7,‾9,‾10)
:Line(‾3,‾7,‾3,‾10
:Line(3,‾7,3,‾10)
:Line(9,‾7,9,‾10)
:End
:If K=94
:Then
:ClrDraw
:RecallPic 5
:Line(‾15,‾7,15,‾7)
:Line(‾9,‾7,‾9,‾10)
:Line(‾3,‾7,‾3,‾10
:Line(3,‾7,3,‾10)
:Line(9,‾7,9,‾10)
:Line(‾15,‾7.5,15,‾7.5)
:End
:If K=105
:Then
:StorePic 5
:Goto TT
:End
:End
:End
:Lbl TB
:‾15→A
:6.7→B
:15→C
:6.7→D
:0→Z
:While Z=0
:RecallPic 5
:Line(A,B,C,D)
:getKey→K
:If K>0
:Then
:If K=25
:Then
:‾15→A
:6.7→B
:15→C
:6.7→D
:End
:If K=34
:Then
:‾15→A
:‾6.7→B
:15→C
:‾6.7→D
:End
:If K=24
:Then
:‾12→A
:10→B
:‾12→C
:‾10→D
:End
:If K=26
:Then
:11.5→A
:10→B
:11.5→C
:‾10→D
:End
:If K=22
:Then
:ClrDraw
:Goto A
:End
:If K=105
:Then
:StorePic 5
:Goto A
:End
:ClrDraw
:End
:End
:Lbl BR
:RecallPic 5
:Line(‾15,10,15,10)
:Line(‾15,10,‾15,‾10)
:Line(‾15,‾10,15,‾10)
:Line(15,‾10,15,10)
:Pause
:StorePic 5
:Goto A
:Lbl CR
:RecallPic 5
:0→Z
:0→X
:0→C
:1→R
:0→θ
:While Z=0
:RecallPic 5
:Pt-On(X,C)
:If θ=1
:Circle(X,C,R)
:0→K
:getKey→K
:If K>0
:Then
:If K=95
:R+1→R
:If K=85
:R-1→R
:If K=75
:1→θ
:If K=65
:0→θ
:If K=25
:Then
:Pt-Off(X,C)
:C+1→C
:End
:If K=34
:Then
:Pt-Off(X,C)
:C-1→C
:End
:If K=24
:Then
:Pt-Off(X,C)
:X-1→X
:End
:If K=26
:Then
:Pt-Off(X,C)
:X+1→X
:End
:If K=22
:Then
:ClrDraw
:Goto A
:End
:If K=105
:Then
:Pt-Off(X,C)
:StorePic 5
:Goto A
:End
:ClrDraw
:End
:End
:Lbl OP
:Menu(" CHOOSE ","LOAD",LD,"SAVE",SV,"CLEAR",CL,"BACK",BK)
:Lbl BK
:Goto A
:Lbl LD
:Menu(" RecallPic ",Str2,Z,Str3,Y,Str4,X,Str5,W,"BACK",OP)
:Lbl Z
:ClrDraw
:RecallPic 1
:StorePic 5
:Goto VI
:Lbl Y
:ClrDraw
:RecallPic 2
:StorePic 5
:Goto VI
:Lbl X
:ClrDraw
:RecallPic 3
:StorePic 5
:Goto VI
:Lbl W
:ClrDraw
:RecallPic 4
:StorePic 5
:Goto VI
:Lbl VI
:RecallPic 5
:Repeat getKey
:End
:Goto A
:Lbl SV
:Menu(" StorePic ",Str2,1,Str3,2,Str4,3,Str5,4,"BACK",OP)
:Lbl 1
:RecallPic 5
:StorePic 1
:ClrHome
:Input "NAME:",Str2
:
:Goto A
:Lbl 2
:RecallPic 5
:StorePic 2
:ClrHome
:Input "NAME:",Str3
:Goto A
:Lbl 3
:RecallPic 5
:StorePic 3
:ClrHome
:Input "NAME:",Str4
:Goto A
:Lbl 4
:RecallPic 5
:StorePic 4
:ClrHome
:Input "NAME:",Str5
:Goto A
:RecallPic 5
:StorePic 4
:Goto A
:Lbl EX
:ClrDraw
:ClrHome
:AxesOn
:FnOn
:Output(1,1,"
:Stop
:Lbl TX
:ClrHome
:Input "TEXT:",Str1
:0→θ
:27→C
:33→X
:Lbl HT
:ClrDraw
:RecallPic 5
:0→Z
:0→K
:0→U
:0→T
:0→Y
:While Z=0
:RecallPic 5
:If θ=0
:Text(C,X,Str1)
:If θ=1
:Text(‾1,C,X,Str1)
:getKey→K
:If K>0
:Then
:If K=95
:1→θ
:If K=85
:0→θ
:If K=22
:Then
:ClrDraw
:Goto A
:End
:If K=82
:1→X
:If K=84
:90→X
:If K=73
:1→C
:If K=93
:55→C
:If K=25
:C-2→C
:If K=34
:C+2→C
:If K=24
:X-2→X
:If K=26
:X+2→X
:If K=75
:Goto VT
:If K=105
:Then
:Z+1→Z
:StorePic 5
:End
:ClrDraw
:End
:End
:Goto A
:Lbl VL
:0→Xmin
:‾62→Ymin
:94→Xmax
:0→YMax
:‾20→C
:42→X
:‾42→Z
:0→V
:While V=0
:RecallPic 5
:Line(X,C,X,Z)
:getKey→K
:If K>0
:Then
:If K=22
:Then
:ClrDraw
:ZStandard
:ZSquare
:Goto A
:End
:If K=85
:Then
:C-1→C
:Z+1→Z
:End
:If K=24
:X-1→X
:If K=26
:X+1→X
:If K=95
:Then
:C+1→C
:Z-1→Z
:End
:If K=25
:Then
:C+1→C
:Z+1→Z
:End
:If K=34
:Then
:C-1→C
:Z-1→Z
:End
:If K=105
:Then
:V+1→V
:StorePic 5
:ZStandard
:ZSquare
:End
:ClrDraw
:End
:End
:Goto A
:Lbl HL
:0→Xmin
:94→Xmax
:‾62→Ymin
:0→YMax
:33→A
:63→Z
:‾31→Y
:0→V
:‾31→C
:While V=0
:RecallPic 5
:Line(A,C,Z,C)
:getKey→K
:If K>0
:Then
:If K=22
:Then
:ClrDraw
:ZStandard
:ZSquare
:Goto A
:End
:If K=25
:C+1→C
:If K=34
:C-1→C
:If K=85
:Then
:A+1→A
:Z-1→Z
:End
:If K=95
:Then
:A-1→A
:Z+1→Z
:End
:If K=24
:Then
:X-1→X
:Z-1→Z
:End
:If K=26
:Then
:A+1→A
:Z+1→Z
:End
:If K=105
:Then
:V+1→V
:StorePic 5
:ZStandard
:ZSquare
:End
:ClrDraw
:End
:End
:Goto A
:Lbl CL
:ClrDraw
:StorePic 5
:Goto A
:Lbl VT
:ClrDraw
:RecallPic 5
:1→L
:0→Z
:0→K
:While Z=0
:C→I
:length(Str1)→W
:1→Y
:If L=1
:Then
:RecallPic 5
:While Y≤W
:If θ=0
:Then
:Text(I,X,sub(Str1,Y,1))
:I+7→I
:End
:If θ=1
:Then
:Text(‾1,I,X,sub(Str1,Y,1))
:I+9→I
:End
:Y+1→Y
:End
:0→L
:End
:getKey→K
:If K>0
:Then
:If K=25
:Then
:C-1→C
:1→L
:End
:If K=34
:Then
:C+1→C
:1→L
:End
:If K=24
:Then
:X-1→X
:1→L
:End
:If K=26
:Then
:X+1→X
:1→L
:End
:If K=82
:Then
:1→X
:1→L
:End
:If K=84
:Then
:90→X
:1→L
:End
:If K=73
:Then
:1→C
:1→L
:End
:If K=105
:Then
:StorePic 5
:Goto A
:End
:If K=22
:Then
:ClrDraw
:Goto A
:End
:If K=75
:Goto HT
:If K=95
:Then
:1→θ
:1→L
:End
:If K=85
:Then
:0→θ
:1→L
:End
:ClrDraw
:1→L
:End
:End
Generated by SourceCoder, © 2005 Cemetech
It looks nice from the screenshots. I'm going to download it right now and check back with you in a bit.
Sorry if I've missed some things. I've ran it through source coder multiple times and I guess I thrown some bad/useless code in there. Thanks for the quick replies btw!
Lines like these:


Code:
:If K=22
:Then
:ClrDraw
:ZStandard
:ZSquare
:Goto A
:End


Have got to go. They slow your program down over time. Everytime you start an If...Then statement you have to end it, you can't put a goto in between. Also I noticed your readme said ti was for Ti-83. Did you write it on an 83? As I understand it, two character labels aren't allowed in the 83. They're allowed in 83+ but not in 83.
Just stuff like
Code:
:If K=25
:C+1→C
:If K=34
:C-1→C
:If K=85
:Then
:A+1→A
:Z-1→Z
:End
:If K=95
:Then
:A-1→A
:Z+1→Z
:End
:If K=24
:Then
:X-1→X
:Z-1→Z
:End
:If K=26
:Then
:A+1→A
:Z+1→Z
:End

Which could be collapsed into a conditional statement.
The program also gives me plenty of error:undefined errors. It tried to recall pic 5 when there isn't a pic 5.
something1990 wrote:
The program also gives me plenty of error:undefined errors. It tried to recall pic 5 when there isn't a pic 5.

Hmm...I am guessing that is because you don't have a pic5? Is there any wa y to solve this?
You need to add whatever you used as Pic5 into the zip.
You can also do this at the beginning of your program:


Code:
:ClrDraw
:AxesOff
:PlotsOff
:FnOff
:GridOff
:ExprOff
:CoordOff
:StorePic 5

So the program can make its own Pic 5
true, and with a little work, ALL the labels could be eliminated
Most of you know by now that I'm a newbie. BPC DDR will rely HEAVILY on labels, unless I find a replacement. So, can someone please tell me what is better than using:


Code:
If (whatever)
Then
Goto 9 etc.
birdmanx35 wrote:
Most of you know by now that I'm a newbie. BPC DDR will rely HEAVILY on labels, unless I find a replacement. So, can someone please tell me what is better than using:


Code:
If (whatever)
Then
Goto 9 etc.


re-code it so label's aren't used

a game can, under absolutely no conditions, use any more than a few labels, and NONE can be in the game loop. It's just too slow (not just the memory leaks it creates, but also that a goto jump itself is slow)
Thanks for your help Kllrnohj. If someone could provide an example of a program with labels, and how to translate it to good code, that would be great.
birdmanx35 wrote:
Thanks for your help Kllrnohj. If someone could provide an example of a program with labels, and how to translate it to good code, that would be great.


eh, it would be much easier if you posted your code with lables and asked for help removing them....

some general ideas: use while's instead of looping gotos. Put code that needs to be repeated on a condition in another program and call that, and have the program return when done
birdmanx35 wrote:
Most of you know by now that I'm a newbie. BPC DDR will rely HEAVILY on labels, unless I find a replacement. So, can someone please tell me what is better than using:


Code:
If (whatever)
Then
Goto 9 etc.
...and people wonder why I got upset. Laughing
LOL Yeah I suppose if you do go around saying things like I will rely heavily on labels then hostility is expected.
@Birdman You should use labels only when absolutely necessary, and even then try to conceive some other method before deciding on using labels/gotos. If you had a sufficient understanding of how loops worked, then you wouldn't need to request code showing what is better than labels.
Yup, I'm still at n00b level. I don't think I'll ask questions here again. Sorry Kerm, it's much too unwelcoming.
birdmanx35 wrote:
Yup, I'm still at n00b level. I don't think I'll ask questions here again. Sorry Kerm, it's much too unwelcoming.

Well if you want to leave, then that is your choice. But know this, there are very experienced programmers here and they will provide great answers, provided you have tried to find the answer yourself first. If you went to the link provided in the thread "How to ask questions the smart way" you will see the reason for the hostility. It's preety obvious you haven't sought a method to deviate from labels/gotos, so we will put in the same amount of effort in answering your questions. That's my two cents.
birdmanx35 wrote:
Yup, I'm still at n00b level. I don't think I'll ask questions here again. Sorry Kerm, it's much too unwelcoming.
You're quite the politician. I don't think you really understand techie/hacker/1337/nerd culture yet, and it's really grating on my nerves. Please stop acting so cocky.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement