@@ -12,13 +12,24 @@ class $modify(MyFLAlertLayer, FLAlertLayer){
1212 if (!Loader::get ()->isModLoaded (" geode.node-ids" )) return true ;
1313
1414 CCNode* mainLayer = getChildByID (" main-layer" );
15+
16+ bool hasScroll = mainLayer->getChildByID (" scroll-layer" );
1517
1618 float scale = CCDirector::sharedDirector ()->getContentScaleFactor ()/4 ;
1719
1820 if (CCScale9Sprite* background = typeinfo_cast<CCScale9Sprite*>(mainLayer->getChildByID (" background" ))){
1921 CCScale9Sprite* newBackground = CCScale9Sprite::create (" ui_background.png" _spr);
2022 newBackground->setColor (background->getColor ());
21- newBackground->setContentSize (background->getContentSize () / 4 / scale);
23+
24+ CCSize newBGSize = background->getContentSize () / 4 / scale;
25+
26+ float sizeIncrease = 0 ;
27+
28+ if (!hasScroll){
29+ sizeIncrease = 10 ;
30+ }
31+
32+ newBackground->setContentSize ({newBGSize.width + sizeIncrease, newBGSize.height });
2233 newBackground->setScale (background->getScale () * 4 * scale);
2334 newBackground->setPosition ({mainLayer->getContentSize ().width /2 , mainLayer->getContentSize ().height /2 });
2435 newBackground->setAnchorPoint (background->getAnchorPoint ());
@@ -60,6 +71,9 @@ class $modify(MyFLAlertLayer, FLAlertLayer){
6071 text->setAnchorPoint ({0.5 , 0 });
6172 text->setScale (0 .6f );
6273 text->setPosition ({0 , text->getPosition ().y });
74+ std::string labelText = std::string (text->getString ());
75+ Utils::trim (labelText);
76+ text->setString (labelText.c_str ());
6377 }
6478 }
6579
@@ -77,6 +91,9 @@ class $modify(MyFLAlertLayer, FLAlertLayer){
7791 text->setAnchorPoint ({0.5 , 1 });
7892 text->setScale (0 .6f );
7993 text->setPosition ({0 , text->getPosition ().y });
94+ std::string labelText = std::string (text->getString ());
95+ Utils::trim (labelText);
96+ text->setString (labelText.c_str ());
8097 }
8198
8299 contentLayer->setContentSize (textArea->getScaledContentSize ());
@@ -120,7 +137,7 @@ class $modify(MyFLAlertLayer, FLAlertLayer){
120137 RowLayout* rowLayout = RowLayout::create ();
121138 rowLayout->ignoreInvisibleChildren (true );
122139
123- CCMenu * innerButtonMenu = CCMenu ::create ();
140+ CCNode * innerButtonMenu = CCNode ::create ();
124141
125142 innerButtonMenu->setContentSize ({400 , 30 });
126143 innerButtonMenu->setLayout (rowLayout);
0 commit comments