BillySheet/include/gui/gui_data.hpp

63 lines
1.4 KiB
C++
Raw Normal View History

#ifndef BILLYSHEET_GUI_DATA_HPP
#define BILLYSHEET_GUI_DATA_HPP
2022-01-25 19:53:58 +01:00
#include <string_view>
2022-01-10 21:16:05 +01:00
#include <spdlog/spdlog.h>
2022-01-08 23:40:31 +01:00
namespace character {
class CharacterSheet;
}
2022-01-25 19:53:58 +01:00
using namespace std::string_view_literals;
namespace gui {
2022-01-09 00:43:33 +01:00
2022-01-31 20:37:35 +01:00
enum class characChanged {
None,
Adresse,
Endurance,
Chance,
Habilete
};
class GuiData final {
private:
friend class Gui;
character::CharacterSheet &billy;
2022-01-11 22:33:29 +01:00
2022-01-31 20:37:35 +01:00
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:
2022-01-25 19:53:58 +01:00
static constexpr std::array classes{
"Guerrier"sv,
"Prudent"sv,
"Paysan"sv,
"Débrouillard"sv
};
GuiData() = delete;
2022-01-08 23:40:31 +01:00
explicit GuiData(character::CharacterSheet &billy) noexcept: billy(billy) { SPDLOG_DEBUG("Creating GUI Data"); }
2022-01-08 23:40:31 +01:00
~GuiData() noexcept = default;
2022-01-31 20:37:35 +01:00
[[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