The log is now moved to the map, but changing StatusUI caused a weird compiler error so need to remove logs from that separate.
This commit is contained in:
parent
a2246d2b71
commit
d6e64dd06b
5 changed files with 40 additions and 29 deletions
19
gui/fsm.cpp
19
gui/fsm.cpp
|
@ -58,12 +58,12 @@ namespace gui {
|
|||
$combat_ui.init();
|
||||
$status_ui.init();
|
||||
|
||||
$status_ui.log(L"Welcome to the game!");
|
||||
|
||||
$boss_fight_ui = $levels.create_bossfight($level.world);
|
||||
$boss_fight_ui->init();
|
||||
|
||||
$map_ui.init();
|
||||
$map_ui.log(L"Welcome to the game!");
|
||||
$mini_map.init($main_ui.$overlay_ui.$gui);
|
||||
|
||||
run_systems();
|
||||
|
@ -397,15 +397,15 @@ namespace gui {
|
|||
auto &damage = std::any_cast<Events::Combat&>(data);
|
||||
|
||||
if(damage.enemy_did > 0) {
|
||||
$status_ui.log(fmt::format(L"Enemy HIT YOU for {} damage!", damage.enemy_did));
|
||||
$map_ui.log(fmt::format(L"Enemy HIT YOU for {} damage!", damage.enemy_did));
|
||||
} else {
|
||||
$status_ui.log(L"Enemy MISSED YOU.");
|
||||
$map_ui.log(L"Enemy MISSED YOU.");
|
||||
}
|
||||
|
||||
if(damage.player_did > 0) {
|
||||
$status_ui.log(fmt::format(L"You HIT enemy for {} damage!", damage.player_did));
|
||||
$map_ui.log(fmt::format(L"You HIT enemy for {} damage!", damage.player_did));
|
||||
} else {
|
||||
$status_ui.log(L"You MISSED the enemy.");
|
||||
$map_ui.log(L"You MISSED the enemy.");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -425,10 +425,7 @@ namespace gui {
|
|||
event(Event::LOOT_OPEN);
|
||||
break;
|
||||
case eGUI::LOOT: {
|
||||
// auto &item = std::any_cast<InventoryItem&>(data);
|
||||
// $status_ui.log(fmt::format("You picked up a {}.",
|
||||
// std::string(item.data["name"])));
|
||||
$status_ui.log(L"You picked up an item.");
|
||||
$map_ui.log(L"You picked up an item.");
|
||||
} break;
|
||||
case eGUI::HP_STATUS:
|
||||
System::player_status($level);
|
||||
|
@ -456,11 +453,11 @@ namespace gui {
|
|||
case eGUI::NOOP: {
|
||||
if(data.type() == typeid(std::string)) {
|
||||
auto name = std::any_cast<std::string>(data);
|
||||
$status_ui.log(fmt::format(L"NOOP EVENT! {},{}", evt, entity));
|
||||
$map_ui.log(fmt::format(L"NOOP EVENT! {},{}", evt, entity));
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
$status_ui.log(fmt::format(L"INVALID EVENT! {},{}", evt, entity));
|
||||
$map_ui.log(fmt::format(L"INVALID EVENT! {},{}", evt, entity));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue