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) |
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 19 of file dungeon_toolset.cc.
References background_type_, ICON_MD_GRASS, ICON_MD_INVENTORY, ICON_MD_MORE_VERT, ICON_MD_NAVIGATION, ICON_MD_PALETTE, ICON_MD_PEST_CONTROL, ICON_MD_REDO, ICON_MD_SENSOR_DOOR, ICON_MD_SQUARE, ICON_MD_UNDO, ICON_MD_VIEW_MODULE, kBackground1, kBackground2, kBackground3, kBackgroundAny, kBlock, kChest, kDoor, kEntrance, kItem, kObject, kSprite, palette_toggle_callback_, placement_type_, redo_callback_, and undo_callback_.
|
inline |
Definition at line 44 of file dungeon_toolset.h.
References background_type_.
Referenced by yaze::test::TEST(), and yaze::test::TEST().
|
inline |
Definition at line 45 of file dungeon_toolset.h.
References placement_type_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 48 of file dungeon_toolset.h.
References background_type_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 49 of file dungeon_toolset.h.
References placement_type_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 52 of file dungeon_toolset.h.
References undo_callback_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 53 of file dungeon_toolset.h.
References redo_callback_.
Referenced by yaze::test::TEST().
|
inline |
Definition at line 54 of file dungeon_toolset.h.
References palette_toggle_callback_.
Referenced by yaze::test::TEST().
|
private |
Definition at line 57 of file dungeon_toolset.h.
Referenced by background_type(), Draw(), and set_background_type().
|
private |
Definition at line 58 of file dungeon_toolset.h.
Referenced by Draw(), placement_type(), and set_placement_type().
|
private |
Definition at line 61 of file dungeon_toolset.h.
Referenced by Draw(), and SetUndoCallback().
|
private |
Definition at line 62 of file dungeon_toolset.h.
Referenced by Draw(), and SetRedoCallback().
|
private |
Definition at line 63 of file dungeon_toolset.h.
Referenced by Draw(), and SetPaletteToggleCallback().