Author |
Message |
|
TI-newb
Member
Joined: 24 Dec 2008 Posts: 158
|
Posted: 19 Apr 2009 09:29:01 am Post subject: |
|
|
I have had several ideas of making a PhoneBook, but i could never quite get it right, so now i will use the things ive learned from Phonebook, into a Graph Menu.
For this Menu, i have almost all of it done, but we can make different versions.
The menu ive made so far can be inputted into another program. It uses Str9 to Store what it displays and L6 to tell me where in the string to take the words out.
this is what i got so far, but the Selection part isn't done(like.. the part where u select the option).
Im using ATTACKDEFENDHEAL, in the string as an Example, as this is still in its early stages.
The List works by inputting the the Length of your word.
Btw, i want it so i can Insert this program into another. and the Str9 and L1 will be inputted on the main program. (if it doesn't make any sence tell me)
Code: "ATTACKDEFENDHEAL->Str9
{1,6,6,4->L1
(dim(L1)-1->F
0->E
For(A,1,F
A->C
C+1->D
(L1)+E->E
Text(8A,5,sub(Str1,E,L1(D)
End
Last edited by Guest on 19 Apr 2009 09:30:00 am; edited 1 time in total |
|
Back to top |
|
|
Raylin
Newbie
Joined: 05 May 2008 Posts: 15
|
Posted: 20 Apr 2009 05:35:13 am Post subject: |
|
|
Simpler way to do this.
"_____ATTACKDEFENDHEAL__->Str9 //5 spaces at the beginning, 2 spaces at the end
3->B
For(A,1,B
Text(8A,5,sub(Str9,6A,6
End
Not tested but should work.
Explanation can be given if needed. |
|
Back to top |
|
|
darkstone knight
Advanced Member
Joined: 07 Sep 2008 Posts: 438
|
Posted: 20 Apr 2009 01:52:50 pm Post subject: |
|
|
mh...
"attackdefendheal__"
for(a,0,2
text(6A,5,sub(ans,6A+1,6
end
0->x
repeat ans=105
text(6X,0,"_
x+(ans=34)(x<2)-(ans=25)not(x->X
text(6X,0,">
repeat ans
getkey
end
end
how about that?
again, not tested, im lazy
Last edited by Guest on 11 Jul 2010 05:48:08 pm; edited 1 time in total |
|
Back to top |
|
|
Galandros
Active Member
Joined: 29 Aug 2008 Posts: 565
|
Posted: 20 Apr 2009 02:13:15 pm Post subject: |
|
|
I did some graph screen menus but they were hard coded...
You can get inspiration here
Making a menu and some different versions of it could be cool. Maybe when I have really nothing to do. (summer)
Last edited by Guest on 20 Apr 2009 02:15:44 pm; edited 1 time in total |
|
Back to top |
|
|
TI-newb
Member
Joined: 24 Dec 2008 Posts: 158
|
Posted: 21 Apr 2009 10:59:53 pm Post subject: |
|
|
cool! * i didn't test yours but i see some logic i guess.. anyways i finished the graph menu i wantedXDDDDD
Somehow it won't let me bring up CODEBOX... i'l just type it down.
ClrDraw
Text(1,1,"Select:"
Repeat B=105
0->A
For(B,1,dim(L1)-1
L1(B)+A->A
Text(8A,15,sub(Str1,A,L1(B+1)
End
1->A
Repeat B=105
getkey->B
Text(8A,1,"0"
If Ans
Then
Text(8A,1,"(5 spaces)"
((B=34)-(B=25))+A->A
If A<1:1->A
If A(Equalto or >)(A<6)(dim(L1)):dim(L1)-1->A
End
End
ClrDraw
Delvar B
I managed to only use 2 variables (unless Ans counts as one)
To make it work, just put down some words onto string and then place the number of characters in each word into a list.
for Example, "AttackDefendHealRun->Str1
btw, you have to start the list with a 1... {1,6,6,4,3->L1
then run the program. and it should work.
Tell me if u can Optimize this any further.
btw Variable A is which option you chose. For example. Attack and Heal, if you chose heal A would = 2. try it out.
Last edited by Guest on 21 Apr 2009 11:14:52 pm; edited 1 time in total |
|
Back to top |
|
|
TI-newb
Member
Joined: 24 Dec 2008 Posts: 158
|
Posted: 21 Apr 2009 11:04:51 pm Post subject: |
|
|
Raylin wrote: Simpler way to do this.
"_____ATTACKDEFENDHEAL__->Str9 //5 spaces at the beginning, 2 spaces at the end
3->B
For(A,1,B
Text(8A,5,sub(Str9,6A,6
End
Not tested but should work.
Explanation can be given if needed.
Btw dude, you know the Function Menu(. i'm basically making one of those except on the graph. so the contents or characters may change and thats why i have to use Strings and Lists. for example if i wanted to uhh display Start and Quit at the beginning of my program
"STARTQUIT->Str1
{1,5,4->L1
(Run program) Menu (this is the program that i just posted up)
Galandros, i like the programs you have xD. they're pretty cool. (i think i should make some of those)
Last edited by Guest on 21 Apr 2009 11:12:23 pm; edited 1 time in total |
|
Back to top |
|
|
thebetter1
Advanced Newbie
Joined: 09 Jul 2008 Posts: 86
|
Posted: 22 Apr 2009 09:16:36 pm Post subject: |
|
|
You guys could also scrap the list completely and put that data straight into the string. For example:
ATTACKsin(DEFENDsin(HEAL
Then just use inString( to separate the words. |
|
Back to top |
|
|
|