36 lines
619 B
Dart
36 lines
619 B
Dart
/*
|
|
import 'package:dartterm/terminal.dart' as terminal;
|
|
import 'package:dartterm/terminal.dart';
|
|
|
|
typedef Callback = Future<void> Function();
|
|
|
|
class Inp {
|
|
final Map<int, List<Act>> _regions = {};
|
|
|
|
Inp();
|
|
}
|
|
|
|
class Act {
|
|
Inp owner;
|
|
String label;
|
|
Callback callback;
|
|
bool isDefault;
|
|
|
|
Act(
|
|
{required this.owner,
|
|
required this.label,
|
|
required this.callback,
|
|
this.isDefault = false});
|
|
|
|
Cursor at(int x, int y) {
|
|
return terminal.at(x, y);
|
|
}
|
|
|
|
void putAt(int i) {
|
|
if (owner._regions[i] == null) {
|
|
owner._regions[i] = [];
|
|
}
|
|
(owner._regions[i]!).add(this);
|
|
}
|
|
}
|
|
*/ |