Graphics v0.0.0
A simple abstraction layer for the modern graphics APIs.
载入中...
搜索中...
未找到
Button.h
1// Copyright 2022 ShenMian
2// License(Apache-2.0)
3
4#pragma once
5
6#include "Widget.h"
7#include <math/math.hpp>
8
9namespace ui
10{
11
15class Button : public Widget
16{
17public:
18 Button(const std::string& label, const Vector2& size = Vector2(0.f));
19
20 void update() override;
21
22 std::function<void(Button&)> click;
23 std::function<void(Button&)> hover;
24
25private:
26 Vector2 size_;
27};
28
29} // namespace ui
按钮.
Definition: Button.h:16
Definition: Widget.h:14