Build 0.2 native launcher and portable Classic runtime (by Codex)
This commit is contained in:
1 parent
3a021fc160
commit
2552528176
84 files changed
+5004
-197
No files matched your search
@@ -0,0 +1,27 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
#pragma once
|
||||
#include "launch/mods.hpp"
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
namespace bmh::launch {
|
||||
enum class LauncherAction { start, add, remove, rename, end };
|
||||
struct LauncherChoice {
|
||||
LauncherAction action = LauncherAction::end;
|
||||
int selection = -1;
|
||||
};
|
||||
class LauncherUI {
|
||||
public:
|
||||
virtual ~LauncherUI() = default;
|
||||
virtual LauncherChoice next(const std::vector<ModEntry> &) = 0;
|
||||
virtual std::optional<std::filesystem::path> choose_folder(const std::string &title,
|
||||
const std::filesystem::path &initial = {}) = 0;
|
||||
virtual std::optional<AddMod> configure_add(AddMod defaults) = 0;
|
||||
virtual std::optional<std::string> rename(const std::string &) = 0;
|
||||
virtual bool confirm_delete(const std::string &) = 0;
|
||||
virtual void message(const std::string &, bool error) = 0;
|
||||
virtual void progress(const std::string &, bool cancellable) = 0;
|
||||
virtual bool pump() = 0; // cancellation requested
|
||||
virtual void finish_progress() = 0;
|
||||
};
|
||||
std::unique_ptr<LauncherUI> make_launcher_ui();
|
||||
} // namespace bmh::launch
|
||||
Reference in new issue
Block a user