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
9
namespace
ui
10
{
11
15
class
Button
:
public
Widget
16
{
17
public
:
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
25
private
:
26
Vector2 size_;
27
};
28
29
}
// namespace ui
ui::Button
按钮.
Definition:
Button.h:16
ui::Widget
Definition:
Widget.h:14
src
UI
Button.h
制作者
1.9.5