yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_toolset.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_DUNGEON_DUNGEON_TOOLSET_H
2#define YAZE_APP_EDITOR_DUNGEON_DUNGEON_TOOLSET_H
3
4#include <array>
5#include <functional>
6
7#include "imgui/imgui.h"
8
9namespace yaze {
10namespace editor {
11
19 public:
27
30 kObject, // Object editing mode
31 kSprite, // Sprite editing mode
32 kItem, // Item placement mode
33 kEntrance, // Entrance/exit editing mode
34 kDoor, // Door configuration mode
35 kChest, // Chest management mode
36 kBlock // Legacy block mode
37 };
38
39 DungeonToolset() = default;
40
41 void Draw();
42
43 // Getters
46
47 // Setters
50
51 // Returns a human-readable name for the current placement mode
52 // (e.g., "Select", "Objects", "Sprites")
53 const char* GetToolModeName() const;
54
55 // Callbacks
56 void SetUndoCallback(std::function<void()> callback) {
57 undo_callback_ = callback;
58 }
59 void SetRedoCallback(std::function<void()> callback) {
60 redo_callback_ = callback;
61 }
62 void SetPaletteToggleCallback(std::function<void()> callback) {
63 palette_toggle_callback_ = callback;
64 }
65
66 private:
69
70 // Callbacks for editor actions
71 std::function<void()> undo_callback_;
72 std::function<void()> redo_callback_;
73 std::function<void()> palette_toggle_callback_;
74};
75
76} // namespace editor
77} // namespace yaze
78
79#endif // YAZE_APP_EDITOR_DUNGEON_DUNGEON_TOOLSET_H
Handles the dungeon editor toolset UI.
void SetUndoCallback(std::function< void()> callback)
const char * GetToolModeName() const
void set_background_type(BackgroundType type)
void SetPaletteToggleCallback(std::function< void()> callback)
std::function< void()> undo_callback_
PlacementType placement_type() const
std::function< void()> palette_toggle_callback_
void set_placement_type(PlacementType type)
void SetRedoCallback(std::function< void()> callback)
std::function< void()> redo_callback_
BackgroundType background_type() const