BillySheet/include/gui/gui_data.hpp

63 lines
1.4 KiB
C++

#ifndef BILLYSHEET_GUI_DATA_HPP
#define BILLYSHEET_GUI_DATA_HPP
#include <string_view>
#include <spdlog/spdlog.h>
namespace character {
class CharacterSheet;
}
using namespace std::string_view_literals;
namespace gui {
enum class characChanged {
None,
Adresse,
Endurance,
Chance,
Habilete
};
class GuiData final {
private:
friend class Gui;
character::CharacterSheet &billy;
std::pair<characChanged, std::uint32_t> base{ characChanged::None, 0 };
std::pair<characChanged, std::uint32_t> carac{ characChanged::None, 0 };
std::pair<characChanged, std::uint32_t> materiel{ characChanged::None, 0 };
std::pair<characChanged, std::uint32_t> additional{ characChanged::None, 0 };
public:
static constexpr std::array classes{
"Guerrier"sv,
"Prudent"sv,
"Paysan"sv,
"Débrouillard"sv
};
GuiData() = delete;
explicit GuiData(character::CharacterSheet &billy) noexcept: billy(billy) { SPDLOG_DEBUG("Creating GUI Data"); }
~GuiData() noexcept = default;
[[nodiscard]] const std::pair<characChanged, std::uint32_t> &get_base() const { return base; }
[[nodiscard]] const std::pair<characChanged, std::uint32_t> &get_carac() const { return carac; }
[[nodiscard]] const std::pair<characChanged, std::uint32_t> &get_materiel() const { return materiel; }
[[nodiscard]] const std::pair<characChanged, std::uint32_t> &get_additional() const { return additional; }
};
}
#endif //BILLYSHEET_GUI_DATA_HPP