Handles the dungeon editor toolset UI. More...
#include <dungeon_toolset.h>
Public Types | |
| enum | BackgroundType { kNoBackground , kBackground1 , kBackground2 , kBackground3 , kBackgroundAny } |
| enum | PlacementType { kNoType , kObject , kSprite , kItem , kEntrance , kDoor , kChest , kBlock } |
Public Member Functions | |
| DungeonToolset ()=default | |
| void | Draw () |
| BackgroundType | background_type () const |
| PlacementType | placement_type () const |
| void | set_background_type (BackgroundType type) |
| void | set_placement_type (PlacementType type) |
| const char * | GetToolModeName () const |
| void | SetUndoCallback (std::function< void()> callback) |
| void | SetRedoCallback (std::function< void()> callback) |
| void | SetPaletteToggleCallback (std::function< void()> callback) |
Private Attributes | |
| BackgroundType | background_type_ = kBackgroundAny |
| PlacementType | placement_type_ = kNoType |
| std::function< void()> | undo_callback_ |
| std::function< void()> | redo_callback_ |
| std::function< void()> | palette_toggle_callback_ |
Handles the dungeon editor toolset UI.
This component manages the toolbar with placement modes, background layer selection, and other editing tools.
Definition at line 18 of file dungeon_toolset.h.
| Enumerator | |
|---|---|
| kNoBackground | |
| kBackground1 | |
| kBackground2 | |
| kBackground3 | |
| kBackgroundAny | |
Definition at line 20 of file dungeon_toolset.h.
| Enumerator | |
|---|---|
| kNoType | |
| kObject | |
| kSprite | |
| kItem | |
| kEntrance | |
| kDoor | |
| kChest | |
| kBlock | |
Definition at line 28 of file dungeon_toolset.h.
|
default |
| void yaze::editor::DungeonToolset::Draw | ( | ) |
Definition at line 35 of file dungeon_toolset.cc.
References background_type_, yaze::gui::ThemeManager::Get(), yaze::gui::ThemeManager::GetCurrentTheme(), ICON_MD_PALETTE, ICON_MD_REDO, ICON_MD_UNDO, kBackground1, kBackground2, kBackground3, kBackgroundAny, palette_toggle_callback_, placement_type_, redo_callback_, yaze::gui::ThemedIconButton(), and undo_callback_.

|
inline |
Definition at line 44 of file dungeon_toolset.h.
References background_type_.
|
inline |
Definition at line 45 of file dungeon_toolset.h.
References placement_type_.
|
inline |
Definition at line 48 of file dungeon_toolset.h.
References background_type_.
|
inline |
Definition at line 49 of file dungeon_toolset.h.
References placement_type_.
| const char * yaze::editor::DungeonToolset::GetToolModeName | ( | ) | const |
Definition at line 99 of file dungeon_toolset.cc.
References placement_type_.
|
inline |
Definition at line 56 of file dungeon_toolset.h.
References undo_callback_.
|
inline |
Definition at line 59 of file dungeon_toolset.h.
References redo_callback_.
|
inline |
Definition at line 62 of file dungeon_toolset.h.
References palette_toggle_callback_.
|
private |
Definition at line 67 of file dungeon_toolset.h.
Referenced by background_type(), Draw(), and set_background_type().
|
private |
Definition at line 68 of file dungeon_toolset.h.
Referenced by Draw(), GetToolModeName(), placement_type(), and set_placement_type().
|
private |
Definition at line 71 of file dungeon_toolset.h.
Referenced by Draw(), and SetUndoCallback().
|
private |
Definition at line 72 of file dungeon_toolset.h.
Referenced by Draw(), and SetRedoCallback().
|
private |
Definition at line 73 of file dungeon_toolset.h.
Referenced by Draw(), and SetPaletteToggleCallback().