mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-15 22:44:42 -04:00
dont skip mod updates if its disabled
This commit is contained in:
parent
d2a5135497
commit
bd9d0635aa
1 changed files with 10 additions and 19 deletions
|
@ -313,26 +313,17 @@ bool ModCell::init(
|
|||
auto viewSpr = ButtonSprite::create("View", "bigFont.fnt", "GJ_button_01.png", .8f);
|
||||
viewSpr->setScale(.65f);
|
||||
|
||||
if (m_mod->isEnabled()) {
|
||||
auto latestIndexItem = Index::get()->getMajorItem(
|
||||
mod->getMetadata().getID()
|
||||
auto latestIndexItem = Index::get()->getMajorItem(
|
||||
mod->getMetadata().getID()
|
||||
);
|
||||
|
||||
if (latestIndexItem && Index::get()->isUpdateAvailable(latestIndexItem)) {
|
||||
viewSpr->updateBGImage("GE_button_01.png"_spr);
|
||||
|
||||
auto minorIndexItem = Index::get()->getItem(
|
||||
mod->getMetadata().getID(),
|
||||
ComparableVersionInfo(mod->getMetadata().getVersion(), VersionCompare::MoreEq)
|
||||
);
|
||||
|
||||
if (latestIndexItem && Index::get()->isUpdateAvailable(latestIndexItem)) {
|
||||
viewSpr->updateBGImage("GE_button_01.png"_spr);
|
||||
|
||||
auto minorIndexItem = Index::get()->getItem(
|
||||
mod->getMetadata().getID(),
|
||||
ComparableVersionInfo(mod->getMetadata().getVersion(), VersionCompare::MoreEq)
|
||||
);
|
||||
|
||||
if (latestIndexItem->getMetadata().getVersion().getMajor() > minorIndexItem->getMetadata().getVersion().getMajor()) {
|
||||
auto updateIcon = CCSprite::createWithSpriteFrameName("updates-available.png"_spr);
|
||||
updateIcon->setZOrder(99);
|
||||
updateIcon->setScale(.5f);
|
||||
viewSpr->addChild(updateIcon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto viewBtn = CCMenuItemSpriteExtra::create(viewSpr, this, menu_selector(ModCell::onInfo));
|
||||
|
|
Loading…
Add table
Reference in a new issue