@@ -65,10 +65,41 @@ class $modify(MyMenuLayer, MenuLayer) {
6565
6666 float scale = CCDirector::sharedDirector ()->getContentScaleFactor ()/4 ;
6767
68- #ifndef GEODE_IS_MACOS
68+ #ifdef GEODE_IS_MACOS
69+ CCNode* bgContainer = CCNode::create ();
70+ CCSprite* bg0 = CCSprite::create (" panorama_0.png" _spr);
71+ CCSprite* bg1 = CCSprite::create (" panorama_1.png" _spr);
72+ CCSprite* bg2 = CCSprite::create (" panorama_2.png" _spr);
73+ CCSprite* bg3 = CCSprite::create (" panorama_3.png" _spr);
74+
75+ float scaleFactor = winSize.height / bg0->getContentHeight ();
76+
77+ bg0->setScale (scaleFactor);
78+ bg1->setScale (scaleFactor);
79+ bg2->setScale (scaleFactor);
80+ bg3->setScale (scaleFactor);
81+
82+ bgContainer->setContentSize (bg0->getScaledContentSize ());
83+ bgContainer->setContentWidth (bg0->getScaledContentWidth () * 4 );
84+
85+ bgContainer->addChild (bg0);
86+ bgContainer->addChild (bg1);
87+ bgContainer->addChild (bg2);
88+ bgContainer->addChild (bg3);
89+
90+ RowLayout* layout = RowLayout::create ();
91+ layout->setGap (0 );
92+ layout->setAutoScale (false );
93+
94+ bgContainer->setLayout (layout);
95+ bgContainer->updateLayout ();
96+ bgContainer->setAnchorPoint ({0 .5f , 0 .5f });
97+ bgContainer->setPosition (winSize/2 );
98+
99+ this ->addChild (bgContainer);
100+ #else
69101 Panorama* panorama = Panorama::create ();
70102 panorama->setID (" minecraft-panorama" _spr);
71-
72103 this ->addChild (panorama);
73104 #endif
74105
0 commit comments