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 brief, human-readable name for the current placement mode.
52 // Uses the same string constants as InteractionModeManager::GetModeName so
53 // the toolset, status bar, and toolbar stay in sync — see
54 // interaction/interaction_mode.h's tool_mode_names namespace.
55 const char* GetToolModeName() const;
56
57 // Callbacks
58 void SetUndoCallback(std::function<void()> callback) {
59 undo_callback_ = callback;
60 }
61 void SetRedoCallback(std::function<void()> callback) {
62 redo_callback_ = callback;
63 }
64 void SetPaletteToggleCallback(std::function<void()> callback) {
65 palette_toggle_callback_ = callback;
66 }
67
68 private:
71
72 // Callbacks for editor actions
73 std::function<void()> undo_callback_;
74 std::function<void()> redo_callback_;
75 std::function<void()> palette_toggle_callback_;
76};
77
78} // namespace editor
79} // namespace yaze
80
81#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