From 03dda388c2a9a2a6def77980e5b89fd6924a891d Mon Sep 17 00:00:00 2001 From: ink-soul Date: Fri, 16 Jun 2023 17:29:47 +0800 Subject: [PATCH] add menu construct --- base/ui.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/base/ui.hpp b/base/ui.hpp index 2d66fa4..42121ef 100644 --- a/base/ui.hpp +++ b/base/ui.hpp @@ -334,6 +334,21 @@ public: bool button(const char *caption) { return ImGui::Button(caption); } + + bool beginMenu(const char* caption) { + return ImGui::BeginMenu(caption); + } + + bool menuItem(const char* caption,const char* shortcut) + { + return ImGui::MenuItem(caption, shortcut); + } + + bool beginMenuBar() + { + return ImGui::BeginMenuBar(); + } + void text(const char *formatstr, ...) { va_list args; va_start(args, formatstr);