33 lines
1021 B
C++
33 lines
1021 B
C++
#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 {
|
|
// TODO
|
|
}
|
|
}
|