yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
object_editor_card.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_OBJECT_EDITOR_CARD_H
2#define YAZE_APP_EDITOR_DUNGEON_OBJECT_EDITOR_CARD_H
3
4#include <memory>
5#include <unordered_map>
6
9#include "app/gui/canvas.h"
13#include "app/rom.h"
15
16namespace yaze {
17namespace editor {
18
30 public:
31 ObjectEditorCard(gfx::IRenderer* renderer, Rom* rom, DungeonCanvasViewer* canvas_viewer);
32
33 // Main update function
34 void Draw(bool* p_open);
35
36 // Access to components
39
40 // Update current room context
41 void SetCurrentRoom(int room_id) { current_room_id_ = room_id; }
42
43 private:
44 void DrawObjectSelector();
48 void DrawObjectPreviewIcon(int object_id, const ImVec2& size);
49
53
54 // Components
57
58 // Object preview canvases (one per object type)
59 std::unordered_map<int, gui::Canvas> object_preview_canvases_;
60
61 // UI state
63 bool show_emulator_preview_ = false; // Disabled by default for performance
64 bool show_object_list_ = true;
66
67 // Object interaction mode
68 enum class InteractionMode {
69 None,
70 Place,
71 Select,
72 Delete
73 };
75
76 // Selected object for placement
78 bool has_preview_object_ = false;
80};
81
82} // namespace editor
83} // namespace yaze
84
85#endif // YAZE_APP_EDITOR_DUNGEON_OBJECT_EDITOR_CARD_H
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:71
Handles the main dungeon canvas rendering and interaction.
Handles object selection, preview, and editing UI.
Unified card combining object selection, emulator preview, and canvas interaction.
gui::DungeonObjectEmulatorPreview emulator_preview_
DungeonCanvasViewer * canvas_viewer_
DungeonObjectSelector object_selector_
void DrawObjectPreviewIcon(int object_id, const ImVec2 &size)
gui::DungeonObjectEmulatorPreview & emulator_preview()
DungeonObjectSelector & object_selector()
std::unordered_map< int, gui::Canvas > object_preview_canvases_
Defines an abstract interface for all rendering operations.
Definition irenderer.h:35
Main namespace for the application.