Migrate to Borealis (#2266)

This commit is contained in:
Luke Street
2026-08-05 07:54:31 -06:00
committed by GitHub
parent 4604304305
commit 13b3b68fe5
94 changed files with 654 additions and 14091 deletions
+13 -12
View File
@@ -13,7 +13,7 @@
#include "dusk/logging.h"
#include "dusk/settings.h"
#include "f_op/f_op_overlap_mng.h"
#include "../file_select.hpp"
#include <borealis/file_select.hpp>
#include "aurora/lib/window.hpp"
#include <unordered_set>
@@ -40,15 +40,6 @@ static constexpr auto STATES_FILENAME = "states.json";
static bool ValidateEncodedState(const std::string&);
void ImGuiStateShare::onMergeFileSelected(void* userdata, const char* path, const char* /*error*/) {
auto* self = static_cast<ImGuiStateShare*>(userdata);
if (path != nullptr) {
self->m_pendingMergePath = path;
}
}
static std::filesystem::path GetStatesFilePath() {
return ConfigPath / STATES_FILENAME;
}
@@ -381,8 +372,18 @@ void ImGuiStateShare::draw(bool& open) {
ImGui::SameLine();
if (ImGui::Button("Load Pack")) {
static constexpr SDL_DialogFileFilter filter = {"State pack", "json"};
ShowFileSelect(&onMergeFileSelected, this, aurora::window::get_sdl_window(), &filter, 1, nullptr, false);
borealis::file_select::open_file(
{
.parentWindow = aurora::window::get_sdl_window(),
.filters = {{"State pack", "json"}},
},
[this](borealis::file_select::Result result) {
if (result.status == borealis::file_select::Status::Selected &&
!result.locations.empty())
{
m_pendingMergePath = std::move(result.locations.front());
}
});
}
if (!m_states.empty()) {