diff --git a/boss/fight.cpp b/boss/fight.cpp index 9d41205..a2043f4 100644 --- a/boss/fight.cpp +++ b/boss/fight.cpp @@ -65,6 +65,7 @@ namespace boss { run_systems(); break; case ATTACK: + $ui.status(L"PLAYER TURN"); state(State::PLAYER_TURN); break; default: @@ -81,6 +82,7 @@ namespace boss { state(State::END); break; case ATTACK: { + $ui.status(L"PLAYER TURN"); int attack_id = std::any_cast(data); boss::System::combat(attack_id); state(State::PLAYER_TURN); @@ -100,6 +102,7 @@ namespace boss { state(State::END); break; case ATTACK: { + $ui.status(L"BOSS TURN"); int attack_id = std::any_cast(data); boss::System::combat(attack_id); state(State::BOSS_TURN); diff --git a/boss/fight.hpp b/boss/fight.hpp index b7cd779..f02558c 100644 --- a/boss/fight.hpp +++ b/boss/fight.hpp @@ -1,6 +1,5 @@ #pragma once -#define FSM_DEBUG 1 #include "simplefsm.hpp" #include "dinkyecs.hpp" #include "boss/ui.hpp" diff --git a/boss/ui.cpp b/boss/ui.cpp index ebeb7fb..be9ddab 100644 --- a/boss/ui.cpp +++ b/boss/ui.cpp @@ -27,7 +27,7 @@ namespace boss { background.set_sprite($scene.background, true); $arena.layout( - "[_ |boss1 |boss2 |boss3 |boss4 |_]" + "[status|boss1 |boss2 |boss3 |boss4 |_]" "[_ |boss5 |boss6 |boss7 |boss8 |_]" "[floor1|boss9 |boss10|boss11|boss12|_]" "[floor2|boss13|boss14|boss15|boss16|_]" @@ -86,4 +86,9 @@ namespace boss { || $combat_ui.mouse(x, y, mods) || $actions.mouse(x, y, mods); } + + void UI::status(const std::wstring& msg) { + $arena.show_text("status", msg); + } + } diff --git a/boss/ui.hpp b/boss/ui.hpp index a5bb795..6f3a749 100644 --- a/boss/ui.hpp +++ b/boss/ui.hpp @@ -32,5 +32,6 @@ namespace boss { void render(sf::RenderWindow& window); bool mouse(float x, float y, guecs::Modifiers mods); void position_sprite(SpriteTexture& st, const std::string& name, float scale, bool at_mid=false); + void status(const std::wstring& msg); }; }