-
Notifications
You must be signed in to change notification settings - Fork 0
Classes
WhiteSpike edited this page May 5, 2024
·
4 revisions
- Most basic application to insert on the terminal
- Basically a fancy window to appear in the terminal
- Doesn't allow player interaction, they can only exit out of it
- Basic application where the player can go through its listed options through their keybind configurations
- Selected option will appear with a different font and background compared to non-selected options
- The player can execute a prompt when pressing the respective keybind (enter by default) which executes the respective
Action
associated to that option
- Application that allows moving through different screens (labelled pages) with same list of options.
- A page counter will appear at the bottom of the screen saying which screen they are currently located at.
- The player can change between screens through the respective keybinds ('a' and 'd' keys respectively)
- Application where each entry has a counter which you can increment or decrement through respective keybinds ('a' and 'd' keys respectively)
- Same functionalities as
InteractiveTerminalApplication
- An entry in the screen in which the player can select to execute.
-
-
Name
: Name of the option displayed in the screen -
Description
: Text to appear below the option displayed in the screen -
Action
: Code to be executed when the player decides to submit this option -
Active
: Boolean function which tells the element wether it's active or not -
SelectInactive
: Boolean value which allows the element being selected even while inactive
-
- Same functionalities as
CursorElement
but stores a counter.
- Manager of
CursorElement
to know which one is selected or not. -
-
cursorCharacter
: What character to appear before the selected text -
cursorIndex
: Current picked option displayed in the screen -
elements
: List of options displayed in the screen
-
- Same functionalities as
CursorMenu
but managesCursorCounterElement
- An entry where the player can switch between its screens
-
-
pageIndex
: Current selected screen to display to the player -
elements
: List of screens the player can switch between
-
- An entry where the player can switch between its screens and they are interactable
-
-
cursorMenus
: List of managers ofCursorElement
of the each screen
-
- Typical screen that shows:
- A title on top left of the terminal
- Surrounds the relevant text in a box-like manner to make it seem it's an application being open
- Same functionalities as
BoxedScreen
- Shows on the bottom right an output configured by the developer when creating the screen
- Stores
Input
which you select what will be the input that affects the output in the screen and then theOutput
which handles the logic of what to print based on the input you provided.
- An interface to represent a screen
- An interface for all components displayed in the terminal (screen, options, etc.)
-
-
GetText(int availableLength)
: method which returns a string to be displayed in the terminal-
availableLength
is how many character space you have left to fill a line
-
-
- Responsible to make applications to appear in the terminal when prompted to.
- Relevant methods:
-
RegisterApplication<T>(string command) where T : TerminalApplication, new()
: method where you register your own custom application (where you specify through T) to appear on provided text prompt when typed in the terminal -
RegisterApplication<T>(string[] commands) where T : TerminalApplication, new()
: method where you register your own custom application (where you specify through T) to appear on provided text prompts when typed in the terminal
-