MCPcopy Create free account
hub / github.com/MrDrElliot/LuminaEngine / LoadIniSettingsFromMemory

Method LoadIniSettingsFromMemory

Engine/Source/ThirdParty/imgui/imgui.cpp:16669–16737  ·  view source on GitHub ↗

Zero-tolerance, no error reporting, cheap .ini parsing Set ini_size==0 to let us use strlen(ini_data). Do not call this function with a 0 if your buffer is actually empty!

Source from the content-addressed store, hash-verified

16667 if (g.ActiveId == source_id) // Allow the underlying widget to display/return hovered during the mouse release frame, else we would get a flicker.
16668 g.ActiveIdAllowOverlap = is_hovered;
16669 }
16670 if (g.ActiveId != source_id)
16671 return false;
16672 source_parent_id = window->IDStack.back();
16673 source_drag_active = IsMouseDragging(mouse_button);
16674
16675 // Disable navigation and key inputs while dragging + cancel existing request if any
16676 SetActiveIdUsingAllKeyboardKeys();
16677 }
16678 else
16679 {
16680 // When ImGuiDragDropFlags_SourceExtern is set:
16681 window = NULL;
16682 source_id = ImHashStr("#SourceExtern");
16683 source_drag_active = true;
16684 mouse_button = g.IO.MouseDown[0] ? 0 : -1;
16685 KeepAliveID(source_id);
16686 SetActiveID(source_id, NULL);
16687 }
16688
16689 IM_ASSERT(g.DragDropWithinTarget == false); // Can't nest BeginDragDropSource() and BeginDragDropTarget()
16690 if (!source_drag_active)
16691 return false;
16692
16693 // Activate drag and drop
16694 if (!g.DragDropActive)
16695 {
16696 IM_ASSERT(source_id != 0);
16697 ClearDragDrop();
16698 IMGUI_DEBUG_LOG_ACTIVEID("[dragdrop] BeginDragDropSource() DragDropActive = true, source_id = 0x%08X%s\n",
16699 source_id, (flags & ImGuiDragDropFlags_SourceExtern) ? " (EXTERN)" : "");
16700 ImGuiPayload& payload = g.DragDropPayload;
16701 payload.SourceId = source_id;
16702 payload.SourceParentId = source_parent_id;
16703 g.DragDropActive = true;
16704 g.DragDropSourceFlags = flags;
16705 g.DragDropMouseButton = mouse_button;
16706 if (payload.SourceId == g.ActiveId)
16707 g.ActiveIdNoClearOnFocusLoss = true;
16708 }
16709 g.DragDropSourceFrameCount = g.FrameCount;
16710 g.DragDropWithinSource = true;
16711
16712 if (!(flags & ImGuiDragDropFlags_SourceNoPreviewTooltip))
16713 {
16714 // Target can request the Source to not display its tooltip (we use a dedicated flag to make this request explicit)
16715 // We unfortunately can't just modify the source flags and skip the call to BeginTooltip, as caller may be emitting contents.
16716 bool ret;
16717 if (g.DragDropAcceptIdPrev && (g.DragDropAcceptFlagsPrev & ImGuiDragDropFlags_AcceptNoPreviewTooltip))
16718 ret = BeginTooltipHidden();
16719 else
16720 ret = BeginTooltip();
16721 IM_ASSERT(ret); // FIXME-NEWBEGIN: If this ever becomes false, we need to Begin("##Hidden", NULL, ImGuiWindowFlags_NoSavedSettings) + SetWindowHiddenAndSkipItemsForCurrentFrame().
16722 IM_UNUSED(ret);
16723 }
16724
16725 if (!(flags & ImGuiDragDropFlags_SourceNoDisableHover) && !(flags & ImGuiDragDropFlags_SourceExtern))
16726 g.LastItemData.StatusFlags &= ~ImGuiItemStatusFlags_HoveredRect;

Callers

nothing calls this directly

Calls 2

ImStrchrRangeFunction · 0.85
resizeMethod · 0.45

Tested by

no test coverage detected