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::MesenSocketClient > | client_ |
| std::vector< StateEntry > | entries_ |
| 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 |
ImGui panel for Oracle of Secrets save state library management.
Provides UI for:
Definition at line 53 of file oracle_state_library_panel.h.
| yaze::editor::OracleStateLibraryPanel::OracleStateLibraryPanel | ( | ) |
Definition at line 52 of file oracle_state_library_panel.cc.
References LoadManifest(), and manifest_path_.

|
default |
| 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().

| 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_.
| 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().

| 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().
| 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().

| 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().

|
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().

|
private |
Definition at line 353 of file oracle_state_library_panel.cc.
References deprecate_target_id_, entries_, filter_text_, ICON_MD_CHECK, ICON_MD_DELETE, ICON_MD_PLAY_ARROW, LoadState(), selected_index_, show_canon_, show_deprecate_dialog_, show_deprecated_, show_draft_, show_verify_dialog_, status_is_error_, status_message_, and verify_target_id_.
Referenced by Draw().

|
private |
Definition at line 437 of file oracle_state_library_panel.cc.
References client_, deprecate_reason_, deprecate_target_id_, entries_, ICON_MD_CHECK, ICON_MD_DELETE, ICON_MD_PLAY_ARROW, LoadState(), selected_index_, show_deprecate_dialog_, show_verify_dialog_, status_is_error_, status_message_, and verify_target_id_.
Referenced by Draw().

|
private |
Definition at line 536 of file oracle_state_library_panel.cc.
References deprecate_reason_, deprecate_target_id_, DeprecateState(), show_deprecate_dialog_, show_verify_dialog_, status_is_error_, status_message_, verify_notes_, verify_target_id_, and VerifyState().
Referenced by Draw().

|
private |
Definition at line 76 of file oracle_state_library_panel.cc.
References yaze::editor::StateEntry::area, yaze::editor::StateEntry::captured_by, yaze::editor::StateEntry::deprecated_reason, entries_, yaze::editor::StateEntry::health, yaze::editor::StateEntry::id, yaze::editor::StateEntry::indoors, yaze::editor::StateEntry::label, library_root_, yaze::editor::StateEntry::link_x, yaze::editor::StateEntry::link_y, yaze::editor::StateEntry::location, manifest_path_, yaze::editor::StateEntry::max_health, yaze::editor::StateEntry::md5, yaze::editor::StateEntry::path, yaze::editor::StateEntry::room, yaze::editor::StateEntry::rupees, yaze::editor::StateEntry::status, status_is_error_, status_message_, yaze::editor::StateEntry::summary, yaze::editor::StateEntry::tags, yaze::editor::StateEntry::verified_at, and yaze::editor::StateEntry::verified_by.
Referenced by OracleStateLibraryPanel(), and RefreshLibrary().
|
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().
|
private |
Definition at line 97 of file oracle_state_library_panel.h.
Referenced by DrawStateDetails(), LoadState(), and SetClient().
|
private |
Definition at line 100 of file oracle_state_library_panel.h.
Referenced by DeprecateState(), DrawStateDetails(), DrawStateList(), DrawToolbar(), LoadManifest(), LoadState(), RefreshLibrary(), SaveManifest(), and VerifyState().
|
private |
Definition at line 101 of file oracle_state_library_panel.h.
Referenced by LoadManifest().
|
private |
Definition at line 102 of file oracle_state_library_panel.h.
Referenced by LoadManifest(), OracleStateLibraryPanel(), and SaveManifest().
|
private |
Definition at line 105 of file oracle_state_library_panel.h.
Referenced by DrawStateDetails(), and DrawStateList().
|
private |
Definition at line 106 of file oracle_state_library_panel.h.
Referenced by DrawStateList(), and DrawToolbar().
|
private |
Definition at line 107 of file oracle_state_library_panel.h.
Referenced by DrawStateList(), and DrawToolbar().
|
private |
Definition at line 108 of file oracle_state_library_panel.h.
Referenced by DrawStateList(), and DrawToolbar().
|
private |
Definition at line 109 of file oracle_state_library_panel.h.
Referenced by DrawStateList(), and DrawToolbar().
|
private |
Definition at line 110 of file oracle_state_library_panel.h.
|
private |
Definition at line 113 of file oracle_state_library_panel.h.
Referenced by DrawStateDetails(), DrawStateList(), and DrawVerificationDialog().
|
private |
Definition at line 114 of file oracle_state_library_panel.h.
Referenced by DrawStateDetails(), DrawStateList(), and DrawVerificationDialog().
|
private |
Definition at line 115 of file oracle_state_library_panel.h.
Referenced by DrawVerificationDialog().
|
private |
Definition at line 118 of file oracle_state_library_panel.h.
Referenced by DrawStateDetails(), DrawStateList(), and DrawVerificationDialog().
|
private |
Definition at line 119 of file oracle_state_library_panel.h.
Referenced by DrawStateDetails(), DrawStateList(), and DrawVerificationDialog().
|
private |
Definition at line 120 of file oracle_state_library_panel.h.
Referenced by DrawStateDetails(), and DrawVerificationDialog().
|
private |
Definition at line 123 of file oracle_state_library_panel.h.
Referenced by DeprecateState(), DrawStateDetails(), DrawStateList(), DrawToolbar(), DrawVerificationDialog(), LoadManifest(), LoadState(), RefreshLibrary(), SaveManifest(), and VerifyState().
|
private |
Definition at line 124 of file oracle_state_library_panel.h.
Referenced by DeprecateState(), DrawStateDetails(), DrawStateList(), DrawToolbar(), DrawVerificationDialog(), LoadManifest(), LoadState(), RefreshLibrary(), SaveManifest(), and VerifyState().