Skip to content

Commit ad890ef

Browse files
committed
1.2.0
1 parent b1149ba commit ad890ef

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### v1.2.0
2+
- Fixed a crash that happens if a DialogLayer scrolled without finishing the dialog first
3+
14
### v1.1.9
25
- Fixed a crash when not having shadows on (or Sans or Papyrus font)
36
- Fixed some text tags showing with Papyrus font

mod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"id": "timestepyt.deltarune_textboxes",
1010
"name": "Deltarune Textboxes",
11-
"version": "v1.1.9",
11+
"version": "v1.2.0",
1212
"developer": "TimeStepYT",
1313
"description": "Makes Popups look like Deltarune",
1414
"links": {

src/FLAlertLayer.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -454,20 +454,22 @@ void DeltaruneAlertLayer::progressText() {
454454

455455
auto& characters = m_fields->characterSpriteNames;
456456
int& dialogCount = m_fields->dialogCount;
457-
if (characters.size() > 1) {
457+
bool progressDialog = emptyLines > 0 && characters.size() > 1;
458+
if (progressDialog) {
458459
dialogCount++;
459460
auto& spriteName = characters[dialogCount];
460461
auto prevChar = (CCSpriteGrayscale*) m_mainLayer->getChildByID("character-sprite"_spr);
461462
auto newChar = CCSpriteGrayscale::create(spriteName);
462-
auto title = m_fields->titles[dialogCount];
463-
auto& nameToSound = m_fields->nameToSound;
464-
m_fields->title->setString(title.c_str());
465463
newChar->setPosition(prevChar->getPosition());
466464
newChar->setZOrder(prevChar->getZOrder());
467465
m_fields->characterSprite = newChar;
468-
m_mainLayer->removeChildByID("character-sprite"_spr);
469-
m_mainLayer->addChild(newChar);
470466
newChar->setID("character-sprite"_spr);
467+
m_mainLayer->addChild(newChar);
468+
469+
auto title = m_fields->titles[dialogCount];
470+
auto& nameToSound = m_fields->nameToSound;
471+
m_fields->title->setString(title.c_str());
472+
m_mainLayer->removeChildByID("character-sprite"_spr);
471473
if (nameToSound.find(title.c_str()) != nameToSound.end())
472474
m_fields->textSound = nameToSound[title.c_str()];
473475
else

0 commit comments

Comments
 (0)