Full-editing properties panel for selected entities. More...
#include <selection_properties_panel.h>

Public Types | |
| using | ChangeCallback = std::function<void(const SelectionContext&)> |
Public Member Functions | |
| SelectionPropertiesPanel ()=default | |
| ~SelectionPropertiesPanel ()=default | |
| SelectionPropertiesPanel (const SelectionPropertiesPanel &)=delete | |
| SelectionPropertiesPanel & | operator= (const SelectionPropertiesPanel &)=delete |
| void | SetRom (Rom *rom) |
| void | SetChangeCallback (ChangeCallback callback) |
| void | SetAgentCallbacks (std::function< void(const std::string &)> send_callback, std::function< void()> focus_callback) |
| void | SetSelection (const SelectionContext &context) |
| Set the current selection to display/edit. | |
| void | ClearSelection () |
| Clear the current selection. | |
| const SelectionContext & | GetSelection () const |
| Get the current selection context. | |
| bool | HasSelection () const |
| Check if there's an active selection. | |
| void | Draw () |
| Draw the properties panel content. | |
Private Member Functions | |
| void | DrawNoSelection () |
| void | DrawDungeonRoomProperties () |
| void | DrawDungeonObjectProperties () |
| void | DrawDungeonSpriteProperties () |
| void | DrawDungeonEntranceProperties () |
| void | DrawOverworldMapProperties () |
| void | DrawOverworldTileProperties () |
| void | DrawOverworldSpriteProperties () |
| void | DrawOverworldEntranceProperties () |
| void | DrawOverworldExitProperties () |
| void | DrawOverworldItemProperties () |
| void | DrawGraphicsSheetProperties () |
| void | DrawPaletteProperties () |
| void | DrawSelectionSummary () |
| void | DrawAgentActions () |
| std::string | BuildSelectionContext () const |
| std::string | BuildAgentPrompt (const char *intent) const |
| void | SendAgentPrompt (const char *intent) |
| void | DrawPropertyHeader (const char *icon, const char *title) |
| bool | DrawPositionEditor (const char *label, int *x, int *y, int min_val=0, int max_val=512) |
| bool | DrawSizeEditor (const char *label, int *width, int *height) |
| bool | DrawByteProperty (const char *label, uint8_t *value, const char *tooltip=nullptr) |
| bool | DrawWordProperty (const char *label, uint16_t *value, const char *tooltip=nullptr) |
| bool | DrawComboProperty (const char *label, int *current_item, const char *const items[], int items_count) |
| bool | DrawFlagsProperty (const char *label, uint8_t *flags, const char *const flag_names[], int flag_count) |
| void | DrawReadOnlyText (const char *label, const char *value) |
| void | DrawReadOnlyHex (const char *label, uint32_t value, int digits=4) |
| void | NotifyChange () |
Private Attributes | |
| SelectionContext | selection_ |
| Rom * | rom_ = nullptr |
| ChangeCallback | on_change_ |
| std::function< void(const std::string &) | send_to_agent_ ) |
| std::function< void()> | focus_agent_panel_ |
| bool | show_advanced_ = false |
| bool | show_raw_data_ = false |
Full-editing properties panel for selected entities.
This panel displays and allows editing of properties for whatever entity is currently selected in the active editor. It adapts its UI based on the selection type and provides appropriate editing controls.
Usage:
Definition at line 81 of file selection_properties_panel.h.
| using yaze::editor::SelectionPropertiesPanel::ChangeCallback = std::function<void(const SelectionContext&)> |
Definition at line 83 of file selection_properties_panel.h.
|
default |
|
default |
|
delete |
|
delete |
|
inline |
Definition at line 96 of file selection_properties_panel.h.
References rom_.
Referenced by yaze::editor::EditorManager::ConfigureEditorDependencies(), and yaze::editor::EditorManager::HandleSessionSwitched().
|
inline |
Definition at line 97 of file selection_properties_panel.h.
References on_change_.
|
inline |
Definition at line 100 of file selection_properties_panel.h.
References focus_agent_panel_, and send_to_agent_.
Referenced by yaze::editor::EditorManager::InitializeSubsystems().
| void yaze::editor::SelectionPropertiesPanel::SetSelection | ( | const SelectionContext & | context | ) |
Set the current selection to display/edit.
Definition at line 57 of file selection_properties_panel.cc.
References selection_.
| void yaze::editor::SelectionPropertiesPanel::ClearSelection | ( | ) |
Clear the current selection.
Definition at line 61 of file selection_properties_panel.cc.
References selection_.
Referenced by yaze::editor::EditorManager::HandleSessionSwitched().
|
inline |
Get the current selection context.
Definition at line 123 of file selection_properties_panel.h.
References selection_.
Referenced by yaze::editor::RightDrawerManager::DrawAgentQuickActions().
|
inline |
Check if there's an active selection.
Definition at line 128 of file selection_properties_panel.h.
References yaze::editor::kNone, selection_, and yaze::editor::SelectionContext::type.
Referenced by yaze::editor::RightDrawerManager::DrawAgentQuickActions().
| void yaze::editor::SelectionPropertiesPanel::Draw | ( | ) |
Draw the properties panel content.
Should be called from within an ImGui context (e.g., inside a window).
Definition at line 65 of file selection_properties_panel.cc.
References DrawDungeonEntranceProperties(), DrawDungeonObjectProperties(), DrawDungeonRoomProperties(), DrawDungeonSpriteProperties(), DrawGraphicsSheetProperties(), DrawNoSelection(), DrawOverworldEntranceProperties(), DrawOverworldExitProperties(), DrawOverworldItemProperties(), DrawOverworldMapProperties(), DrawOverworldSpriteProperties(), DrawOverworldTileProperties(), DrawPaletteProperties(), DrawSelectionSummary(), yaze::editor::kDungeonEntrance, yaze::editor::kDungeonObject, yaze::editor::kDungeonRoom, yaze::editor::kDungeonSprite, yaze::editor::kGraphicsSheet, yaze::editor::kNone, yaze::editor::kOverworldEntrance, yaze::editor::kOverworldExit, yaze::editor::kOverworldItem, yaze::editor::kOverworldMap, yaze::editor::kOverworldSprite, yaze::editor::kOverworldTile, yaze::editor::kPalette, selection_, show_advanced_, show_raw_data_, and yaze::editor::SelectionContext::type.
Referenced by yaze::editor::RightDrawerManager::DrawPropertiesPanel().
|
private |
Definition at line 122 of file selection_properties_panel.cc.
References yaze::gui::DrawEmptyState(), and yaze::gui::EmptyNoSelection().
Referenced by Draw().

|
private |
Definition at line 419 of file selection_properties_panel.cc.
References yaze::editor::SelectionContext::data, yaze::editor::SelectionContext::display_name, DrawByteProperty(), DrawPropertyHeader(), DrawReadOnlyHex(), DrawReadOnlyText(), yaze::zelda3::Zelda3Labels::GetRoomEffectNames(), yaze::zelda3::GetRoomTagLabel(), yaze::zelda3::Zelda3Labels::GetRoomTagNames(), ICON_MD_GRID_VIEW, yaze::editor::SelectionContext::id, NotifyChange(), selection_, and show_advanced_.
Referenced by Draw().
|
private |
Definition at line 500 of file selection_properties_panel.cc.
References DrawPositionEditor(), DrawPropertyHeader(), DrawSizeEditor(), ICON_MD_CATEGORY, NotifyChange(), and show_raw_data_.
Referenced by Draw().

|
private |
Definition at line 532 of file selection_properties_panel.cc.
References DrawPositionEditor(), DrawPropertyHeader(), ICON_MD_PEST_CONTROL, and NotifyChange().
Referenced by Draw().

|
private |
Definition at line 550 of file selection_properties_panel.cc.
References DrawPropertyHeader(), and ICON_MD_DOOR_FRONT.
Referenced by Draw().

|
private |
Definition at line 565 of file selection_properties_panel.cc.
References yaze::editor::SelectionContext::display_name, DrawPropertyHeader(), DrawReadOnlyHex(), DrawReadOnlyText(), ICON_MD_MAP, yaze::editor::SelectionContext::id, and selection_.
Referenced by Draw().

|
private |
Definition at line 588 of file selection_properties_panel.cc.
References DrawPropertyHeader(), DrawReadOnlyHex(), ICON_MD_GRID_ON, yaze::editor::SelectionContext::id, selection_, and show_advanced_.
Referenced by Draw().

|
private |
Definition at line 606 of file selection_properties_panel.cc.
References DrawPositionEditor(), DrawPropertyHeader(), ICON_MD_PEST_CONTROL, and NotifyChange().
Referenced by Draw().

|
private |
Definition at line 622 of file selection_properties_panel.cc.
References DrawPositionEditor(), DrawPropertyHeader(), ICON_MD_DOOR_FRONT, and NotifyChange().
Referenced by Draw().

|
private |
Definition at line 638 of file selection_properties_panel.cc.
References DrawPositionEditor(), DrawPropertyHeader(), ICON_MD_EXIT_TO_APP, and NotifyChange().
Referenced by Draw().

|
private |
Definition at line 657 of file selection_properties_panel.cc.
References DrawPositionEditor(), DrawPropertyHeader(), ICON_MD_STAR, and NotifyChange().
Referenced by Draw().

|
private |
Definition at line 674 of file selection_properties_panel.cc.
References DrawPropertyHeader(), DrawReadOnlyHex(), ICON_MD_IMAGE, yaze::editor::SelectionContext::id, selection_, and show_advanced_.
Referenced by Draw().

|
private |
Definition at line 692 of file selection_properties_panel.cc.
References DrawPropertyHeader(), DrawReadOnlyHex(), ICON_MD_PALETTE, yaze::editor::SelectionContext::id, and selection_.
Referenced by Draw().

|
private |
Definition at line 140 of file selection_properties_panel.cc.
References yaze::gui::ColoredTextF(), yaze::editor::SelectionContext::data, yaze::editor::SelectionContext::display_name, DrawAgentActions(), yaze::gui::GetPrimaryVec4(), yaze::editor::GetSelectionTypeName(), ICON_MD_INFO, yaze::editor::SelectionContext::id, yaze::editor::SelectionContext::read_only, yaze::editor::SelectionContext::secondary_id, selection_, show_raw_data_, yaze::gui::ThemedButton(), and yaze::editor::SelectionContext::type.
Referenced by Draw().
|
private |
Definition at line 196 of file selection_properties_panel.cc.
References ICON_MD_SMART_TOY, yaze::editor::kNone, selection_, send_to_agent_, SendAgentPrompt(), yaze::gui::ThemedButton(), and yaze::editor::SelectionContext::type.
Referenced by DrawSelectionSummary().

|
private |
Definition at line 226 of file selection_properties_panel.cc.
References yaze::editor::SelectionContext::display_name, yaze::editor::GetSelectionTypeName(), yaze::editor::SelectionContext::id, yaze::editor::SelectionContext::read_only, yaze::editor::SelectionContext::secondary_id, selection_, and yaze::editor::SelectionContext::type.
Referenced by BuildAgentPrompt().

|
private |
Definition at line 244 of file selection_properties_panel.cc.
References BuildSelectionContext().
Referenced by SendAgentPrompt().

|
private |
Definition at line 253 of file selection_properties_panel.cc.
References BuildAgentPrompt(), focus_agent_panel_, and send_to_agent_.
Referenced by DrawAgentActions().

|
private |
Definition at line 126 of file selection_properties_panel.cc.
References yaze::editor::SelectionContext::display_name, yaze::editor::SelectionContext::read_only, yaze::gui::SectionHeader(), and selection_.
Referenced by DrawDungeonEntranceProperties(), DrawDungeonObjectProperties(), DrawDungeonRoomProperties(), DrawDungeonSpriteProperties(), DrawGraphicsSheetProperties(), DrawOverworldEntranceProperties(), DrawOverworldExitProperties(), DrawOverworldItemProperties(), DrawOverworldMapProperties(), DrawOverworldSpriteProperties(), DrawOverworldTileProperties(), and DrawPaletteProperties().

|
private |
Definition at line 263 of file selection_properties_panel.cc.
Referenced by DrawDungeonObjectProperties(), DrawDungeonSpriteProperties(), DrawOverworldEntranceProperties(), DrawOverworldExitProperties(), DrawOverworldItemProperties(), and DrawOverworldSpriteProperties().
|
private |
Definition at line 293 of file selection_properties_panel.cc.
Referenced by DrawDungeonObjectProperties().
|
private |
Definition at line 322 of file selection_properties_panel.cc.
Referenced by DrawDungeonRoomProperties().
|
private |
Definition at line 342 of file selection_properties_panel.cc.
|
private |
Definition at line 362 of file selection_properties_panel.cc.
|
private |
Definition at line 369 of file selection_properties_panel.cc.
|
private |
Definition at line 393 of file selection_properties_panel.cc.
Referenced by DrawDungeonRoomProperties(), and DrawOverworldMapProperties().
|
private |
Definition at line 400 of file selection_properties_panel.cc.
Referenced by DrawDungeonRoomProperties(), DrawGraphicsSheetProperties(), DrawOverworldMapProperties(), DrawOverworldTileProperties(), and DrawPaletteProperties().
|
private |
Definition at line 409 of file selection_properties_panel.cc.
References on_change_, and selection_.
Referenced by DrawDungeonObjectProperties(), DrawDungeonRoomProperties(), DrawDungeonSpriteProperties(), DrawOverworldEntranceProperties(), DrawOverworldExitProperties(), DrawOverworldItemProperties(), and DrawOverworldSpriteProperties().
|
private |
Definition at line 181 of file selection_properties_panel.h.
Referenced by BuildSelectionContext(), ClearSelection(), Draw(), DrawAgentActions(), DrawDungeonRoomProperties(), DrawGraphicsSheetProperties(), DrawOverworldMapProperties(), DrawOverworldTileProperties(), DrawPaletteProperties(), DrawPropertyHeader(), DrawSelectionSummary(), GetSelection(), HasSelection(), NotifyChange(), and SetSelection().
|
private |
Definition at line 182 of file selection_properties_panel.h.
Referenced by SetRom().
|
private |
Definition at line 183 of file selection_properties_panel.h.
Referenced by NotifyChange(), and SetChangeCallback().
|
private |
Definition at line 184 of file selection_properties_panel.h.
Referenced by DrawAgentActions(), SendAgentPrompt(), and SetAgentCallbacks().
|
private |
Definition at line 185 of file selection_properties_panel.h.
Referenced by SendAgentPrompt(), and SetAgentCallbacks().
|
private |
Definition at line 188 of file selection_properties_panel.h.
Referenced by Draw(), DrawDungeonRoomProperties(), DrawGraphicsSheetProperties(), and DrawOverworldTileProperties().
|
private |
Definition at line 189 of file selection_properties_panel.h.
Referenced by Draw(), DrawDungeonObjectProperties(), and DrawSelectionSummary().