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

Method DrawHelpMenu

Engine/Editor/Source/UI/EditorUI.cpp:2487–2532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2485 return BottomDockID;
2486 }
2487
2488 void FEditorUI::DrawOrphanedDragPreview()
2489 {
2490 const DragDrop::FPayload* Payload = DragDrop::PeekPayload();
2491 if (Payload == nullptr || !Payload->bSourceClosed || !ImGui::IsMouseDown(ImGuiMouseButton_Left))
2492 {
2493 return;
2494 }
2495
2496 const FString EntityName = Payload->EntityName.ToString();
2497 const FStringView Path = Payload->Kind == DragDrop::EPayloadKind::Asset ? FStringView(*Payload->AssetPath, Payload->AssetPath.Len())
2498 : Payload->Kind == DragDrop::EPayloadKind::NewEntity ? FStringView(*EntityName, EntityName.Len())
2499 : FStringView(*Payload->FilePath, Payload->FilePath.Len());
2500 if (Path.IsEmpty())
2501 {
2502 return;
2503 }
2504
2505 const int32 Slash = Path.FindLastOf('/');
2506 const FStringView Name = Slash == Constants::kIndexNone ? Path : Path.Mid(Slash + 1);
2507
2508 if (ImGui::BeginDragDropSource(ImGuiDragDropFlags_SourceExtern))
2509 {
2510 ImGui::TextUnformatted(LE_ICON_FILE_MOVE);
2511 ImGui::SameLine();
2512 ImGui::TextUnformatted(Name.GetData(), Name.GetData() + Name.Len());
2513 ImGui::EndDragDropSource();
2514 }
2515 }
2516
2517 void FEditorUI::DrawFooterDrawer(const FUpdateContext& UpdateContext)
2518 {
2519 DrawOrphanedDragPreview();
2520
2521 if (OpenDrawer == nullptr)
2522 {
2523 DrawerOpenAmount = 0.0f;
2524 bDrawerDragSeen = false;
2525 ImGuiX::Notifications::SetBottomInset(0.0f);
2526 return;
2527 }
2528
2529 // Ease the slide toward fully open.
2530 DrawerOpenAmount = Math::Min(1.0f, DrawerOpenAmount + static_cast<float>(UpdateContext.GetDeltaTime()) * 8.0f);
2531 const float Eased = DrawerOpenAmount * DrawerOpenAmount * (3.0f - 2.0f * DrawerOpenAmount); // smoothstep
2532
2533 const float Scale = ImGuiX::GetUIScale();
2534 ImGuiViewport* Viewport = ImGui::GetMainViewport();
2535 FFooterDrawer* Drawer = FindDrawerForTool(OpenDrawer);

Callers

nothing calls this directly

Calls 2

LaunchURLFunction · 0.85
SeparatorClass · 0.85

Tested by

no test coverage detected