Join us on Discord!
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 2 Guests 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

SopaXorzTaker



http://sc.cemetech.net/?hash=DxaLZE3oe+a3YgRYQ8mQA148UdXZ

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).
  • Calculators owned: TI-84+CE, TI-82, fx-991ES

123outerme

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?
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

SopaXorzTaker

#2
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.
  • Calculators owned: TI-84+CE, TI-82, fx-991ES

ben_g

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.

kotu

#4
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??


*edit*
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
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3
SUBSCRIBE TO THE FUTURERAVE.UK MAILING LIST
http://futurerave.uk

Dream of Omnimaga

For a CE version, you can probably make some fancy borders via a for loop that generates gradient borders.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

kotu

Well, it's possible I guess, but gradients can be dodgy even with 24-bit color, so might be a waste of palette
  • Calculators owned: TI 84+CE-T
  • Consoles, mobile devices and vintage computers owned: Sega Master System, Sony PlayStation 3
SUBSCRIBE TO THE FUTURERAVE.UK MAILING LIST
http://futurerave.uk

Powered by EzPortal