Not working anymore. Issue opened.

This commit is contained in:
Pcornat 2022-01-17 23:36:12 +01:00
parent b759836989
commit 1266628646
Signed by: Pcornat
GPG key ID: 2F3932FF46D9ECA0
6 changed files with 65 additions and 9 deletions

View file

@ -5,20 +5,26 @@
namespace fs = std::filesystem;
class Controller;
namespace character {
class CharacterSheet;
}
namespace gui::menu {
class MenuData final {
public:
static constexpr const char *const open_character_key{ "CharacterSheetOpen" };
static constexpr const char *const save_character_key{ "CharacterSheetSaveAs" };
private:
friend class Menu;
const character::CharacterSheet &character_sheet;
fs::path save_path{ "./" };
mutable fs::path save_path{ "./" };
std::string filename{ "character_sheet.json" };
mutable std::string filename{ "character_sheet.json" };
bool edit_mode{ true };
public:
@ -29,6 +35,10 @@ namespace gui::menu {
~MenuData() noexcept = default;
[[nodiscard]] bool is_edit_mode() const { return edit_mode; }
void set_save_path(const fs::path &savePath) const { save_path = savePath; }
void set_filename(const std::string &fileName) const { filename = fileName; }
};
}