Skip to content

Commit 8a3372b

Browse files
committed
blehhh
1 parent a7565e2 commit 8a3372b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/Hacks/UnlockButtons.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,26 @@ bool __creatorlayer__init__ = false;
77

88
class $modify(CCSpriteGrayscale)
99
{
10+
#ifdef GEODE_IS_IOS
11+
12+
static CCSpriteGrayscale* createWithSpriteFrame(CCSpriteFrame* frame)
13+
{
14+
auto res = CCSpriteGrayscale::createWithSpriteFrame(frame);
15+
16+
if (!__creatorlayer__init__)
17+
return res;
18+
19+
auto spr2 = CCSprite::createWithSpriteFrameName(spr.c_str());
20+
spr2->setPosition(res->getContentSize() / 2);
21+
22+
res->addChild(spr2);
23+
res->setOpacity(0);
24+
25+
return res;
26+
}
27+
28+
#else
29+
1030
static CCSpriteGrayscale* createWithSpriteFrameName(gd::string const& spr)
1131
{
1232
auto res = CCSpriteGrayscale::createWithSpriteFrameName(spr);
@@ -23,6 +43,8 @@ class $modify(CCSpriteGrayscale)
2343
return res;
2444
}
2545

46+
#endif
47+
2648
static void onModify(auto& self) {
2749
std::vector<geode::Hook*> hooks;
2850

0 commit comments

Comments
 (0)