Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: thydowulays on December 24, 2011, 12:56:21 pm

Title: Axe TextBox input?
Post by: thydowulays on December 24, 2011, 12:56:21 pm
Hey omnimaga, I am working on a GUI library atm, and I want to add a TextBox feature to it. This would be very useful because people could use this feature for their programs, and the Axe input function isn't exactly perfect. So I want to make it a little like the DoorsCS Text input. I already know sort of how to do it. The command to draw the TextBox would be DRTXT(Xpos,Ypos,Width,Enabledornot) I would have a gray line at Xpos+1, so it would be the cursor, like in DoorsCS's TextBox. So anyway, I would use a variable that would represent where the cursor would be (it would start at Xpos+1). Now everytime someone would press an alphabet key, the variable would go up 4 pixels, and the cursor would move. Then I would use a Text(CursorVariable, Ypos+1, "whateveralphabetkeyletteritsassignedto") at that position. When all this works out, I would have a working textbox that people could type in. However, does anyone know how I could make a string out of their text? I can't figure it out at all. Thanks :)
Title: Re: Axe TextBox input?
Post by: saintrunner on December 24, 2011, 01:45:40 pm
->str1 ??
Title: Re: Axe TextBox input?
Post by: epic7 on December 24, 2011, 01:55:25 pm
Do you want to know how to input text in an axe program?

If so, try this routine (http://ourl.ca/4129/122465)
Title: Re: Axe TextBox input?
Post by: LincolnB on December 24, 2011, 03:18:52 pm
Hm, I wrote an input routine, once... you called the routine like so - Input(r1,r2,r3) where r1,r2 was the X,Y coordinate of where the routine was to be located, and r3 was a flag - 1 meant it was a text input, and 0 meant it was a numeric input. It returned a pointer to the string, or the number that was inputted.
Title: Re: Axe TextBox input?
Post by: thydowulays on December 24, 2011, 11:27:31 pm
Thank you so much, ily. No homo.