The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

[ti-84+] GTKALK, a primitive GUI library!

Started by SopaXorzTaker, August 23, 2017, 11:13:34 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Should I add an input control in the next version? If so, how?

The input control should work like the Input Str1 command is in TI-BASIC (like the default keyboard).
4 (80%)
The input control should work like an old phone, with the number keys repeatedly pressed for various letters.
0 (0%)
Other, I'll describe below.
0 (0%)
Don't add an input control.
1 (20%)

Total Members Voted: 5


August 23, 2017, 11:13:34 am Last Edit: August 23, 2017, 02:07:16 pm by SopaXorzTaker

So basically, GTKALK is my attempt at writing a simple and lightweight GUI library in TI-BASIC.
It's pretty simple, doesn't support the color calculators yet, but I think you guys might find it interesting ;).

Program GTKEX0 is a simple demo of all features so far.
GTKEX1 is a more sophisticated one, showing multiple buttons and stuff.

(move the cursor with arrow keys and use ENTER to click - the Input command is used to handle the cursor)
To exit GTKEX1, just click on the button that says X (obviously).
Please, try it and tell me what do you think  :).
Again, don't expect full-blown Qt running on your calculator.

You can use the code for any purposes, just consider giving credit (optional).


Wow, that's looking good! It seems to run pretty fast, and I assume buttons can have custom behavior, so I'd love to see it used some day for a game menu or battle screen! Do you have any projects in mind for this?


August 23, 2017, 02:22:43 pm #2 Last Edit: August 23, 2017, 02:32:32 pm by SopaXorzTaker
Initially I wanted to write some sort of a Logisim clone, and the idea to write that came up.
It's really primitive, and the program has to handle redrawing of windows, etc (see the source code of GTKEX0/1).
You can even write custom controls for it, the calling convention is really simple and described in the comments.

The code of GTKEX0 (on Cemetech) is commented (and comments aren't preserved in the tokenized version attached), you can read it to understand how the library works.

I am also planning to port it to 84+CE, with colors and stuff.


I'd personally use the "CoordOff" instruction before the input to hide the coordinates at the bottom, but apart from that it looks pretty good.


August 24, 2017, 05:49:24 am #4 Last Edit: August 24, 2017, 05:54:48 am by kotu
This looks really beautiful, reminds me of when I used to make GUI programs in ASCII on my CGA XT with QuickBASIC.

Can't wait to see a colour version!! Will it be in C or TI-BASIC??

BTW I voted not to add a input control - yet - that might actually be quite tricky - with such things as do you scroll the contents of the control to the left if you use up all the space?
I'd rather see it in colour first - but I am biased  :D

DJ Omnimaga

For a CE version, you can probably make some fancy borders via a for loop that generates gradient borders.


Well, it's possible I guess, but gradients can be dodgy even with 24-bit color, so might be a waste of palette

Powered by EzPortal