Skip to content

Commit d1c4935

Browse files
committed
v1.2.8
1 parent 561545e commit d1c4935

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
44
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
55
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
66

7-
project(DeltaruneTextboxes VERSION 1.2.7)
7+
project(DeltaruneTextboxes VERSION 1.2.8)
88

99
add_library(${PROJECT_NAME} SHARED
1010
src/FLAlertLayer.cpp

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### v1.2.8
2+
- Fixed a bug where the first dialog doesn't appear
3+
14
### v1.2.7
25
- Fixed a crash that sometimes happened when speaking to the shopkeeper (and maybe other characters)
36

mod.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"geode": "4.0.0-beta.1",
2+
"geode": "4.0.1",
33
"gd": {
44
"win": "2.2074",
55
"android": "2.2074",
@@ -8,7 +8,7 @@
88
},
99
"id": "timestepyt.deltarune_textboxes",
1010
"name": "Deltarune Textboxes",
11-
"version": "v1.2.7",
11+
"version": "v1.2.8",
1212
"developer": "TimeStepYT",
1313
"description": "Makes Popups look like Deltarune",
1414
"links": {

src/DialogLayer.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include "FLAlertLayer.h"
33

44
bool DeltaruneDialogLayer::init(DialogObject* dialogObject, CCArray* objects, int p2) {
5-
if (!DialogLayer::init(dialogObject, objects, p2)) return false;
65
m_fields->dialogObject = dialogObject;
76
std::string character;
87
char const* title;
@@ -13,15 +12,18 @@ bool DeltaruneDialogLayer::init(DialogObject* dialogObject, CCArray* objects, in
1312
title = character.c_str();
1413
}
1514
else {
15+
log::info("{}", objects);
1616
character = static_cast<DialogObject*>(objects->objectAtIndex(0))->m_character;
1717
title = character.c_str();
18-
for (int i = 0; i < objects->count(); i++) {
19-
if (text == "")
18+
for (size_t i = 0; i < objects->count(); i++) {
19+
if (text.length() == 0) {
2020
text = static_cast<DialogObject*>(objects->objectAtIndex(i))->m_text;
21+
}
2122
else
2223
text = fmt::format("{}\n\n\n\n{}", text, static_cast<DialogObject*>(objects->objectAtIndex(i))->m_text);
2324
}
2425
}
26+
if (!DialogLayer::init(dialogObject, objects, p2)) return false;
2527
auto unmodifiedAlert = FLAlertLayer::create(title, text, "OK");
2628
auto alert = static_cast<DeltaruneAlertLayer*>(unmodifiedAlert);
2729

@@ -65,7 +67,6 @@ bool DeltaruneDialogLayer::init(DialogObject* dialogObject, CCArray* objects, in
6567
return true;
6668
}
6769
void DeltaruneDialogLayer::displayNextObject() {
68-
DialogLayer::displayNextObject();
6970
this->setVisible(false);
7071
}
7172
void DeltaruneDialogLayer::displayDialogObject(DialogObject* obj) {

0 commit comments

Comments
 (0)