Panel for viewing and toggling ASM feature flags from the hack manifest. More...
#include <feature_flag_editor_panel.h>

Classes | |
| struct | EditableFlag |
Public Member Functions | |
| FeatureFlagEditorPanel () | |
| ~FeatureFlagEditorPanel () | |
| void | SetProject (project::YazeProject *project) |
| Set the project pointer for manifest and path access. | |
| void | Draw () |
| Draw the panel content (no ImGui::Begin/End). | |
Private Member Functions | |
| void | RefreshFromManifest () |
| Refresh the local flags list from the hack manifest. | |
| bool | SaveToFile () |
| Write the current flag state to Config/feature_flags.asm. | |
| std::string | ResolveConfigPath () const |
| Resolve the absolute path to Config/feature_flags.asm. | |
Private Attributes | |
| project::YazeProject * | project_ = nullptr |
| std::vector< EditableFlag > | flags_ |
| bool | needs_refresh_ = true |
| std::string | status_message_ |
| bool | status_is_error_ = false |
| char | filter_text_ [128] = {} |
Panel for viewing and toggling ASM feature flags from the hack manifest.
Reads feature flags from the loaded HackManifest and allows toggling them by writing updated values back to Config/feature_flags.asm.
The panel displays a table with columns: Flag Name | Value | Status | Source | Toggle
When the user clicks "Save", the panel regenerates the feature_flags.asm file, preserving the header comment block and updating flag values.
Definition at line 29 of file feature_flag_editor_panel.h.
|
default |
|
default |
|
inline |
Set the project pointer for manifest and path access.
Definition at line 37 of file feature_flag_editor_panel.h.
References project_.
| void yaze::editor::FeatureFlagEditorPanel::Draw | ( | ) |
Draw the panel content (no ImGui::Begin/End).
Definition at line 51 of file feature_flag_editor_panel.cc.
References filter_text_, flags_, yaze::project::YazeProject::hack_manifest, ICON_MD_FLAG, ICON_MD_REFRESH, ICON_MD_SAVE, needs_refresh_, project_, RefreshFromManifest(), ResolveConfigPath(), SaveToFile(), status_is_error_, and status_message_.

|
private |
Refresh the local flags list from the hack manifest.
Definition at line 234 of file feature_flag_editor_panel.cc.
References yaze::editor::FeatureFlagEditorPanel::EditableFlag::dirty, yaze::editor::FeatureFlagEditorPanel::EditableFlag::enabled, yaze::core::HackManifest::feature_flags(), flags_, yaze::project::YazeProject::hack_manifest, yaze::core::HackManifest::loaded(), yaze::editor::FeatureFlagEditorPanel::EditableFlag::name, project_, yaze::editor::FeatureFlagEditorPanel::EditableFlag::source, and yaze::editor::FeatureFlagEditorPanel::EditableFlag::value.
Referenced by Draw().

|
private |
Write the current flag state to Config/feature_flags.asm.
Definition at line 267 of file feature_flag_editor_panel.cc.
References flags_, ResolveConfigPath(), and status_message_.
Referenced by Draw().

|
private |
Resolve the absolute path to Config/feature_flags.asm.
Definition at line 255 of file feature_flag_editor_panel.cc.
References yaze::project::YazeProject::code_folder, yaze::project::YazeProject::GetAbsolutePath(), and project_.
Referenced by Draw(), and SaveToFile().

|
private |
Definition at line 62 of file feature_flag_editor_panel.h.
Referenced by Draw(), RefreshFromManifest(), ResolveConfigPath(), and SetProject().
|
private |
Definition at line 72 of file feature_flag_editor_panel.h.
Referenced by Draw(), RefreshFromManifest(), and SaveToFile().
|
private |
Definition at line 75 of file feature_flag_editor_panel.h.
Referenced by Draw().
|
private |
Definition at line 76 of file feature_flag_editor_panel.h.
Referenced by Draw(), and SaveToFile().
|
private |
Definition at line 77 of file feature_flag_editor_panel.h.
Referenced by Draw().
|
private |
Definition at line 78 of file feature_flag_editor_panel.h.
Referenced by Draw().