39 lines
773 B
Dart
39 lines
773 B
Dart
part of '../terminal.dart';
|
|
|
|
Terminal _terminal = Terminal();
|
|
const int width = Terminal.width;
|
|
const int height = Terminal.height;
|
|
const int nTiles = Terminal.nTiles;
|
|
|
|
Widget toWidget(BuildContext context) {
|
|
return _terminal.toWidget(context);
|
|
}
|
|
|
|
void notifyInput(Input i) {
|
|
_terminal._notifyInput(i);
|
|
}
|
|
|
|
void notifyScreenDimensions(ScreenDimensions sd) {
|
|
_terminal._notifyScreenDimensions(sd);
|
|
}
|
|
|
|
Stream<Input> rawInput() {
|
|
return _terminal.rawInput();
|
|
}
|
|
|
|
void clear() {
|
|
at(0, 0).clear();
|
|
}
|
|
|
|
Cursor at(int x, int y) {
|
|
return Cursor(t: _terminal, x: x, y: y);
|
|
}
|
|
|
|
Future<void> zzz(double t) async {
|
|
await Future.delayed(Duration(milliseconds: (t * 1000).toInt()));
|
|
}
|
|
|
|
Future<void> waitMenu({bool modal = false}) async {
|
|
await _waitMenu(_terminal, modal);
|
|
}
|