Icons improved for Display, preview, etc

Also added a close icon to large preview. Fixed help with recent improvements.
This commit is contained in:
Bruno Herbelin
2023-09-01 17:53:50 +02:00
parent 276a94f9e8
commit 12a5d777e5
6 changed files with 40 additions and 14 deletions

View File

@@ -610,6 +610,8 @@ bool ImGuiToolkit::SelectableIcon(int i, int j, const char* label, bool selected
char text_buf[256];
ImFormatString(text_buf, IM_ARRAYSIZE(text_buf), "%s%s", space_buf, label);
ImGui::PushID( i * 20 + j + ImGui::GetID("##SelectableIcon") );
// draw menu item
bool ret = ImGui::Selectable(text_buf, selected, ImGuiSelectableFlags_None, size_arg);
@@ -620,6 +622,8 @@ bool ImGuiToolkit::SelectableIcon(int i, int j, const char* label, bool selected
// overlay of icon on top of first item
_drawIcon(draw_pos, i, j);
ImGui::PopID();
return ret;
}