mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Error handling: rework error tooltip logic (will be reused by upcoming feature). (#7961, #7669, #1651)
+ Comments
This commit is contained in:
parent
d0107f5da2
commit
9644c51183
3 changed files with 77 additions and 25 deletions
|
|
@ -7391,6 +7391,7 @@ void ImGui::EndBoxSelect(const ImRect& scope_rect, ImGuiMultiSelectFlags ms_flag
|
|||
static void DebugLogMultiSelectRequests(const char* function, const ImGuiMultiSelectIO* io)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
IM_UNUSED(function);
|
||||
for (const ImGuiSelectionRequest& req : io->Requests)
|
||||
{
|
||||
if (req.Type == ImGuiSelectionRequestType_SetAll) IMGUI_DEBUG_LOG_SELECTION("[selection] %s: Request: SetAll %d (= %s)\n", function, req.Selected, req.Selected ? "SelectAll" : "Clear");
|
||||
|
|
@ -8157,6 +8158,13 @@ void ImGuiSelectionExternalStorage::ApplyRequests(ImGuiMultiSelectIO* ms_io)
|
|||
//-------------------------------------------------------------------------
|
||||
|
||||
// This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
|
||||
// This handle some subtleties with capturing info from the label, but for 99% uses it could essentially be rewritten as:
|
||||
// if (ImGui::BeginChild("...", ImVec2(ImGui::CalcItemWidth(), ImGui::GetTextLineHeight() * 7.5f), ImGuiChildFlags_FrameStyle))
|
||||
// { .... }
|
||||
// ImGui::EndChild();
|
||||
// ImGui::SameLine();
|
||||
// ImGui::AlignTextToFramePadding();
|
||||
// ImGui::Text("Label");
|
||||
// Tip: To have a list filling the entire window width, use size.x = -FLT_MIN and pass an non-visible label e.g. "##empty"
|
||||
// Tip: If your vertical size is calculated from an item count (e.g. 10 * item_height) consider adding a fractional part to facilitate seeing scrolling boundaries (e.g. 10.25 * item_height).
|
||||
bool ImGui::BeginListBox(const char* label, const ImVec2& size_arg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue