I was interested in seeing what could be done with the graph screen, and I started to learn some of the commands. I started out with learning how to graph a basic cursor:

Code:

Pxl-Change(B,A
Pxl-Change(B+1,A
Pxl-Change(B+2,A
Pxl-Change(B+3,A
Pxl-Change(B+4,A
Pxl-Change(B+5,A
Pxl-Change(B+6,A
Pxl-Change(B+7,A
Pxl-Change(B+8,A
Pxl-Change(B+9,A
Pxl-Change(B+10,A
Pxl-Change(B+11,A
Pxl-Change(B+11,A+1
Pxl-Change(B,A+1
Pxl-Change(B+2,A+3
Pxl-Change(B+4,A+5
Pxl-Change(B+6,A+7
Pxl-Change(B+7,A+6
Pxl-Change(B+7,A+7
Pxl-Change(B+8,A+5
Pxl-Change(B+9,A+5
Pxl-Change(B+10,A+6
Pxl-Change(B+10,A+7
Pxl-Change(B+11,A+7
Pxl-Change(B+12,A+7
Pxl-Change(B+13,A+7
Pxl-Change(B+13,A+6
Pxl-Change(B+13,A+5
Pxl-Change(B+13,A+4
Pxl-Change(B+12,A+4
Pxl-Change(B+11,A+4
Pxl-Change(B+10,A+4
Pxl-Change(B+9,A+3
Pxl-Change(B+1,A+2
Pxl-Change(B+3,A+4
Pxl-Change(B+5,A+6
Pxl-Change(B+10,A+2

Then, using Kerm's book on coding, I made a program that allows the user to move the cursor around the graph screen. (I still need to finish optomizing it for ti 84 plus CE)

Code:

120->A:80->B
AxesOff:ClrDraw
Repeat K=45
   prgmCURSOR1
   Repeat K
      getKey->K
   End
   prgmCURSOR1
   If K=24 and A>5
   A-4->A
   If K=26 and A<250
   A+4->A
   If K=25 and B>4
   B-4->B
   If K=35 and B<200
   B+4->B
End
AxesOn

What I want to do now, is have different icons that represent different programs I have made. Then you could move the cursor over, hit enter, and then it would run the program. I think I will just make more subprograms that draw each one of the icons for my programs, but I don't know how to have it check to see if the cursor is over one of the program icons.
Very nice! Btw, you can significantly optimize your CURSOR1 program, if you just use some For( loops:

Code:

For(I,0,11
Pxl-Change(B+I,A
End
Pxl-Change(B+11,A+1
For(I,0,6,2
Pxl-Change(B+I,A+I+1
End

//I cant really find a pattern with the rest of it
Pxl-Change(B+7,A+6
Pxl-Change(B+7,A+7
Pxl-Change(B+8,A+5
Pxl-Change(B+9,A+5
Pxl-Change(B+10,A+6
Pxl-Change(B+10,A+7
Pxl-Change(B+11,A+7
Pxl-Change(B+12,A+7
Pxl-Change(B+13,A+7
Pxl-Change(B+13,A+6
Pxl-Change(B+13,A+5
Pxl-Change(B+13,A+4
Pxl-Change(B+12,A+4
Pxl-Change(B+11,A+4
Pxl-Change(B+10,A+4
Pxl-Change(B+9,A+3
Pxl-Change(B+1,A+2
Pxl-Change(B+3,A+4
Pxl-Change(B+5,A+6
Pxl-Change(B+10,A+2


And also:

Code:

A+4((K=26)(A<250)-(K=24)(A>5))->A
B+4((K=35)(B<200)-(K=25)(B>4))->B
Yah, I realized the power of loops when making my factorial icon

Code:

ClrDraw
50->C
50->D
While C<79
   Pxl-On(C,D,Black
   C+1->C
End
While D<79
   Pxl-On(C,D,Black
   D+1->D
End
While C>50
   Pxl-On(C,D,Black
   C-1->C
End
While D>50
   Pxl-On(C,D,Black
   D-1->D
End
Pxl-On(C+21,D+13,Red
Pxl-On(C+22,D+13,Red
Pxl-On(C+21,D+14,Red
Pxl-On(C+22,D+14,Red
Pxl-On(C+21,D+13,Red
69->C
63->D
While C>57
   Pxl-On(C,D,Red
   C-1->C
End
64->D
While C<69
   Pxl-On(C,D,Red
   C+1->C
End

54->D
54->C
While C<75
   Pxl-On(C,D,Black
   C+1->C
End
While D<75
   Pxl-On(C,D,Black
   D+1->D
End
While C>54
   Pxl-On(C,D,Black
   C-1->C
End
While D>54
   Pxl-On(C,D,Black
   D-1->D
End
Pause

I know that there is still more that I need to do to optimize this. I think what I am going to do is when Enter is pressed, check to see if B and A are inside of the range of the factorial icon. It still needs a lot of work, but I have made a lot of progress. Thanks for the help.

EDIT: Here is how it looks now.
https://imgur.com/Qrg36kD
So let me know if I understand. You're trying to make a basic GUI in TI-Basic for launching some of your own programs?

Just a couple things I forsee...
First of all, if someone deletes the program you're planning to launch... Perhaps use an ICE program to extract program names and store it in a string, then check that? IDK I'm just naming some thoughts.

Anyway looks really cool so-far. You could try (just as an exercise, I have no idea how hard this would be) building some other interactive GUI elements we know and love (i.e. 'windows', or just boxes you can move, check boxes, scrollbars, etc.).
  
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 1
» 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