Working with file dialog, yay ! :D
This commit is contained in:
parent
1266628646
commit
546c935cf2
8 changed files with 25 additions and 31 deletions
|
@ -3,27 +3,24 @@
|
|||
#include "ImFileDialog.h"
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
void Controller::control() noexcept {
|
||||
SPDLOG_DEBUG("Check \"open character\" task");
|
||||
if (ifd::FileDialog::Instance().IsDone(gui::menu::MenuData::open_character_key)) {
|
||||
SPDLOG_DEBUG("Task done");
|
||||
void Controller::control_menu() const noexcept {
|
||||
if (ifd::FileDialog::Instance().IsDone(menu_data.open_character_key)) {
|
||||
if (ifd::FileDialog::Instance().HasResult()) {
|
||||
SPDLOG_DEBUG("Has Result");
|
||||
fs::path str = ifd::FileDialog::Instance().GetResult();
|
||||
SPDLOG_DEBUG("path opening: {}", str.string());
|
||||
}
|
||||
ifd::FileDialog::Instance().Close();
|
||||
}
|
||||
SPDLOG_DEBUG("Check \"saving character\" task");
|
||||
if (ifd::FileDialog::Instance().IsDone(gui::menu::MenuData::save_character_key)) {
|
||||
SPDLOG_DEBUG("Task done");
|
||||
if (ifd::FileDialog::Instance().IsDone(menu_data.save_character_key)) {
|
||||
if (ifd::FileDialog::Instance().HasResult()) {
|
||||
SPDLOG_DEBUG("Has Result");
|
||||
const fs::path str = ifd::FileDialog::Instance().GetResult();
|
||||
SPDLOG_DEBUG("path saving: {}", str.string());
|
||||
}
|
||||
ifd::FileDialog::Instance().Close();
|
||||
}
|
||||
}
|
||||
|
||||
void Controller::control_sheet() const noexcept {
|
||||
if (menu_data.is_edit_mode()) {
|
||||
// TODO
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue