mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
feat(editor): content pack inspector and improved import UI
This commit is contained in:
parent
6acde0290d
commit
e191f35ed0
1 changed files with 16 additions and 4 deletions
|
|
@ -242,11 +242,23 @@ void EditorUI::renderMenuBar(EditorApp& app) {
|
|||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
if (ImGui::MenuItem("Import Content Pack (.wcp)")) {
|
||||
if (ImGui::BeginMenu("Content Packs (.wcp)")) {
|
||||
static char wcpImportPath[256] = "content.wcp";
|
||||
// Simple import — unpack to custom_zones/
|
||||
editor::ContentPacker::unpackZone(wcpImportPath, "custom_zones");
|
||||
app.showToast("Content pack imported to custom_zones/");
|
||||
ImGui::InputText("Path##wcp", wcpImportPath, sizeof(wcpImportPath));
|
||||
if (ImGui::MenuItem("Import (unpack to custom_zones/)")) {
|
||||
if (editor::ContentPacker::unpackZone(wcpImportPath, "custom_zones"))
|
||||
app.showToast("Content pack imported");
|
||||
else
|
||||
app.showToast("Import failed — check path");
|
||||
}
|
||||
if (ImGui::MenuItem("Inspect Pack Info")) {
|
||||
editor::ContentPackInfo info;
|
||||
if (editor::ContentPacker::readInfo(wcpImportPath, info))
|
||||
app.showToast(info.name + " by " + info.author + " (" + info.version + ")");
|
||||
else
|
||||
app.showToast("Cannot read pack info");
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
if (ImGui::BeginMenu("Import Heightmap", app.hasTerrainLoaded())) {
|
||||
static char hmPath[256] = "heightmap.raw";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue