This commit is contained in:
2026-04-17 22:20:37 +02:00
parent 513eacf356
commit 20b9a95619
38 changed files with 310 additions and 622 deletions

View File

@@ -3,23 +3,20 @@
#include "core/rendering/text.h" // for Text
// Constructor
Writer::Writer(Text *text) {
// Copia los punteros
this->text = text;
// Inicializa variables
posX = 0;
posY = 0;
kerning = 0;
caption = "";
speed = 0;
writingCounter = 0;
index = 0;
lenght = 0;
completed = false;
enabled = false;
enabledCounter = 0;
finished = false;
Writer::Writer(Text *text)
: text(text),
posX(0),
posY(0),
kerning(0),
caption(""),
speed(0),
writingCounter(0),
index(0),
lenght(0),
completed(false),
enabled(false),
enabledCounter(0),
finished(false) {
}
// Actualiza el objeto
@@ -73,7 +70,7 @@ void Writer::setKerning(int value) {
}
// Establece el valor de la variable
void Writer::setCaption(std::string text) {
void Writer::setCaption(const std::string &text) {
caption = text;
lenght = text.length();
}