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 | 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 | 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_ |
| 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::OnSessionSwitched().
|
inline |
Definition at line 97 of file selection_properties_panel.h.
References on_change_.
| void yaze::editor::SelectionPropertiesPanel::SetSelection | ( | const SelectionContext & | context | ) |
Set the current selection to display/edit.
Definition at line 45 of file selection_properties_panel.cc.
References selection_.
| void yaze::editor::SelectionPropertiesPanel::ClearSelection | ( | ) |
Clear the current selection.
Definition at line 49 of file selection_properties_panel.cc.
References selection_.
|
inline |
Get the current selection context.
Definition at line 118 of file selection_properties_panel.h.
References selection_.
|
inline |
Check if there's an active selection.
Definition at line 123 of file selection_properties_panel.h.
References yaze::editor::kNone, selection_, and yaze::editor::SelectionContext::type.
| 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 53 of file selection_properties_panel.cc.
References DrawDungeonEntranceProperties(), DrawDungeonObjectProperties(), DrawDungeonRoomProperties(), DrawDungeonSpriteProperties(), DrawGraphicsSheetProperties(), DrawNoSelection(), DrawOverworldEntranceProperties(), DrawOverworldExitProperties(), DrawOverworldItemProperties(), DrawOverworldMapProperties(), DrawOverworldSpriteProperties(), DrawOverworldTileProperties(), DrawPaletteProperties(), 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::RightPanelManager::DrawPropertiesPanel().
|
private |
Definition at line 105 of file selection_properties_panel.cc.
References yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), yaze::gui::GetTextDisabledVec4(), and ICON_MD_TOUCH_APP.
Referenced by Draw().

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

|
private |
Definition at line 331 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 361 of file selection_properties_panel.cc.
References DrawPositionEditor(), DrawPropertyHeader(), ICON_MD_PEST_CONTROL, and NotifyChange().
Referenced by Draw().

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

|
private |
Definition at line 392 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 414 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 431 of file selection_properties_panel.cc.
References DrawPositionEditor(), DrawPropertyHeader(), ICON_MD_PEST_CONTROL, and NotifyChange().
Referenced by Draw().

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

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

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

|
private |
Definition at line 496 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 513 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 127 of file selection_properties_panel.cc.
References yaze::editor::SelectionContext::display_name, yaze::gui::GetPrimaryVec4(), yaze::editor::SelectionContext::read_only, and selection_.
Referenced by DrawDungeonEntranceProperties(), DrawDungeonObjectProperties(), DrawDungeonRoomProperties(), DrawDungeonSpriteProperties(), DrawGraphicsSheetProperties(), DrawOverworldEntranceProperties(), DrawOverworldExitProperties(), DrawOverworldItemProperties(), DrawOverworldMapProperties(), DrawOverworldSpriteProperties(), DrawOverworldTileProperties(), and DrawPaletteProperties().

|
private |
Definition at line 149 of file selection_properties_panel.cc.
Referenced by DrawDungeonObjectProperties(), DrawDungeonSpriteProperties(), DrawOverworldEntranceProperties(), DrawOverworldExitProperties(), DrawOverworldItemProperties(), and DrawOverworldSpriteProperties().
|
private |
Definition at line 179 of file selection_properties_panel.cc.
Referenced by DrawDungeonObjectProperties().
|
private |
Definition at line 208 of file selection_properties_panel.cc.
|
private |
Definition at line 228 of file selection_properties_panel.cc.
|
private |
Definition at line 248 of file selection_properties_panel.cc.
|
private |
Definition at line 255 of file selection_properties_panel.cc.
|
private |
Definition at line 279 of file selection_properties_panel.cc.
Referenced by DrawDungeonRoomProperties(), and DrawOverworldMapProperties().
|
private |
Definition at line 286 of file selection_properties_panel.cc.
Referenced by DrawDungeonRoomProperties(), DrawGraphicsSheetProperties(), DrawOverworldMapProperties(), DrawOverworldTileProperties(), and DrawPaletteProperties().
|
private |
Definition at line 295 of file selection_properties_panel.cc.
References on_change_, and selection_.
Referenced by DrawDungeonObjectProperties(), DrawDungeonSpriteProperties(), DrawOverworldEntranceProperties(), DrawOverworldExitProperties(), DrawOverworldItemProperties(), and DrawOverworldSpriteProperties().
|
private |
Definition at line 171 of file selection_properties_panel.h.
Referenced by ClearSelection(), Draw(), DrawDungeonRoomProperties(), DrawGraphicsSheetProperties(), DrawOverworldMapProperties(), DrawOverworldTileProperties(), DrawPaletteProperties(), DrawPropertyHeader(), GetSelection(), HasSelection(), NotifyChange(), and SetSelection().
|
private |
Definition at line 172 of file selection_properties_panel.h.
Referenced by SetRom().
|
private |
Definition at line 173 of file selection_properties_panel.h.
Referenced by NotifyChange(), and SetChangeCallback().
|
private |
Definition at line 176 of file selection_properties_panel.h.
Referenced by Draw(), DrawDungeonRoomProperties(), DrawGraphicsSheetProperties(), and DrawOverworldTileProperties().
|
private |
Definition at line 177 of file selection_properties_panel.h.
Referenced by Draw(), and DrawDungeonObjectProperties().