7#include "sdl_button.hpp"
20 [[nodiscard]]
bool populate(std::shared_ptr<SDL_Renderer>& renderer,
21 const std::vector<std::string>& labels,
const std::vector<int>& ids,
22 Sint32 total_width, Sint32 offsetY, Sint32 width, Sint32 height);
24 [[nodiscard]]
bool update();
25 [[nodiscard]] std::shared_ptr<SdlButton> get_selected(
const SDL_MouseButtonEvent& button);
26 [[nodiscard]] std::shared_ptr<SdlButton> get_selected(
float x,
float y);
28 bool set_highlight_next(
bool reset =
false);
29 bool set_highlight(
size_t index);
30 bool set_mouseover(
float x,
float y);
35 std::vector<std::shared_ptr<SdlButton>> _list;
36 std::shared_ptr<SdlButton> _highlighted =
nullptr;
37 size_t _highlight_index = 0;
38 std::shared_ptr<SdlButton> _mouseover =
nullptr;