Game now keeps track of deaths, rounds, streaks and other fun stuff. You can also die finally.
This commit is contained in:
parent
a13704fe33
commit
9a012813ae
5 changed files with 100 additions and 68 deletions
6
gui.cpp
6
gui.cpp
|
@ -33,7 +33,7 @@ int GUI::main_loop(GameEngine &game, std::function<bool()> runner) {
|
|||
|
||||
auto status = Renderer([&] {
|
||||
return vbox({
|
||||
text(fmt::format("HP {}", game.hit_points)),
|
||||
text(fmt::format("HP {} | Hits Taken {} | Round {} | Streak {}", game.hit_points, game.hits_taken, game.rounds, game.streak)),
|
||||
separator(),
|
||||
hbox({
|
||||
text("HP "),
|
||||
|
@ -73,9 +73,9 @@ int GUI::main_loop(GameEngine &game, std::function<bool()> runner) {
|
|||
|
||||
auto component = Renderer(build_log, [&] {
|
||||
return vbox({
|
||||
game_stuff->Render() | flex,
|
||||
game_stuff->Render() | flex | size(HEIGHT, GREATER_THAN, 20),
|
||||
separator(),
|
||||
build_log->Render() | vscroll_indicator | yframe | flex,
|
||||
build_log->Render() | vscroll_indicator | yframe | yflex_grow,
|
||||
separator(),
|
||||
status->Render()
|
||||
}) | border;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue