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

@ -1,7 +1,29 @@
#include "controller.hpp"
#include "gui/menu/menu_data.hpp"
#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");
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().HasResult()) {
SPDLOG_DEBUG("Has Result");
const fs::path str = ifd::FileDialog::Instance().GetResult();
SPDLOG_DEBUG("path saving: {}", str.string());
}
ifd::FileDialog::Instance().Close();
}
if (menu_data.is_edit_mode()) {
// TODO
} else {