Aptivi - Deprecated Manuals
ProjectsWebsiteBlog
Terminaux 3.x - Manual
Terminaux 3.x - Manual
  • 👋Welcome!
  • 🥛Breaking changes
    • ⬆️API v1.0
    • ⬆️API v2.0
    • ⬆️API v3.0
  • Usage
    • 💡Preface
    • 🖥️Console Tools
      • ✅Console Checker
        • ☑️Console Size Requirements
      • 🔌Console Wrapper
      • 🖊️Console Writers
      • 🌈Console Colors
      • 🖼️Color Templates
      • 📺Console Screen
      • ☎️Console Resize Listener
      • 📽️Presentation System
      • 🎚️VT Sequences
      • ➕Console Extensions
      • ⌨️Interactive TUI
    • 📖Input Reader
      • ⌨️Keybindings
      • 🔌Custom bindings
      • ✔️Reader State
      • ⚙️Reader Settings
      • 🔦Syntax Highlighting
      • 🖱️Pointer Events
      • ✍️Other Input
        • 🖊️Figlet Font Selector
        • 🎨Color Wheel
    • 🎨Color Sequences
      • ⛱️Color Model Conversions
      • 🧭Color Model Parsing
      • 🖌️Interop with System.Drawing.Color
  • Report an issue
  • Source code
  • Our projects
  • API Reference
Powered by GitBook
On this page
Edit on GitHub
  1. Usage
  2. Input Reader

Other Input

Other input...

Last updated 1 year ago

Terminaux not only provides the normal input reader with its custom bindings and its customizability, but you can also use its other input functions, such as informational boxes.

Terminaux currently provides the following input styles:

  • Choice (one line, two lines, modern, and table)

  • Info box (buttons, normal, input, password input, progress, selection, and multiple choices)

  • Selection (single choice, multiple choices)

In addition to the three styles, you can also consult the following additional and specialized styles:

The selection style contains a settings argument that you can easily make a class instance out of it, called SelectionStyleSettings. This class contains a singleton property that serves as a global settings for the selection input settings. This class currently contains the following color settings:

  • Question

  • Slider

  • Input

  • Option

  • Alternative Option

  • Selected Option

  • Disabled Option

  • Separator

  • Text

The overloads that contain a settings argument let you pass your custom settings to the current selection style invocation, while the overloads that don't contain this parameter use the global settings.

In multiple choice selections, you can press A to select all the choices. You can also press F to initiate a case-insensitive search for long choice selections to point you quickly to the desired choice.

All input choices use the InputChoiceInfo array to define the choices. Not only do they indicate choices, but they also contain some settings, such as the default selection position, default selection indicator (like a checkbox, checked or not), and disabled option.

  • ChoiceDefault: Indicates whether the choice instance is a default choice or not. All input handlers should select the first instance with this variable set to true as a default choice. Disabled choices can't be a default choice at the same time.

  • ChoiceDefaultSelected: Indicates whether this choice instance is ticked or not (as in multiple selection, such as checkboxes). Disabled choices can set this as enabled.

  • ChoiceDisabled: Indicates whether the user can not interact with this choice (select or tick it).

All input must require that at least one of the choices is enabled by default. Otherwise, an exception will be thrown.

If you want to obtain the InputChoiceInfo array, you can use the InputChoiceTools class to be able to use either a set of answers as a single string delimited by the slash character, such as Y/N/C, or an array of answers. Their titles can be optionally defined, but they will be numbered if either the answers or the titles are missing.

Below functions will help you get an array of InputChoiceInfo:

  • GetInputChoices(string AnswersStr, string[] AnswersTitles)

  • GetInputChoices(string[] Answers, string[] AnswersTitles)

You can use this output to define choices while calling the above input functions.

📖
✍️
🖊️Figlet Font Selector
🎨Color Wheel