1#ifndef YAZE_APP_EDITOR_SHELL_DIALOGS_ROM_LOAD_OPTIONS_DIALOG_H_
2#define YAZE_APP_EDITOR_SHELL_DIALOGS_ROM_LOAD_OPTIONS_DIALOG_H_
10#include "absl/status/status.h"
12#include "imgui/imgui.h"
80 bool suggest_project_creation);
87 void Open(
Rom* rom,
bool suggest_project_creation);
96 const std::string& preset_name,
bool remembered);
103 bool Show(
bool* p_open);
109 void Draw(
bool* p_open);
172 std::string_view encoded);
175 static std::string
RomChoiceKey(
const std::string& rom_path);
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
const std::string & rom_filename() const
std::function< void(const LoadOptions &) confirm_callback_)
void ApplyPreset(const std::string &preset_name)
std::function< bool()> apply_guard_
const LoadOptions & GetOptions() const
Get the selected load options.
void Open(Rom *rom, const std::string &rom_filename)
Open the dialog after ROM detection.
int selected_preset_index_
static const char * kPresetNames[kNumPresets]
void OpenForReview(Rom *rom, const core::FeatureFlags::Flags &active, const std::string &preset_name, bool remembered)
Reopen the dialog for a ROM that is already loaded.
bool OverworldLoadOptionsChanged() const
void SetApplyGuard(std::function< bool()> guard)
bool loaded_custom_overworld_
zelda3::OverworldVersion detected_version_
char project_name_buffer_[256]
static LoadOptions OptionsFromFeatureFlags(const core::FeatureFlags::Flags &flags)
static std::optional< RememberedChoice > DecodeRememberedChoice(std::string_view encoded)
void DrawFeatureFlagDetails()
static std::string RomChoiceKey(const std::string &rom_path)
bool Show(bool *p_open)
Show the dialog.
void SetCancelCallback(std::function< void()> callback)
Set callback for Cancel or the title-bar close button.
void ResetConfirmation()
Reset confirmation state.
static void ApplyToFeatureFlags(const LoadOptions &options, core::FeatureFlags::Flags &flags)
static std::string EncodeRememberedChoice(const LoadOptions &options, int zso_version_byte)
void DrawOverworldOptions()
void DrawFeatureFlagPresets()
void SetConfirmCallback(std::function< void(const LoadOptions &)> callback)
Set callback for when options are confirmed.
zelda3::OverworldVersion GetDetectedVersion() const
Get detected ROM version.
bool loaded_tail_expansion_
void DrawProjectOptions()
static const char * kPresetDescriptions[kNumPresets]
std::string rom_filename_
~RomLoadOptionsDialog()=default
bool WasConfirmed() const
Check if dialog resulted in confirmation.
static constexpr int kNumPresets
char project_path_buffer_[512]
void ApplyOptionsToFeatureFlags()
std::function< void()> cancel_callback_
int zso_version_byte() const
void Draw(bool *p_open)
Draw the dialog (wrapper around Show)
OverworldVersion
ROM version detection for overworld features.
@ kVanilla
0xFF in ROM, no ZScream ASM applied
bool enable_tail_expansion
bool save_overworld_items
std::string selected_preset
bool save_overworld_exits
bool enable_custom_overworld
bool save_overworld_sprites
bool save_overworld_entrances