Skip to content

Commit ddb597e

Browse files
committed
No mac pano, just ugly image
1 parent 2005033 commit ddb597e

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

mod.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@
5555
"id": "undefined0.icon_ninja",
5656
"version": "*",
5757
"importance": "breaking"
58+
},
59+
{
60+
"id": "timestepyt.deltarune_textboxes",
61+
"version": "*",
62+
"importance": "breaking"
5863
}
5964
]
6065
}

src/ui/hooks/LoadingLayer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ class $modify(MyLoadingLayer, LoadingLayer){
9797
Utils::getNodeSafe(this, "fmod-logo")->setVisible(false);
9898
Utils::getNodeSafe(this, "cocos2d-logo")->setVisible(false);
9999
Utils::getNodeSafe(this, "progress-slider")->setVisible(false);
100+
Utils::getNodeSafe(this, "raydeeux.loadingscreentweaks/custom-splash-text")->setVisible(false);
101+
100102
this->m_sliderBar->setVisible(false);
101103

102104
auto winSize = CCDirector::sharedDirector()->getWinSize();

src/ui/hooks/MenuLayer.h

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)