Skip to content

Commit 59fb9a6

Browse files
committed
Added IDPackLayer.cpp
1 parent 241f724 commit 59fb9a6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include <Geode/Geode.hpp>
2+
#include "../../SwelvyBG.hpp"
3+
#include "../../Hooks/Hooker.hpp"
4+
class IDPackLayer : public Betterhook::HookBetter {
5+
void init(CCNode* _This) override {
6+
if (auto bg = _This->getChildByType<CCSprite>(0)) {
7+
bg->setVisible(false);
8+
}
9+
SwelvyBG* swelvyBG = SwelvyBG::create();
10+
swelvyBG->setZOrder(-1);
11+
swelvyBG->setID("swelvy-background");
12+
_This->addChild(swelvyBG);
13+
}
14+
15+
const char* PutLayer() const override { return "IDPackLayer"; }
16+
};
17+
18+
19+
REGISTER_HookBetter(IDPackLayer);
20+

0 commit comments

Comments
 (0)