CMM2 - simple TUI library


Author Message
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 507
Posted: 06:02pm 11 Dec 2020      

Hi,
after modification of my TUI library now can be changed the font and colors. So maybe is usable also for somebody else then me, is on GitHub here.
It consists mainly from simple dialogs, but there is also file selector. In the file LIB_TEST.BAS are shown functions of the library and it's also commented/

Few screenshots:










 
Enjoy!

yock1960
Senior Member

Joined: 18/08/2020
Location: United States
Posts: 162
Posted: 08:36am 12 Dec 2020      

Thanks Jiri! I'm sure I'll find a use for this at some point.

Steve

jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 507
Posted: 05:29pm 13 Dec 2020      

Some news:
massive improvements of TUIinput (cursor keys)
TUIgetSelect and TUIfileSelect can use more extensions separated by comma:
      TUIfileelect(path, "BAS,INC") will allow to select FILEs ending with BAS or INC
added TUIempty ON/OFF for free dialog

Enjoy!

jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 507
Posted: 11:06pm 13 Dec 2020      

Improved TUIinput, right now you can use:
shift DEL = erase all
DEL = erase right
BACKSPACE = erase left
CURSOR left and right
ENTER = input OK
ESC = cancel

jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 507
Posted: 12:21pm 07 Nov 2021      

Hi all,
because of one my project, I have extended TUI.INC's TUIfileSelect(path AS STRING, ext AS STRING, root AS STRING) AS STRING for optional root parameter. When is not present (or =""), then nothing happens, else is this used as root directory for <ROOT> and <UP> menu (also it make sense to set path on call to >=root).

Enjoy!

Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 1055
Posted: 10:41am 08 Nov 2021      

Hi Jiri,

Thanks for creating this. Saves a lot of work if I have to do this for every project again, and again...

Volhout

jwettroth

Regular Member

Joined: 02/08/2011
Location: United States
Posts: 42
Posted: 04:14am 18 Nov 2021      

I'll have to try this!  Nice work.  It reminds me of the Zinc libraries for Borland C many moons ago.  I really like that kind of lightweight interface.

John

danielkos
Newbie

Joined: 10/07/2021
Location: Australia
Posts: 23
Posted: 06:09am 22 Nov 2021      

In the past I've thought about writing a firmware setup utility (a front end for all the OPTION commands that you normally need to look up in the manual). This could be an awesome library for that kind of thing!

jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 507
Posted: 09:40pm 04 Dec 2021      

Hi all TUI library  users,
I have updated it to v0.50, added is simple menu system:
1.prepare the menu items
DIM STRING menu(4)
menu(0) ="FORE COLOR,Gray,Black,Green,Red"
menu(1) ="BACKGROUND,Yellow,White,Blue"
menu(2) ="INPUT,Cyan,Magenta"
menu(3) ="FONT,Font 8 (8x16),Font 1 (8x12),Font 4 (10x16),Font 7 (6x8)"
menu(4) ="EXIT menu test"


2. call the function
DIM INTEGER m = TUImenu(menu())


3. in return variable you will have 100*column + row
(so you can use max 100 columns menu with every item up to 99 rows)



I have also updated the LIB_TEST.BAS, so you can play with the example menu a little bit...

Enjoy!