mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 00:53:52 +00:00
fix(editor): improved WCP inspect toast with version and format info
This commit is contained in:
parent
539de3f5b0
commit
6747456f48
1 changed files with 8 additions and 4 deletions
|
|
@ -253,10 +253,14 @@ void EditorUI::renderMenuBar(EditorApp& app) {
|
|||
}
|
||||
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");
|
||||
if (editor::ContentPacker::readInfo(wcpImportPath, info)) {
|
||||
std::string msg = info.name + " v" + info.version;
|
||||
if (!info.author.empty()) msg += " by " + info.author;
|
||||
msg += " (" + info.format + ")";
|
||||
app.showToast(msg);
|
||||
} else {
|
||||
app.showToast("Cannot read pack — check path");
|
||||
}
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue