mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
* Copy SDL2 client to SDL3 as the new version is not API compatible * Move existing SDL2 client to SDL2 directory * Move fonts from SDL client to resources folder in top level directory
27 lines
528 B
C++
27 lines
528 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "sdl_widget.hpp"
|
|
|
|
class SdlButton : public SdlWidget
|
|
{
|
|
public:
|
|
SdlButton(SDL_Renderer* renderer, const std::string& label, int id, const SDL_Rect& rect);
|
|
SdlButton(SdlButton&& other) noexcept;
|
|
~SdlButton() override = default;
|
|
|
|
bool highlight(SDL_Renderer* renderer);
|
|
bool mouseover(SDL_Renderer* renderer);
|
|
bool update(SDL_Renderer* renderer);
|
|
|
|
[[nodiscard]] int id() const;
|
|
|
|
private:
|
|
SdlButton(const SdlButton& other) = delete;
|
|
|
|
private:
|
|
std::string _name;
|
|
int _id;
|
|
};
|