Skip to content

Releases: pinam45/ConsoleControl

0.2

23 May 20:58
Compare
Choose a tag to compare

Improvements

  • cc_drawRectangle bug fix
  • Data validity check added to UI functions
  • Menu functions now turn off the cursor visibility
  • New key sequences for home and end keys were added for Linux

New features

Basic features

  • set the cursor visibility
  • enable / disable inputs display

UI elements

  • Options menu
    • With title
    • Allow to set values of different options
      • Multiple choices options
      • Integer options (within a min and a max value)
      • Character options (within a min and a max value)
    • Default values
    • Configurable exit / validate text
    • Store if escape key was used to exit (can be used to save only on user validation)
  • Messages
    • With or without title
    • Display a message (multiple lines support)
    • 3 possible choices for the user to choose between can be set
      • left
      • middle
      • right
    • Configurable behavior on escape key input
      • No effect
      • Exit without choosing

New examples

  • New basic examples
  • Examples for UI features.

0.1

27 Apr 20:55
Compare
Choose a tag to compare
0.1

Features

Basic features

  • set background / foreground color
  • set and move the cursor position
  • get console width / height
  • save / restore cursor position
  • position check functions
  • clean the screen / the complete console
  • non-blocking getchar
  • inputs API
    • recognize special keys
    • check if an input is waiting
    • get input (key + char)

The library recognize the following keys:
Home, End, Page up, Page down, Up arrow, Down arrow, Left arrow, Right arrow, Backspace, Tab, Enter / Carriage return, Escape, Space / Space bar, Insert, Delete, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12

When a key is recognized, it is given with the associated char, if the key is not recognized, only the char is given (same behaviour as getchar)

Shapes

The library provide function to draw:

  • lines (simple char or pattern string)
  • rectangles
  • full rectangles
  • circles

The lines and rectangles have special functions to print tables using

  • - for horizontal lines
  • | for vertical lines
  • + for intersections

UI elements

Each element is available in a table style and with colors:

  • Multiple choices menu
    • Allow to choose an option from a string array
    • Default choice
    • Configurable behavior on escape key input