Class MultipleTuiScreenInteractive
- Namespace
- AshConsoleGraphics.Interactive
- Assembly
- AshConsoleGraphics.dll
Screen aimed at handling having multiple interactive screens at the same time, and only controlling one
public class MultipleTuiScreenInteractive : TuiScreen, IEnumerable<TuiElement>, IEnumerable
- Inheritance
-
MultipleTuiScreenInteractive
- Implements
- Inherited Members
Constructors
MultipleTuiScreenInteractive(int, int, IEnumerable<TuiScreenInteractive>, Placement, int, int, CharFormat?, params TuiElement[])
Initializes a new instance of a MultipleTuiScreenInteractive screen. Note that it starts with no selected screen
public MultipleTuiScreenInteractive(int xs, int ys, IEnumerable<TuiScreenInteractive> ss, Placement p, int x, int y, CharFormat? f, params TuiElement[] e)
Parameters
xs
intThe x size
ys
intThe y size
ss
IEnumerable<TuiScreenInteractive>All the interactive screens
p
Placementx
inty
intf
CharFormatThe default format
e
TuiElement[]Additional elements
MultipleTuiScreenInteractive(int, int, IEnumerable<TuiScreenInteractive>, CharFormat?, params TuiElement[])
Initializes a new instance of a MultipleTuiScreenInteractive screen. Note that it starts with no selected screen
public MultipleTuiScreenInteractive(int xs, int ys, IEnumerable<TuiScreenInteractive> ss, CharFormat? f, params TuiElement[] e)
Parameters
xs
intThe x size
ys
intThe y size
ss
IEnumerable<TuiScreenInteractive>All the interactive screens
f
CharFormatThe default format
e
TuiElement[]Additional elements
Fields
WaitForKey
If the screen will wait for a key press before updating
public bool WaitForKey
Field Value
Properties
FinishPlayCycleEvent
Action called at the end of each play cycle
public Action<MultipleTuiScreenInteractive>? FinishPlayCycleEvent { set; }
Property Value
KeyFunctions
The key actions
public Dictionary<(ConsoleKey, ConsoleModifiers), Action<MultipleTuiScreenInteractive, ConsoleKeyInfo>> KeyFunctions { get; }
Property Value
Playing
If this screen is playing
public bool Playing { get; }
Property Value
ScreenList
All the interactive screens
public ReactiveList<TuiScreenInteractive> ScreenList { get; }
Property Value
- ReactiveList<TuiScreenInteractive>
SelectedScreen
The curently selected screen
public TuiScreenInteractive SelectedScreen { get; set; }
Property Value
Methods
DeleteAllKeyEvents()
Clears all existent key events and returns itself
public MultipleTuiScreenInteractive DeleteAllKeyEvents()
Returns
Play()
Plays the interactive screen. Handles all key presses
public void Play()
StopPlaying(MultipleTuiScreenInteractive, ConsoleKeyInfo)
Stop a screen playing
public static void StopPlaying(MultipleTuiScreenInteractive s, ConsoleKeyInfo ck)
Parameters
SubKeyEvent(ConsoleKey, Action<MultipleTuiScreenInteractive, ConsoleKeyInfo>)
Adds a new key event with no modifiers and returns itself
public MultipleTuiScreenInteractive SubKeyEvent(ConsoleKey k, Action<MultipleTuiScreenInteractive, ConsoleKeyInfo> keyFunction)
Parameters
k
ConsoleKeykeyFunction
Action<MultipleTuiScreenInteractive, ConsoleKeyInfo>
Returns
SubKeyEvent(ConsoleKey, ConsoleModifiers, Action<MultipleTuiScreenInteractive, ConsoleKeyInfo>)
Adds a new key event and returns itself
public MultipleTuiScreenInteractive SubKeyEvent(ConsoleKey k, ConsoleModifiers m, Action<MultipleTuiScreenInteractive, ConsoleKeyInfo> keyFunction)
Parameters
k
ConsoleKeym
ConsoleModifierskeyFunction
Action<MultipleTuiScreenInteractive, ConsoleKeyInfo>