BillySheet/include/gui/menu/menu_data.hpp
2024-02-29 12:22:31 +01:00

49 lines
1.2 KiB
C++

#ifndef BILLYSHEET_MENU_DATA_HPP
#define BILLYSHEET_MENU_DATA_HPP
#include <filesystem>
namespace fs = std::filesystem;
class Controller;
namespace character {
class CharacterSheet;
}
namespace gui::menu {
class MenuData final {
public:
const std::string open_character_key{ "CharacterSheetOpen" };
const std::string save_character_key{ "CharacterSheetSaveAs" };
private:
friend class Menu;
const character::CharacterSheet &character_sheet;
mutable fs::path save_path{ "./" };
mutable std::string filename{ "character_sheet.json" };
bool edit_mode{ true };
public:
MenuData() noexcept = delete;
explicit MenuData(const character::CharacterSheet &characterSheet) noexcept: character_sheet(characterSheet) {}
~MenuData() noexcept = default;
[[nodiscard]] bool is_edit_mode() const { return edit_mode; }
void set_save_path([[maybe_unused]] const Controller &controller,
const fs::path &savePath) const { save_path = savePath; }
void set_filename([[maybe_unused]] const Controller &controller,
const std::string &fileName) const { filename = fileName; }
};
}
#endif //BILLYSHEET_MENU_DATA_HPP