* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Poll

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

Author Topic: GTKALK, a primitive GUI library!  (Read 490 times)

0 Members and 1 Guest are viewing this topic.

Online SopaXorzTaker

  • Full User
  • Join Date: Sep 2016
  • Location:
  • Posts: 22
  • Post Rating Ratio: +3/-0
  • I like electronics.
    • @SopaXorzTaker
    • /u/SopaXorzTaker
    • SopaXorzTaker
  • Gender: Male
GTKALK, a primitive GUI library!
« on: August 23, 2017, 11:13:34 am »


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).
« Last Edit: August 23, 2017, 02:07:16 pm by SopaXorzTaker »


  • Calculators owned: TI-84+CE, TI-82, fx-991ES

Offline 123outerme

  • Super User
  • Join Date: Jan 2015
  • Location: In spaaace! Well, the Earth is anyhow.
  • Posts: 676
  • Post Rating Ratio: +6/-0
  • Professional Unpaid Intern
    • 123outerme
    • 113/11355
  • Gender: Male
Re: GTKALK, a primitive GUI library!
« Reply #1 on: August 23, 2017, 02:16:05 pm »
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

Online SopaXorzTaker

  • Full User
  • Join Date: Sep 2016
  • Location:
  • Posts: 22
  • Post Rating Ratio: +3/-0
  • I like electronics.
    • @SopaXorzTaker
    • /u/SopaXorzTaker
    • SopaXorzTaker
  • Gender: Male
Re: GTKALK, a primitive GUI library!
« Reply #2 on: August 23, 2017, 02:22:43 pm »
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.
« Last Edit: August 23, 2017, 02:32:32 pm by SopaXorzTaker »
  • Calculators owned: TI-84+CE, TI-82, fx-991ES

Offline ben_g

  • Full User
  • Safe-haven access
  • Join Date: Dec 2014
  • Location:
  • Posts: 167
  • Post Rating Ratio: +12/-0
Re: GTKALK, a primitive GUI library!
« Reply #3 on: August 23, 2017, 06:23:41 pm »
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.

Offline kotu

  • -< \'V/,,,
  • Super User
  • Join Date: Aug 2016
  • Location: don't panic
  • Posts: 1160
  • Post Rating Ratio: +7/-11
  • woah
    • dj_kotu
    • @UCAy2ZF4hbc08iStnTn6jgxQ
    • rowanmedhurst
    • @romanov-psyco
    • futurerave.uk
  • Gender: Male
Re: GTKALK, a primitive GUI library!
« Reply #4 on: August 24, 2017, 05:49:24 am »
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
« Last Edit: August 24, 2017, 05:54:48 am by kotu »
  • 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

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18912
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: GTKALK, a primitive GUI library!
« Reply #5 on: August 26, 2017, 04:12:30 pm »
For a CE version, you can probably make some fancy borders via a for loop that generates gradient borders.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline kotu

  • -< \'V/,,,
  • Super User
  • Join Date: Aug 2016
  • Location: don't panic
  • Posts: 1160
  • Post Rating Ratio: +7/-11
  • woah
    • dj_kotu
    • @UCAy2ZF4hbc08iStnTn6jgxQ
    • rowanmedhurst
    • @romanov-psyco
    • futurerave.uk
  • Gender: Male
Re: GTKALK, a primitive GUI library!
« Reply #6 on: August 31, 2017, 03:36:43 pm »
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

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games