File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 247247 "default" : true
248248 },
249249 "gd/UIOptionsLayer" : {
250- "name" : " ui " ,
250+ "name" : " Platformer Controls Settings " ,
251251 "description" : " UIOptionsLayer" ,
252252 "type" : " bool" ,
253253 "default" : true
254254 },
255255 "gd/UIPOptionsLayer" : {
256- "name" : " uip " ,
256+ "name" : " Practice Controls Settings " ,
257257 "description" : " UIPOptionsLayer" ,
258258 "type" : " bool" ,
259259 "default" : true
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ class Tags {
163163 return it->second ;
164164 }
165165 log::error (" Unknown tag: {}" , tag);
166- return " unknown " ;
166+ return " Unknown " ;
167167 }
168168
169169private:
Original file line number Diff line number Diff line change @@ -70,7 +70,18 @@ void GYScreenshotPopup::imageCreationFinished(CCImage* image) {
7070
7171void GYScreenshotPopup::onDownloadFail () {
7272 CCSprite* fallbackSprite = CCSprite::create (" noPreview.png" _spr);
73- m_mainLayer->addChildAtPosition (fallbackSprite, Anchor::Center);
73+ if (fallbackSprite) {
74+ auto maxWidth = m_mainLayer->getContentSize ().width * 0 .75f ;
75+ auto maxHeight = m_mainLayer->getContentSize ().height * 0 .75f ;
76+
77+ auto spriteWidth = fallbackSprite->getContentSize ().width ;
78+ auto spriteHeight = fallbackSprite->getContentSize ().height ;
79+
80+ float scale = std::min (maxWidth / spriteWidth, maxHeight / spriteHeight);
81+ fallbackSprite->setScale (scale);
82+
83+ m_mainLayer->addChildAtPosition (fallbackSprite, Anchor::Center);
84+ }
7485}
7586
7687std::string GYScreenshotPopup::extractLastSegment (const std::string& input) {
You can’t perform that action at this time.
0 commit comments