11 SdlButtonList() =
default;
12 virtual ~SdlButtonList();
14 bool populate(SDL_Renderer* renderer,
const std::vector<std::string>& labels,
15 const std::vector<int>& ids, Sint32 total_width, Sint32 offsetY, Sint32 width,
18 bool update(SDL_Renderer* renderer);
19 SdlButton* get_selected(
const SDL_MouseButtonEvent& button);
20 SdlButton* get_selected(Sint32 x, Sint32 y);
22 bool set_highlight_next(
bool reset =
false);
23 bool set_highlight(
size_t index);
24 bool set_mouseover(Sint32 x, Sint32 y);
28 SdlButtonList(
const SdlButtonList& other) =
delete;
29 SdlButtonList(SdlButtonList&& other) =
delete;
30 SdlButtonList& operator=(
const SdlButtonList& other) =
delete;
31 SdlButtonList& operator=(SdlButtonList&& other) =
delete;
34 std::vector<SdlButton> _list;
36 size_t _highlight_index = 0;