Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
RayDeeUx committed Jul 23, 2024
1 parent 50484c6 commit 25155a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ std::vector<std::string> wETMigration;
std::string fallbackString = "We've got too many players to congratulate on level completions. Beat this level again for an actual message.";

int fps = -1;
int64_t originalOpacity = 0;

bool isCompactEndscreen;
bool isGDMO;
Expand Down Expand Up @@ -200,7 +201,7 @@ class $modify(MyEndLevelLayer, EndLevelLayer) {
}
if (auto mainLayer = getChildByIDRecursive("main-layer")) {
mainLayer->setVisible(!mainLayer->isVisible());
if (mainLayer->isVisible()) { this->setOpacity(255); }
if (mainLayer->isVisible()) { this->setOpacity(originalOpacity); }
else { this->setOpacity(0); }
}
if (auto hideButtonSprite = MyEndLevelLayer::getHideButtonSprite()) {
Expand Down Expand Up @@ -242,6 +243,7 @@ class $modify(MyEndLevelLayer, EndLevelLayer) {
desiredSpriteYPosition = hideButtonButton->getPositionY() - hideButtonButton->getContentHeight();
}
if (MyEndLevelLayer::getModBool("hideEndLevelLayer")) {
originalOpacity = this->getOpacity();
this->setOpacity(0);
if (auto mainLayer = getChildByIDRecursive("main-layer")) {
mainLayer->setVisible(false);
Expand Down

0 comments on commit 25155a8

Please sign in to comment.