Not working anymore. Issue opened.
This commit is contained in:
parent
b759836989
commit
1266628646
6 changed files with 65 additions and 9 deletions
|
@ -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; }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue