feat: Implement Jump-to Functionality for Cross-Editor Navigation
- Added JumpToDungeonRoom and JumpToOverworldMap methods to facilitate quick navigation between dungeon and overworld editors. - Introduced SwitchToEditor method to manage editor tab activation based on the selected editor type. - Enhanced DungeonEditorV2 with room and entrance selection capabilities, improving user experience and workflow efficiency. - Updated header files to declare new methods and ensure proper integration within the editor management system.
This commit is contained in:
@@ -101,6 +101,14 @@ class OverworldEditor : public Editor, public gfx::GfxContext {
|
||||
if (!rom_->is_loaded()) return "ROM failed to load";
|
||||
return absl::StrFormat("ROM loaded: %s", rom_->title());
|
||||
}
|
||||
|
||||
// Jump-to functionality
|
||||
void set_current_map(int map_id) {
|
||||
if (map_id >= 0 && map_id < zelda3::kNumOverworldMaps) {
|
||||
current_map_ = map_id;
|
||||
current_world_ = map_id / 0x40; // Calculate which world the map belongs to
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Load the Bitmap objects for each OverworldMap.
|
||||
|
||||
@@ -15,10 +15,10 @@ using namespace ImGui;
|
||||
|
||||
// Entity colors - solid with good visibility
|
||||
namespace {
|
||||
ImVec4 GetEntranceColor() { return ImVec4(0.0f, 255.0f, 0.0f, 255.0f); } // Solid green
|
||||
ImVec4 GetExitColor() { return ImVec4(255.0f, 0.0f, 0.0f, 255.0f); } // Solid red
|
||||
ImVec4 GetItemColor() { return ImVec4(255.0f, 255.0f, 0.0f, 255.0f); } // Solid yellow
|
||||
ImVec4 GetSpriteColor() { return ImVec4(255.0f, 128.0f, 0.0f, 255.0f); } // Solid orange
|
||||
ImVec4 GetEntranceColor() { return ImVec4{1.0f, 1.0f, 0.0f, 1.0f}; } // Solid yellow (#FFFF00FF, fully opaque)
|
||||
ImVec4 GetExitColor() { return ImVec4{1.0f, 1.0f, 1.0f, 1.0f}; } // Solid white (#FFFFFFFF, fully opaque)
|
||||
ImVec4 GetItemColor() { return ImVec4{1.0f, 0.0f, 0.0f, 1.0f}; } // Solid red (#FF0000FF, fully opaque)
|
||||
ImVec4 GetSpriteColor() { return ImVec4{1.0f, 0.0f, 1.0f, 1.0f}; } // Solid magenta (#FF00FFFF, fully opaque)
|
||||
} // namespace
|
||||
|
||||
void OverworldEntityRenderer::DrawEntrances(ImVec2 canvas_p0, ImVec2 scrolling,
|
||||
|
||||
Reference in New Issue
Block a user