You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to use ImGui rounding style for ImGui::MenuItems?
I am using ImGui in web browser through emscripten.
while searching through the rounding style vars, the only ones available are
ImGuiStyleVar_WindowRounding
ImGuiStyleVar_ChildRounding
ImGuiStyleVar_PopupRounding
ImGuiStyleVar_FrameRounding
ImGuiStyleVar_ScrollbarRounding
ImGuiStyleVar_GrabRounding
ImGuiStyleVar_TabRounding
I was rendering an ImGui Menu item and was wondering how to enable rounding effect for each Items
The popup window is having rounded corners but the items inside it are still sharp edges which makes it look kinda odd, you can refer to the attached screenshot.
I tried all the style vars but none are showing any effects.
Any idea how to make rounded Menu items?
Screenshots/Video:
Minimal, Complete and Verifiable Example code:
// Here's some code anyone can copy and paste to reproduce your issue
ImGuiStyle& style = ImGui::GetStyle();
style.PopupRounding = 9;
if (ImGui::BeginMainMenuBar()) {
if (ImGui::BeginMenu("File")) {
ImGui::MenuItem("Test", "Ctrl+T");
ImGui::MenuItem("Test", "Ctrl+T");
ImGui::MenuItem("Test", "Ctrl+T");
ImGui::MenuItem("Test", "Ctrl+T");
ImGui::EndMenu();
}
ImGui::EndMainMenuBar();
}
The text was updated successfully, but these errors were encountered:
We don't support rounding Menu Items or Selectables.
One reason is Selectables are meant to fill space without gaps. Another reason is that I have an idea in mind for a future more general-purpose Selectable API which may make it more difficult to implement if rounded.
I suppose menu items, even though they are selectable, may not need to cater for those restrictions and we could lift them for Menu Items. However if your aim is to make everything round you are not going to be able to do it with selectables.
Full config/build information:
(FYI, there is a "Copy to clipboard" button in that About window.)
Version/Branch of Dear ImGui:
Version 1.90.6, Branch: master
Back-ends:
imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Windows 11 + emscripten GCC
Full config/build information:
Details:
How to use ImGui rounding style for ImGui::MenuItems?
I am using ImGui in web browser through emscripten.
while searching through the rounding style vars, the only ones available are
I was rendering an ImGui Menu item and was wondering how to enable rounding effect for each Items
The popup window is having rounded corners but the items inside it are still sharp edges which makes it look kinda odd, you can refer to the attached screenshot.
I tried all the style vars but none are showing any effects.
Any idea how to make rounded Menu items?
Screenshots/Video:
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: