migrat service_menu.cpp a deltaTime
This commit is contained in:
@@ -36,7 +36,7 @@ class DefineButtons {
|
||||
|
||||
// --- Métodos principales ---
|
||||
void render();
|
||||
void update();
|
||||
void update(float delta_time);
|
||||
void handleEvents(const SDL_Event &event);
|
||||
auto enable(Options::Gamepad *options_gamepad) -> bool;
|
||||
void disable();
|
||||
@@ -48,7 +48,7 @@ class DefineButtons {
|
||||
|
||||
private:
|
||||
// --- Constantes ---
|
||||
static constexpr size_t MESSAGE_DISPLAY_FRAMES = 120; // Cuánto tiempo mostrar el mensaje (en frames) ~2 segundos a 60fps
|
||||
static constexpr float MESSAGE_DISPLAY_DURATION_S = 2.0f; // Cuánto tiempo mostrar el mensaje en segundos
|
||||
|
||||
// --- Objetos y punteros ---
|
||||
Input *input_ = nullptr; // Entrada del usuario
|
||||
@@ -59,7 +59,7 @@ class DefineButtons {
|
||||
std::vector<Button> buttons_; // Lista de botones
|
||||
std::vector<std::string> controller_names_; // Nombres de los controladores
|
||||
size_t index_button_ = 0; // Índice del botón seleccionado
|
||||
size_t message_timer_ = 0; // Contador de frames para el mensaje
|
||||
float message_timer_ = 0.0f; // Timer en segundos para el mensaje
|
||||
bool enabled_ = false; // Flag para indicar si está activo
|
||||
bool finished_ = false; // Flag para indicar si ha terminado
|
||||
bool closing_ = false; // Flag para indicar que está cerrando
|
||||
|
||||
Reference in New Issue
Block a user