mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 09:55:34 -05:00
move loader commit hash info to about popup
This commit is contained in:
parent
d61112d870
commit
94ab199406
1 changed files with 25 additions and 25 deletions
|
@ -174,24 +174,40 @@ void ModInfoPopup::onRepository(CCObject*) {
|
||||||
|
|
||||||
void ModInfoPopup::onInfo(CCObject*) {
|
void ModInfoPopup::onInfo(CCObject*) {
|
||||||
auto info = this->getMetadata();
|
auto info = this->getMetadata();
|
||||||
FLAlertLayer::create(
|
auto about = std::string();
|
||||||
nullptr,
|
if (info.getID() == "geode.loader") {
|
||||||
("About " + info.getName()).c_str(),
|
about = fmt::format(
|
||||||
fmt::format(
|
|
||||||
"<cr>ID:</c> {}\n"
|
"<cr>ID:</c> {}\n"
|
||||||
"<cg>Version:</c> {}\n"
|
"<cg>Version:</c> {}\n"
|
||||||
"<cy>Developers:</c> {}\n"
|
"<cy>Developers:</c> {}\n"
|
||||||
"<cy>Path:</c> {}\n",
|
"<ca>Bindings Commit Hash:</c> {}\n"
|
||||||
|
"<cp>Loader Commit Hash:</c> {}",
|
||||||
|
info.getID(),
|
||||||
|
info.getVersion().toString(),
|
||||||
|
ranges::join(info.getDevelopers(), ", "),
|
||||||
|
about::getBindingsCommitHash(),
|
||||||
|
about::getLoaderCommitHash()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
about = fmt::format(
|
||||||
|
"<cr>ID:</c> {}\n"
|
||||||
|
"<cg>Version:</c> {}\n"
|
||||||
|
"<cy>Developers:</c> {}\n"
|
||||||
|
"<ca>Path:</c> {}\n",
|
||||||
info.getID(),
|
info.getID(),
|
||||||
info.getVersion().toString(),
|
info.getVersion().toString(),
|
||||||
ranges::join(info.getDevelopers(), ", "),
|
ranges::join(info.getDevelopers(), ", "),
|
||||||
info.getPath().string()
|
info.getPath().string()
|
||||||
),
|
);
|
||||||
"OK",
|
}
|
||||||
|
FLAlertLayer::create(
|
||||||
nullptr,
|
nullptr,
|
||||||
|
("About " + info.getName()).c_str(),
|
||||||
|
about,
|
||||||
|
"OK", nullptr,
|
||||||
400.f
|
400.f
|
||||||
)
|
)->show();
|
||||||
->show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModInfoPopup::onChangelog(CCObject* sender) {
|
void ModInfoPopup::onChangelog(CCObject* sender) {
|
||||||
|
@ -410,22 +426,6 @@ bool LocalModInfoPopup::init(Mod* mod, ModListLayer* list) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mod == Mod::get()) {
|
|
||||||
// we're showing the internal geode mod :-)
|
|
||||||
auto* label = CCLabelBMFont::create(
|
|
||||||
fmt::format(
|
|
||||||
"Bindings: {}\nLoader: {}",
|
|
||||||
about::getBindingsCommitHash(),
|
|
||||||
about::getLoaderCommitHash()
|
|
||||||
).c_str(),
|
|
||||||
"chatFont.fnt"
|
|
||||||
);
|
|
||||||
label->setAlignment(kCCTextAlignmentRight);
|
|
||||||
label->setAnchorPoint({ .0f, .5f });
|
|
||||||
label->setScale(.5f);
|
|
||||||
label->setOpacity(89);
|
|
||||||
m_mainLayer->addChildAtPosition(label, Anchor::BottomRight, ccp(5, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
// issue report button
|
// issue report button
|
||||||
if (mod->getMetadata().getIssues()) {
|
if (mod->getMetadata().getIssues()) {
|
||||||
|
|
Loading…
Reference in a new issue