File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,26 @@ bool __creatorlayer__init__ = false;
7
7
8
8
class $modify(CCSpriteGrayscale)
9
9
{
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
+
10
30
static CCSpriteGrayscale* createWithSpriteFrameName (gd::string const & spr)
11
31
{
12
32
auto res = CCSpriteGrayscale::createWithSpriteFrameName (spr);
@@ -23,6 +43,8 @@ class $modify(CCSpriteGrayscale)
23
43
return res;
24
44
}
25
45
46
+ #endif
47
+
26
48
static void onModify (auto & self) {
27
49
std::vector<geode::Hook*> hooks;
28
50
You can’t perform that action at this time.
0 commit comments