diff --git a/src/app/editor/overworld_editor.cc b/src/app/editor/overworld_editor.cc index 07bf8916..fb82d31e 100644 --- a/src/app/editor/overworld_editor.cc +++ b/src/app/editor/overworld_editor.cc @@ -62,15 +62,36 @@ absl::Status OverworldEditor::DrawToolset() { for (const auto &name : kToolsetColumnNames) ImGui::TableSetupColumn(name.data()); - BUTTON_COLUMN(ICON_MD_UNDO) // Undo - BUTTON_COLUMN(ICON_MD_REDO) // Redo - 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 - BUTTON_COLUMN(ICON_MD_DRAW) // Draw Tile - BUTTON_COLUMN(ICON_MD_DOOR_FRONT) // Entrances - BUTTON_COLUMN(ICON_MD_DOOR_BACK) // Exits + NEXT_COLUMN() + if (ImGui::Button(ICON_MD_UNDO)) { + RETURN_IF_ERROR(Undo()) + } + + NEXT_COLUMN() + if (ImGui::Button(ICON_MD_REDO)) { + RETURN_IF_ERROR(Redo()) + } + + 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_PEST_CONTROL_RODENT) // Sprites BUTTON_COLUMN(ICON_MD_ADD_LOCATION) // Transports diff --git a/src/app/editor/overworld_editor.h b/src/app/editor/overworld_editor.h index c2dea7df..ecad2e7e 100644 --- a/src/app/editor/overworld_editor.h +++ b/src/app/editor/overworld_editor.h @@ -102,6 +102,18 @@ class OverworldEditor : public Editor, public SharedROM { 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_map_ = 0; int current_tile16_ = 0;