Graphics v0.0.0
A simple abstraction layer for the modern graphics APIs.
载入中...
搜索中...
未找到
Menu.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#include <utility>
9#include <vector>
10
11namespace ui
12{
13
14class Menu : public Widget
15{
16public:
17 Menu(const std::string& label);
18
19 void add_item(const std::string& label, const std::function<void()>& callback);
20
21 void update() override;
22
23private:
24 std::vector<std::pair<std::string, std::function<void()>>> items_;
25};
26
27} // namespace ui
Definition: Menu.h:15
Definition: Widget.h:14