mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-03-31 09:17:04 +09:00
28 lines
718 B
C++
28 lines
718 B
C++
#pragma once
|
|
|
|
#include "Widget.hpp"
|
|
#include <functional>
|
|
|
|
#include <mglpp/graphics/Color.hpp>
|
|
#include <mglpp/graphics/Text.hpp>
|
|
|
|
namespace gsr {
|
|
class CheckBox : public Widget {
|
|
public:
|
|
CheckBox(mgl::Font *font, const char *text);
|
|
CheckBox(const CheckBox&) = delete;
|
|
CheckBox& operator=(const CheckBox&) = delete;
|
|
|
|
bool on_event(mgl::Event &event, mgl::Window &window, mgl::vec2f offset) override;
|
|
void draw(mgl::Window &window, mgl::vec2f offset) override;
|
|
|
|
mgl::vec2f get_size() override;
|
|
|
|
std::function<void()> on_click;
|
|
private:
|
|
mgl::vec2f get_checkbox_size();
|
|
private:
|
|
mgl::Text text;
|
|
bool checked = false;
|
|
};
|
|
} |