Add EditingMode to OverworldEditor
This commit is contained in:
@@ -62,15 +62,36 @@ absl::Status OverworldEditor::DrawToolset() {
|
|||||||
for (const auto &name : kToolsetColumnNames)
|
for (const auto &name : kToolsetColumnNames)
|
||||||
ImGui::TableSetupColumn(name.data());
|
ImGui::TableSetupColumn(name.data());
|
||||||
|
|
||||||
BUTTON_COLUMN(ICON_MD_UNDO) // Undo
|
NEXT_COLUMN()
|
||||||
BUTTON_COLUMN(ICON_MD_REDO) // Redo
|
if (ImGui::Button(ICON_MD_UNDO)) {
|
||||||
TEXT_COLUMN(ICON_MD_MORE_VERT) // Separator
|
RETURN_IF_ERROR(Undo())
|
||||||
BUTTON_COLUMN(ICON_MD_ZOOM_OUT) // Zoom Out
|
}
|
||||||
BUTTON_COLUMN(ICON_MD_ZOOM_IN) // Zoom In
|
|
||||||
TEXT_COLUMN(ICON_MD_MORE_VERT) // Separator
|
NEXT_COLUMN()
|
||||||
BUTTON_COLUMN(ICON_MD_DRAW) // Draw Tile
|
if (ImGui::Button(ICON_MD_REDO)) {
|
||||||
BUTTON_COLUMN(ICON_MD_DOOR_FRONT) // Entrances
|
RETURN_IF_ERROR(Redo())
|
||||||
BUTTON_COLUMN(ICON_MD_DOOR_BACK) // Exits
|
}
|
||||||
|
|
||||||
|
TEXT_COLUMN(ICON_MD_MORE_VERT) // Separator
|
||||||
|
BUTTON_COLUMN(ICON_MD_ZOOM_OUT) // Zoom Out
|
||||||
|
BUTTON_COLUMN(ICON_MD_ZOOM_IN) // Zoom In
|
||||||
|
TEXT_COLUMN(ICON_MD_MORE_VERT) // Separator
|
||||||
|
|
||||||
|
NEXT_COLUMN()
|
||||||
|
if (ImGui::Button(ICON_MD_DRAW)) {
|
||||||
|
current_mode = EditingMode::DRAW_TILE;
|
||||||
|
}
|
||||||
|
|
||||||
|
NEXT_COLUMN()
|
||||||
|
if (ImGui::Button(ICON_MD_DOOR_FRONT)) {
|
||||||
|
current_mode = EditingMode::ENTRANCES;
|
||||||
|
}
|
||||||
|
|
||||||
|
NEXT_COLUMN()
|
||||||
|
if (ImGui::Button(ICON_MD_DOOR_BACK)) {
|
||||||
|
current_mode = EditingMode::EXITS;
|
||||||
|
}
|
||||||
|
|
||||||
BUTTON_COLUMN(ICON_MD_GRASS) // Items
|
BUTTON_COLUMN(ICON_MD_GRASS) // Items
|
||||||
BUTTON_COLUMN(ICON_MD_PEST_CONTROL_RODENT) // Sprites
|
BUTTON_COLUMN(ICON_MD_PEST_CONTROL_RODENT) // Sprites
|
||||||
BUTTON_COLUMN(ICON_MD_ADD_LOCATION) // Transports
|
BUTTON_COLUMN(ICON_MD_ADD_LOCATION) // Transports
|
||||||
|
|||||||
@@ -102,6 +102,18 @@ class OverworldEditor : public Editor, public SharedROM {
|
|||||||
|
|
||||||
absl::Status DrawExperimentalModal();
|
absl::Status DrawExperimentalModal();
|
||||||
|
|
||||||
|
enum class EditingMode {
|
||||||
|
DRAW_TILE,
|
||||||
|
ENTRANCES,
|
||||||
|
EXITS,
|
||||||
|
ITEMS,
|
||||||
|
SPRITES,
|
||||||
|
TRANSPORTS,
|
||||||
|
MUSIC
|
||||||
|
};
|
||||||
|
|
||||||
|
EditingMode current_mode = EditingMode::DRAW_TILE;
|
||||||
|
|
||||||
int current_world_ = 0;
|
int current_world_ = 0;
|
||||||
int current_map_ = 0;
|
int current_map_ = 0;
|
||||||
int current_tile16_ = 0;
|
int current_tile16_ = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user