30 lines
845 B
C++
30 lines
845 B
C++
#include "controller.hpp"
|
|
#include "gui/menu/menu_data.hpp"
|
|
#include "ImFileDialog.h"
|
|
#include <spdlog/spdlog.h>
|
|
|
|
void Controller::control_menu() const noexcept {
|
|
if (ifd::FileDialog::Instance().IsDone(menu_data.open_character_key)) {
|
|
if (ifd::FileDialog::Instance().HasResult()) {
|
|
fs::path str = ifd::FileDialog::Instance().GetResult();
|
|
SPDLOG_DEBUG("path opening: {}", str.string());
|
|
}
|
|
ifd::FileDialog::Instance().Close();
|
|
}
|
|
if (ifd::FileDialog::Instance().IsDone(menu_data.save_character_key)) {
|
|
if (ifd::FileDialog::Instance().HasResult()) {
|
|
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 {
|
|
// TODO
|
|
}
|
|
}
|