#pragma once #include #include #include #include #include #include #include "input.h" #include "ui/window_message.h" namespace Options { struct Gamepad; } class DefineButtons { public: struct Button { std::string label; Input::Action action; SDL_GamepadButton button; Button(std::string label, Input::Action action, SDL_GamepadButton button) : label(std::move(label)), action(action), button(button) {} }; DefineButtons(); ~DefineButtons() = default; void render(); void update(); void checkEvents(const SDL_Event &event); auto enable(Options::Gamepad *options_gamepad) -> bool; void disable(); bool isReadyToClose() const; [[nodiscard]] auto isEnabled() const -> bool { return enabled_; } [[nodiscard]] auto isFinished() const -> bool { return finished_; } private: // Constante para cuánto tiempo mostrar el mensaje (en frames) static constexpr size_t MESSAGE_DISPLAY_FRAMES = 180; // ~3 segundos a 60fps // Punteros Input *input_ = nullptr; // Entrada del usuario Options::Gamepad *options_gamepad_ = nullptr; // Opciones del gamepad std::unique_ptr window_message_; // Mensaje de ventana // Vectores y strings std::vector