Giter Club home page Giter Club logo

tui's Introduction

TUI

Simple TUI library for CMM2

FUNCTION TUImenu(menu() AS STRING) AS INTEGER
Open menu on top of the screen, let user select (arrows/ENTER) or escape (BLIT #10+#11) returns either selected menu item (selected column*100+row) or -1 as escape
m(0)="MAIN MENU 0,Submenu 01,Submenu 02,...,Submenu 0r)"
...
m(c)="MAIN MENU r,Submenu c1,Submenu c2,...,Submenu cr)"

SUB TUIinfo(title AS STRING, txt() AS STRING, logo AS INTEGER)
Shows more lines of info text (BLIT #1), also LOGO (blitnum)

FUNCTION TUIwaitingON(title AS STRING) AS STRING
Start progress, returns coordinates as string "X,Y" (BLIT #2)

SUB TUIwaitingProgress(coord AS STRING, perc AS INTEGER)
Draw progress into waiting dialog

SUB TUIwaitingOFF(coord AS STRING)
Finish progress (BLIT #2)

FUNCTION TUIchoice(title AS STRING, txt AS STRING) AS INTEGER
Select one from up to 10 choices with keys 0-9 (BLIT #3)

SUB TUIwarning(title AS STRING, txt AS STRING)
Simple warning, wait for any key (BLIT #4)

FUNCTION TUIquestion(title AS STRING, txt AS STRING) AS INTEGER
Question, returns 1 when OK (ENTER) was pressed, 0 else (BLIT #5)

FUNCTION TUIinput(title AS STRING, txt AS STRING, def AS STRING, en AS STRING) AS STRING
Input string, returns text
HOME to begin, END to end, CRSR left + right
SHIFT+DEL erase all, BACKSPACE 1 char left, DEL 1 char right, ENTER to finish (BLIT #6)

FUNCTION TUIselect(title AS STRING, txt AS STRING, s AS INTEGER) AS INTEGER
Selection checkbox, can select up to 10 choices with keys 0-9 (BLIT #7)

FUNCTION TUIgetItem(title AS STRING, subtitle AS STRING, txt() AS STRING) AS STRING
Shows more lines of text (BLIT #8) and let the user select one

FUNCTION TUIgetParent(s AS STRING) AS STRING
helper for file selector

FUNCTION TUIgetSelect(path AS STRING, ext AS STRING) AS STRING
once-shot file selector
ext can be also more extensiions separated by coma (ext = ".BAS,.INC") or "" (select all)

FUNCTION TUIfileSelect(path AS STRING, ext AS STRING, root AS STRING) AS STRING
(almost) complete file selector
ext can be also more extensiions separated by coma (ext = ".BAS,.INC") or "" (select all)
when root<>"", then it's used as highest possible level for going UP and for ROOT

FUNCTION TUIemptyON(title AS STRING, ww AS INTEGER, hh AS INTEGER, but AS STRING) AS STRING
Shows empty dialog (space), returns coordinates as string "X,Y" (BLIT #9)
if but is used, then is show instead of "OK"

SUB TUIemptyOFF(coord AS STRING)
Close empty (BLIT #9)

SUB TUIwaitForKey
SUB TUIwaitForNoKey
waits for key or until no key pressed

v0.50

added function TUImenu

v0.46

added optional root parameter to TUIfileSelect

v0.45

TUIchoice now returns 0-x, -13 (ENTER) or -27 (ESC), used for Napoleon Commander
small bugfix

v0.43

added missing AtariST.FNT
improved description

v0.30

TUIinput massive improvements (cursor)
TUIemptyON/OFF added

tui's People

Contributors

jirsoft avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.