yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::OracleStateLibraryPanel Class Reference

ImGui panel for Oracle of Secrets save state library management. More...

#include <oracle_state_library_panel.h>

Public Member Functions

 OracleStateLibraryPanel ()
 
 ~OracleStateLibraryPanel ()
 
void Draw ()
 Draw the panel.
 
void SetClient (std::shared_ptr< emu::mesen::MesenSocketClient > client)
 Set the Mesen socket client for emulator communication.
 
void RefreshLibrary ()
 Refresh the state library from disk.
 
absl::Status LoadState (const std::string &state_id)
 Load a state into the emulator.
 
absl::Status VerifyState (const std::string &state_id)
 Verify and promote a state to canon.
 
absl::Status DeprecateState (const std::string &state_id, const std::string &reason)
 Deprecate a state.
 

Private Member Functions

void DrawToolbar ()
 
void DrawStateList ()
 
void DrawStateDetails ()
 
void DrawVerificationDialog ()
 
void LoadManifest ()
 
void SaveManifest ()
 

Private Attributes

std::shared_ptr< emu::mesen::MesenSocketClientclient_
 
std::vector< StateEntryentries_
 
std::string library_root_
 
std::string manifest_path_
 
int selected_index_ = -1
 
bool show_deprecated_ = false
 
bool show_draft_ = true
 
bool show_canon_ = true
 
char filter_text_ [128] = {}
 
char tag_filter_ [64] = {}
 
bool show_verify_dialog_ = false
 
std::string verify_target_id_
 
char verify_notes_ [256] = {}
 
bool show_deprecate_dialog_ = false
 
std::string deprecate_target_id_
 
char deprecate_reason_ [256] = {}
 
std::string status_message_
 
bool status_is_error_ = false
 

Detailed Description

ImGui panel for Oracle of Secrets save state library management.

Provides UI for:

  • Viewing all states in the library with status badges
  • Loading states into Mesen2 emulator
  • Verifying and promoting draft states to canon
  • Deprecating bad states
  • Filtering by status and tags

Definition at line 53 of file oracle_state_library_panel.h.

Constructor & Destructor Documentation

◆ OracleStateLibraryPanel()

yaze::editor::OracleStateLibraryPanel::OracleStateLibraryPanel ( )

Definition at line 52 of file oracle_state_library_panel.cc.

References LoadManifest(), and manifest_path_.

Here is the call graph for this function:

◆ ~OracleStateLibraryPanel()

yaze::editor::OracleStateLibraryPanel::~OracleStateLibraryPanel ( )
default

Member Function Documentation

◆ Draw()

void yaze::editor::OracleStateLibraryPanel::Draw ( )

Draw the panel.

Definition at line 282 of file oracle_state_library_panel.cc.

References DrawStateDetails(), DrawStateList(), DrawToolbar(), and DrawVerificationDialog().

Here is the call graph for this function:

◆ SetClient()

void yaze::editor::OracleStateLibraryPanel::SetClient ( std::shared_ptr< emu::mesen::MesenSocketClient > client)

Set the Mesen socket client for emulator communication.

Definition at line 65 of file oracle_state_library_panel.cc.

References client_.

◆ RefreshLibrary()

void yaze::editor::OracleStateLibraryPanel::RefreshLibrary ( )

Refresh the state library from disk.

Definition at line 70 of file oracle_state_library_panel.cc.

References entries_, LoadManifest(), status_is_error_, and status_message_.

Referenced by DrawToolbar().

Here is the call graph for this function:

◆ LoadState()

absl::Status yaze::editor::OracleStateLibraryPanel::LoadState ( const std::string & state_id)

Load a state into the emulator.

Definition at line 196 of file oracle_state_library_panel.cc.

References client_, entries_, yaze::editor::StateEntry::label, status_is_error_, and status_message_.

Referenced by DrawStateDetails(), and DrawStateList().

◆ VerifyState()

absl::Status yaze::editor::OracleStateLibraryPanel::VerifyState ( const std::string & state_id)

Verify and promote a state to canon.

Definition at line 251 of file oracle_state_library_panel.cc.

References entries_, SaveManifest(), status_is_error_, and status_message_.

Referenced by DrawVerificationDialog().

Here is the call graph for this function:

◆ DeprecateState()

absl::Status yaze::editor::OracleStateLibraryPanel::DeprecateState ( const std::string & state_id,
const std::string & reason )

Deprecate a state.

Definition at line 267 of file oracle_state_library_panel.cc.

References entries_, SaveManifest(), status_is_error_, and status_message_.

Referenced by DrawVerificationDialog().

Here is the call graph for this function:

◆ DrawToolbar()

void yaze::editor::OracleStateLibraryPanel::DrawToolbar ( )
private

Definition at line 310 of file oracle_state_library_panel.cc.

References entries_, filter_text_, ICON_MD_REFRESH, RefreshLibrary(), show_canon_, show_deprecated_, show_draft_, status_is_error_, and status_message_.

Referenced by Draw().

Here is the call graph for this function:

◆ DrawStateList()

void yaze::editor::OracleStateLibraryPanel::DrawStateList ( )
private

◆ DrawStateDetails()

void yaze::editor::OracleStateLibraryPanel::DrawStateDetails ( )
private

◆ DrawVerificationDialog()

void yaze::editor::OracleStateLibraryPanel::DrawVerificationDialog ( )
private

◆ LoadManifest()

◆ SaveManifest()

void yaze::editor::OracleStateLibraryPanel::SaveManifest ( )
private

Definition at line 146 of file oracle_state_library_panel.cc.

References entries_, manifest_path_, status_is_error_, and status_message_.

Referenced by DeprecateState(), and VerifyState().

Member Data Documentation

◆ client_

std::shared_ptr<emu::mesen::MesenSocketClient> yaze::editor::OracleStateLibraryPanel::client_
private

Definition at line 97 of file oracle_state_library_panel.h.

Referenced by DrawStateDetails(), LoadState(), and SetClient().

◆ entries_

std::vector<StateEntry> yaze::editor::OracleStateLibraryPanel::entries_
private

◆ library_root_

std::string yaze::editor::OracleStateLibraryPanel::library_root_
private

Definition at line 101 of file oracle_state_library_panel.h.

Referenced by LoadManifest().

◆ manifest_path_

std::string yaze::editor::OracleStateLibraryPanel::manifest_path_
private

◆ selected_index_

int yaze::editor::OracleStateLibraryPanel::selected_index_ = -1
private

Definition at line 105 of file oracle_state_library_panel.h.

Referenced by DrawStateDetails(), and DrawStateList().

◆ show_deprecated_

bool yaze::editor::OracleStateLibraryPanel::show_deprecated_ = false
private

Definition at line 106 of file oracle_state_library_panel.h.

Referenced by DrawStateList(), and DrawToolbar().

◆ show_draft_

bool yaze::editor::OracleStateLibraryPanel::show_draft_ = true
private

Definition at line 107 of file oracle_state_library_panel.h.

Referenced by DrawStateList(), and DrawToolbar().

◆ show_canon_

bool yaze::editor::OracleStateLibraryPanel::show_canon_ = true
private

Definition at line 108 of file oracle_state_library_panel.h.

Referenced by DrawStateList(), and DrawToolbar().

◆ filter_text_

char yaze::editor::OracleStateLibraryPanel::filter_text_[128] = {}
private

Definition at line 109 of file oracle_state_library_panel.h.

Referenced by DrawStateList(), and DrawToolbar().

◆ tag_filter_

char yaze::editor::OracleStateLibraryPanel::tag_filter_[64] = {}
private

Definition at line 110 of file oracle_state_library_panel.h.

◆ show_verify_dialog_

bool yaze::editor::OracleStateLibraryPanel::show_verify_dialog_ = false
private

◆ verify_target_id_

std::string yaze::editor::OracleStateLibraryPanel::verify_target_id_
private

◆ verify_notes_

char yaze::editor::OracleStateLibraryPanel::verify_notes_[256] = {}
private

Definition at line 115 of file oracle_state_library_panel.h.

Referenced by DrawVerificationDialog().

◆ show_deprecate_dialog_

bool yaze::editor::OracleStateLibraryPanel::show_deprecate_dialog_ = false
private

◆ deprecate_target_id_

std::string yaze::editor::OracleStateLibraryPanel::deprecate_target_id_
private

◆ deprecate_reason_

char yaze::editor::OracleStateLibraryPanel::deprecate_reason_[256] = {}
private

Definition at line 120 of file oracle_state_library_panel.h.

Referenced by DrawStateDetails(), and DrawVerificationDialog().

◆ status_message_

std::string yaze::editor::OracleStateLibraryPanel::status_message_
private

◆ status_is_error_

bool yaze::editor::OracleStateLibraryPanel::status_is_error_ = false
private

The documentation for this class was generated from the following files: