From 5e90e7da8a5c09b720dd19a25f01e1ab8c779cb9 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sat, 27 Jan 2024 17:28:43 -0500 Subject: [PATCH] Return templated type for menu helpers. --- include/helpers.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/helpers.hpp b/include/helpers.hpp index 3a02eff8..a867626e 100644 --- a/include/helpers.hpp +++ b/include/helpers.hpp @@ -251,7 +251,7 @@ Example: )); */ template -ui::MenuItem* createCheckMenuItem(std::string text, std::string rightText, std::function checked, std::function action, bool disabled = false, bool alwaysConsume = false) { +TMenuItem* createCheckMenuItem(std::string text, std::string rightText, std::function checked, std::function action, bool disabled = false, bool alwaysConsume = false) { struct Item : TMenuItem { std::string rightTextPrefix; std::function checked; @@ -297,7 +297,7 @@ Example: )); */ template -ui::MenuItem* createBoolMenuItem(std::string text, std::string rightText, std::function getter, std::function setter, bool disabled = false, bool alwaysConsume = false) { +TMenuItem* createBoolMenuItem(std::string text, std::string rightText, std::function getter, std::function setter, bool disabled = false, bool alwaysConsume = false) { struct Item : TMenuItem { std::string rightTextPrefix; std::function getter; @@ -360,7 +360,7 @@ Example: )); */ template -ui::MenuItem* createSubmenuItem(std::string text, std::string rightText, std::function createMenu, bool disabled = false) { +TMenuItem* createSubmenuItem(std::string text, std::string rightText, std::function createMenu, bool disabled = false) { struct Item : TMenuItem { std::function createMenu; @@ -392,7 +392,7 @@ Example: )); */ template -ui::MenuItem* createIndexSubmenuItem(std::string text, std::vector labels, std::function getter, std::function setter, bool disabled = false, bool alwaysConsume = false) { +TMenuItem* createIndexSubmenuItem(std::string text, std::vector labels, std::function getter, std::function setter, bool disabled = false, bool alwaysConsume = false) { struct IndexItem : ui::MenuItem { std::function getter; std::function setter;