Now have a mostly working inventory UI and can pickup items and see them. Next up, being able to use things by clicking on them.

This commit is contained in:
Zed A. Shaw 2025-02-23 02:13:14 -05:00
parent fa6311f10c
commit b7f49aa719
9 changed files with 84 additions and 28 deletions

View file

@ -47,6 +47,7 @@ namespace gui {
$combat_ui.render();
$status_ui.render();
$status_ui.log("Welcome to the game!");
$status_ui.update();
$renderer.init_terminal();
$map_ui.create_render();
@ -342,21 +343,25 @@ namespace gui {
// $status_ui.log(fmt::format("You picked up a {}.",
// std::string(item.data["name"])));
$status_ui.log("You picked up an item.");
$status_ui.update();
}
break;
case eGUI::ATTACK:
event(Event::ATTACK);
break;
case eGUI::DEATH: {
$status_ui.update();
if(entity != player.entity) {
$main_ui.dead_entity(entity);
}
} break;
case eGUI::NOOP:
$status_ui.log(fmt::format("NOOP EVENT! {},{}", evt, entity));
$status_ui.update();
break;
default:
$status_ui.log(fmt::format("INVALID EVENT! {},{}", evt, entity));
$status_ui.update();
}
}
}