2022-08-01 11:18:03 -04:00
|
|
|
#include <array>
|
|
|
|
|
|
|
|
USE_GEODE_NAMESPACE();
|
|
|
|
|
2022-10-13 04:31:23 -04:00
|
|
|
#include <codegenned/modify/LoadingLayer.hpp>
|
2022-08-01 11:18:03 -04:00
|
|
|
class $modify(CustomLoadingLayer, LoadingLayer) {
|
|
|
|
bool init(bool fromReload) {
|
|
|
|
if (!LoadingLayer::init(fromReload))
|
|
|
|
return false;
|
|
|
|
|
|
|
|
auto winSize = CCDirector::sharedDirector()->getWinSize();
|
|
|
|
|
|
|
|
auto count = Loader::get()->getAllMods().size();
|
|
|
|
|
|
|
|
auto label = CCLabelBMFont::create(
|
|
|
|
CCString::createWithFormat(
|
|
|
|
"Geode: Loaded %lu mods",
|
|
|
|
static_cast<unsigned long>(count)
|
|
|
|
)->getCString(),
|
|
|
|
"goldFont.fnt"
|
|
|
|
);
|
|
|
|
label->setPosition(winSize.width / 2, 30.f);
|
|
|
|
label->setScale(.45f);
|
|
|
|
label->setTag(5);
|
|
|
|
this->addChild(label);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
};
|