#include <minecart_track_editor_panel.h>


Public Types | |
| using | RoomNavigationCallback = std::function<void(int room_id)> |
Public Member Functions | |
| MinecartTrackEditorPanel (const std::string &start_root="") | |
| std::string | GetId () const override |
| Unique identifier for this panel. | |
| std::string | GetDisplayName () const override |
| Human-readable name shown in menus and title bars. | |
| std::string | GetIcon () const override |
| Material Design icon for this panel. | |
| std::string | GetEditorCategory () const override |
| Editor category this panel belongs to. | |
| void | Draw (bool *p_open) override |
| Draw the panel content. | |
| void | SetProjectRoot (const std::string &root) |
| void | SaveTracks () |
| void | SetPickedCoordinates (int room_id, uint16_t camera_x, uint16_t camera_y) |
| bool | IsPickingCoordinates () const |
| int | GetPickingTrackIndex () const |
| void | SetRoomNavigationCallback (RoomNavigationCallback callback) |
Public Member Functions inherited from yaze::editor::EditorPanel | |
| virtual | ~EditorPanel ()=default |
| virtual void | OnOpen () |
| Called when panel becomes visible. | |
| virtual void | OnClose () |
| Called when panel is hidden. | |
| virtual void | OnFocus () |
| Called when panel receives focus. | |
| virtual PanelCategory | GetPanelCategory () const |
| Get the lifecycle category for this panel. | |
| virtual bool | IsEnabled () const |
| Check if this panel is currently enabled. | |
| virtual std::string | GetDisabledTooltip () const |
| Get tooltip text when panel is disabled. | |
| virtual std::string | GetShortcutHint () const |
| Get keyboard shortcut hint for display. | |
| virtual int | GetPriority () const |
| Get display priority for menu ordering. | |
| virtual float | GetPreferredWidth () const |
| Get preferred width for this panel (optional) | |
| virtual bool | IsVisibleByDefault () const |
| Whether this panel should be visible by default. | |
| virtual std::string | GetParentPanelId () const |
| Get parent panel ID for cascade behavior. | |
| virtual bool | CascadeCloseChildren () const |
| Whether closing this panel should close child panels. | |
Private Member Functions | |
| void | LoadTracks () |
| bool | ParseSection (const std::string &content, const std::string &label, std::vector< int > &out_values) |
| std::string | FormatSection (const std::string &label, const std::vector< int > &values) |
| void | StartCoordinatePicking (int track_index) |
| void | CancelCoordinatePicking () |
Private Attributes | |
| std::vector< MinecartTrack > | tracks_ |
| std::string | project_root_ |
| bool | loaded_ = false |
| std::string | status_message_ |
| bool | show_success_ = false |
| float | success_timer_ = 0.0f |
| bool | picking_mode_ = false |
| int | picking_track_index_ = -1 |
| uint16_t | last_picked_x_ = 0 |
| uint16_t | last_picked_y_ = 0 |
| bool | has_picked_coords_ = false |
| RoomNavigationCallback | room_navigation_callback_ |
Definition at line 24 of file minecart_track_editor_panel.h.
| using yaze::editor::MinecartTrackEditorPanel::RoomNavigationCallback = std::function<void(int room_id)> |
Definition at line 48 of file minecart_track_editor_panel.h.
|
inlineexplicit |
Definition at line 26 of file minecart_track_editor_panel.h.
|
inlineoverridevirtual |
Unique identifier for this panel.
IDs should be:
Implements yaze::editor::EditorPanel.
Definition at line 29 of file minecart_track_editor_panel.h.
|
inlineoverridevirtual |
Human-readable name shown in menus and title bars.
Implements yaze::editor::EditorPanel.
Definition at line 30 of file minecart_track_editor_panel.h.
|
inlineoverridevirtual |
Material Design icon for this panel.
Implements yaze::editor::EditorPanel.
Definition at line 31 of file minecart_track_editor_panel.h.
|
inlineoverridevirtual |
Editor category this panel belongs to.
Implements yaze::editor::EditorPanel.
Definition at line 32 of file minecart_track_editor_panel.h.
|
overridevirtual |
Draw the panel content.
| p_open | Pointer to visibility flag (nullptr if not closable) |
Called by PanelManager when the panel is visible. Do NOT call ImGui::Begin/End - the PanelWindow wrapper handles that. Just draw your content directly.
Implements yaze::editor::EditorPanel.
Definition at line 59 of file minecart_track_editor_panel.cc.
References CancelCoordinatePicking(), ICON_MD_ARROW_FORWARD, ICON_MD_CANCEL, ICON_MD_MY_LOCATION, ICON_MD_SAVE, yaze::gui::InputHexWordCustom(), loaded_, LoadTracks(), picking_mode_, picking_track_index_, project_root_, room_navigation_callback_, SaveTracks(), show_success_, StartCoordinatePicking(), status_message_, and tracks_.
| void yaze::editor::MinecartTrackEditorPanel::SetProjectRoot | ( | const std::string & | root | ) |
Definition at line 18 of file minecart_track_editor_panel.cc.
References loaded_, and project_root_.
Referenced by yaze::editor::DungeonEditorV2::Load().
| void yaze::editor::MinecartTrackEditorPanel::SaveTracks | ( | ) |
Definition at line 249 of file minecart_track_editor_panel.cc.
References FormatSection(), project_root_, show_success_, status_message_, and tracks_.
Referenced by Draw().

| void yaze::editor::MinecartTrackEditorPanel::SetPickedCoordinates | ( | int | room_id, |
| uint16_t | camera_x, | ||
| uint16_t | camera_y ) |
Definition at line 25 of file minecart_track_editor_panel.cc.
References has_picked_coords_, last_picked_x_, last_picked_y_, picking_mode_, picking_track_index_, show_success_, status_message_, and tracks_.
|
inline |
Definition at line 44 of file minecart_track_editor_panel.h.
References picking_mode_.
|
inline |
Definition at line 45 of file minecart_track_editor_panel.h.
References picking_track_index_.
|
inline |
Definition at line 49 of file minecart_track_editor_panel.h.
References room_navigation_callback_.
|
private |
Definition at line 175 of file minecart_track_editor_panel.cc.
References loaded_, ParseSection(), project_root_, show_success_, status_message_, and tracks_.
Referenced by Draw().

|
private |
Definition at line 212 of file minecart_track_editor_panel.cc.
Referenced by LoadTracks().
|
private |
Definition at line 283 of file minecart_track_editor_panel.cc.
Referenced by SaveTracks().
|
private |
Definition at line 46 of file minecart_track_editor_panel.cc.
References picking_mode_, picking_track_index_, show_success_, and status_message_.
Referenced by Draw().
|
private |
Definition at line 53 of file minecart_track_editor_panel.cc.
References picking_mode_, picking_track_index_, and status_message_.
Referenced by Draw().
|
private |
Definition at line 60 of file minecart_track_editor_panel.h.
Referenced by Draw(), LoadTracks(), SaveTracks(), and SetPickedCoordinates().
|
private |
Definition at line 61 of file minecart_track_editor_panel.h.
Referenced by Draw(), LoadTracks(), SaveTracks(), and SetProjectRoot().
|
private |
Definition at line 62 of file minecart_track_editor_panel.h.
Referenced by Draw(), LoadTracks(), and SetProjectRoot().
|
private |
Definition at line 63 of file minecart_track_editor_panel.h.
Referenced by CancelCoordinatePicking(), Draw(), LoadTracks(), SaveTracks(), SetPickedCoordinates(), and StartCoordinatePicking().
|
private |
Definition at line 64 of file minecart_track_editor_panel.h.
Referenced by Draw(), LoadTracks(), SaveTracks(), SetPickedCoordinates(), and StartCoordinatePicking().
|
private |
Definition at line 65 of file minecart_track_editor_panel.h.
|
private |
Definition at line 68 of file minecart_track_editor_panel.h.
Referenced by CancelCoordinatePicking(), Draw(), IsPickingCoordinates(), SetPickedCoordinates(), and StartCoordinatePicking().
|
private |
Definition at line 69 of file minecart_track_editor_panel.h.
Referenced by CancelCoordinatePicking(), Draw(), GetPickingTrackIndex(), SetPickedCoordinates(), and StartCoordinatePicking().
|
private |
Definition at line 72 of file minecart_track_editor_panel.h.
Referenced by SetPickedCoordinates().
|
private |
Definition at line 73 of file minecart_track_editor_panel.h.
Referenced by SetPickedCoordinates().
|
private |
Definition at line 74 of file minecart_track_editor_panel.h.
Referenced by SetPickedCoordinates().
|
private |
Definition at line 76 of file minecart_track_editor_panel.h.
Referenced by Draw(), and SetRoomNavigationCallback().