2023-09-11 02:00:06 +00:00
|
|
|
import 'dart:developer';
|
|
|
|
|
2023-09-10 01:40:56 +00:00
|
|
|
import 'package:dartterm/colors.dart';
|
|
|
|
import 'package:dartterm/terminal.dart';
|
|
|
|
|
|
|
|
void main() async {
|
2023-09-11 02:00:06 +00:00
|
|
|
var descriptor = "generic";
|
|
|
|
while (true) {
|
|
|
|
at(0, 0).clear();
|
|
|
|
at(0, 0).puts("Hello, bats!");
|
|
|
|
at(0, 2).fg(Palette.subtitle).small().puts("Beware of the bat!");
|
|
|
|
at(4, 4)
|
|
|
|
.bg(Palette.subtitle)
|
|
|
|
.fg(Palette.defaultBg)
|
|
|
|
.big()
|
|
|
|
.highlight()
|
|
|
|
.act(Act(
|
|
|
|
isDefault: true,
|
|
|
|
label: "Strong!",
|
|
|
|
callback: () async {
|
|
|
|
log("strong!");
|
|
|
|
descriptor = "strong";
|
|
|
|
}))
|
|
|
|
.act(Act(
|
|
|
|
label: "Nocturnal!",
|
|
|
|
callback: () async {
|
|
|
|
log("nocturnal!");
|
|
|
|
descriptor = "nocturnal";
|
|
|
|
}))
|
|
|
|
.puts("ALTER BAT");
|
2023-09-10 22:29:51 +00:00
|
|
|
|
2023-09-11 02:00:06 +00:00
|
|
|
at(4, 8).normal().puts("A $descriptor bat!");
|
2023-09-10 22:29:51 +00:00
|
|
|
|
2023-09-11 02:00:06 +00:00
|
|
|
// await zzz(1.0);
|
|
|
|
await waitMenu();
|
|
|
|
}
|
2023-09-10 01:40:56 +00:00
|
|
|
}
|