diff options
author | rtk0c <[email protected]> | 2021-06-19 22:41:05 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-06-19 22:41:05 -0700 |
commit | 4378dcd83d2387534f3b10276365d1003832fe81 (patch) | |
tree | 6bc055a1bd81d5a27c9066f05e28e5115f5de944 /core/src/UI/UI_Utils.cpp | |
parent | eec8dfd8a21b8bb37f6acac1da84cde8fbf7ace7 (diff) |
Add cell type conversion mechanism
Diffstat (limited to 'core/src/UI/UI_Utils.cpp')
-rw-r--r-- | core/src/UI/UI_Utils.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/UI/UI_Utils.cpp b/core/src/UI/UI_Utils.cpp index e3ac097..0dcde8f 100644 --- a/core/src/UI/UI_Utils.cpp +++ b/core/src/UI/UI_Utils.cpp @@ -44,6 +44,15 @@ bool ImGui::Button(const char* label, const ImVec2& sizeArg, bool disabled) return res; } +bool ImGui::MenuItemConditional(const char* name, bool disabled) +{ + if (disabled) PushDisabled(); + bool res = MenuItem(name, nullptr, false, disabled); + if (disabled) PopDisabled(); + + return res; +} + void ImGui::ErrorIcon() { ImGui::PushStyleColor(ImGuiCol_Text, ImVec4{ 237 / 255.0f, 67 / 255.0f, 55 / 255.0f, 1.0f }); // #ED4337 |