linter
This commit is contained in:
@@ -10,7 +10,7 @@ void Writer::update(float delta_time) {
|
||||
writing_timer_ += delta_time;
|
||||
if (writing_timer_ >= speed_interval_) {
|
||||
index_++;
|
||||
writing_timer_ = 0.0f;
|
||||
writing_timer_ = 0.0F;
|
||||
}
|
||||
|
||||
if (index_ == length_) {
|
||||
@@ -27,7 +27,7 @@ void Writer::update(float delta_time) {
|
||||
// Actualiza el objeto (delta_time en segundos)
|
||||
void Writer::updateS(float delta_time) {
|
||||
// Convierte segundos a milisegundos y usa la lógica normal
|
||||
update(delta_time * 1000.0f);
|
||||
update(delta_time * 1000.0F);
|
||||
}
|
||||
|
||||
// Dibuja el objeto en pantalla
|
||||
@@ -61,16 +61,16 @@ void Writer::setCaption(const std::string& text) {
|
||||
// Establece el valor de la variable (frames)
|
||||
void Writer::setSpeed(int value) {
|
||||
// Convierte frames a milisegundos (frames * 16.67ms)
|
||||
constexpr float FRAME_TIME_MS = 16.67f;
|
||||
constexpr float FRAME_TIME_MS = 16.67F;
|
||||
speed_interval_ = static_cast<float>(value) * FRAME_TIME_MS;
|
||||
writing_timer_ = 0.0f;
|
||||
writing_timer_ = 0.0F;
|
||||
}
|
||||
|
||||
// Establece la velocidad en segundos entre caracteres
|
||||
void Writer::setSpeedS(float value) {
|
||||
// Convierte segundos a milisegundos para consistencia interna
|
||||
speed_interval_ = value * 1000.0f;
|
||||
writing_timer_ = 0.0f;
|
||||
speed_interval_ = value * 1000.0F;
|
||||
writing_timer_ = 0.0F;
|
||||
}
|
||||
|
||||
// Establece el valor de la variable
|
||||
@@ -86,13 +86,13 @@ auto Writer::isEnabled() const -> bool {
|
||||
// Establece el temporizador para deshabilitar el objeto (en milisegundos)
|
||||
void Writer::setFinishedTimerMs(float time_ms) {
|
||||
enabled_timer_target_ = time_ms;
|
||||
enabled_timer_ = 0.0f;
|
||||
enabled_timer_ = 0.0F;
|
||||
}
|
||||
|
||||
// Establece el temporizador para deshabilitar el objeto (en segundos)
|
||||
void Writer::setFinishedTimerS(float time_s) {
|
||||
enabled_timer_target_ = time_s * 1000.0f; // Convertir segundos a milisegundos
|
||||
enabled_timer_ = 0.0f;
|
||||
enabled_timer_target_ = time_s * 1000.0F; // Convertir segundos a milisegundos
|
||||
enabled_timer_ = 0.0F;
|
||||
}
|
||||
|
||||
// Centra la cadena de texto a un punto X
|
||||
|
||||
Reference in New Issue
Block a user