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

Method PushAddTagModal

Engine/Editor/Source/UI/Tools/WorldEditorTool.cpp:2391–2504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2389 if (ImGui::MenuItem(LE_ICON_FOLDER " Group Selection", "Ctrl+G"))
2390 {
2391 GroupSelectedEntities();
2392 ImGui::CloseCurrentPopup();
2393 }
2394 }
2395
2396 if (!bLastSelectedLocked && Registry.GetHierarchy().GetParent(LastSelected) != ECS::NullEntity)
2397 {
2398 if (ImGui::MenuItem("Unparent"))
2399 {
2400 BeginRelationshipTransaction({ LastSelected });
2401 ECS::Utils::RemoveFromParent(Registry, LastSelected);
2402 EndTransaction("Unparent");
2403 ReparentEntityInOutliner(LastSelected);
2404 ImGui::CloseCurrentPopup();
2405 }
2406 }
2407
2408 if (!bLastSelectedLocked && Registry.GetHierarchy().GetChildCount(LastSelected) != 0)
2409 {
2410 if (ImGui::MenuItem("Detach Children"))
2411 {
2412 TVector<ECS::FEntity> Children;
2413 Registry.GetHierarchy().ForEachChild(LastSelected, [&](ECS::FEntity Child) { Children.Add(Child); });
2414 BeginRelationshipTransaction({ LastSelected });
2415 ECS::Utils::DetachImmediateChildren(Registry, LastSelected);
2416 EndTransaction("Detach Children");
2417 for (ECS::FEntity Child : Children)
2418 {
2419 ReparentEntityInOutliner(Child);
2420 }
2421 ImGui::CloseCurrentPopup();
2422 }
2423 }
2424
2425 if (!bLastSelectedLocked)
2426 {
2427 const bool bIsSelectionRoot = Registry.HasAll<SSelectionRoot>(LastSelected);
2428 if (ImGui::MenuItem(bIsSelectionRoot ? "Unmark Selection Root" : "Mark as Selection Root"))
2429 {
2430 if (bIsSelectionRoot)
2431 {
2432 Registry.Remove<SSelectionRoot>(LastSelected);
2433 }
2434 else
2435 {
2436 Registry.Emplace<SSelectionRoot>(LastSelected);
2437 }
2438 ImGui::CloseCurrentPopup();
2439 }
2440 ImGuiX::TextTooltip("{}", "Viewport clicks on any descendant will resolve up to this entity.");
2441 }
2442
2443 ImGui::Spacing();
2444 ImGui::Separator();
2445 ImGui::Spacing();
2446
2447 // Prefab.
2448 if (ImGui::MenuItem(LE_ICON_PACKAGE_VARIANT " Create Prefab from Selected..."))

Callers

nothing calls this directly

Calls 15

MoveFunction · 0.85
PushStyleColorFunction · 0.85
TextUnformattedFunction · 0.85
PopStyleColorFunction · 0.85
SeparatorClass · 0.85
PushStyleVarFunction · 0.85
PopStyleVarFunction · 0.85
EntityHasTagFunction · 0.85
ButtonFunction · 0.85
PushModalMethod · 0.80
ImVec2Function · 0.50
ImVec4Class · 0.50

Tested by

no test coverage detected