FreeRDP
Loading...
Searching...
No Matches
SDL3/dialogs/sdl_button.cpp
1
21#include <cassert>
22#include <utility>
23
24#include "sdl_button.hpp"
25
26SdlButton::SdlButton(std::shared_ptr<SDL_Renderer>& renderer, const std::string& label, int id,
27 const SDL_FRect& rect)
28 : SdlSelectableWidget(renderer, rect), _id(id)
29{
30 _backgroundcolor = { 0x69, 0x66, 0x63, 0xff };
31 _highlightcolor = { 0xcd, 0xca, 0x35, 0x60 };
32 _mouseovercolor = { 0x66, 0xff, 0x66, 0x60 };
33 _fontcolor = { 0xd1, 0xcf, 0xcd, 0xff };
34 update_text(label);
35 update();
36}
37
38SdlButton::SdlButton(SdlButton&& other) noexcept = default;
39
40SdlButton::~SdlButton() = default;
41
42int SdlButton::id() const
43{
44 return _id;
45}