File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed
src/imgui/panels/entitybrowser Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -60,22 +60,24 @@ void Draw(bool* isOpen)
6060 ImGui::TableHeadersRow ();
6161
6262 EntityInstanceIter_t iter;
63-
64- while (CEntityInstance* entity = iter.Next ())
63+ if (GameEntitySystem ())
6564 {
66- if (!g_menuContext.m_entityFilter .PassFilter (entity->GetClassname ()))
67- continue ;
68-
69- ImGui::TableNextRow ();
70- ImGui::TableSetColumnIndex (0 );
71- ImGui::PushID (entity->GetEntityIndex ().Get ());
72- if (ImGui::Selectable (entity->GetClassname (), false , ImGuiSelectableFlags_SpanAllColumns))
65+ while (CEntityInstance* entity = iter.Next ())
7366 {
74- g_pSelectedEntity = entity->GetRefEHandle ();
67+ if (!g_menuContext.m_entityFilter .PassFilter (entity->GetClassname ()))
68+ continue ;
69+
70+ ImGui::TableNextRow ();
71+ ImGui::TableSetColumnIndex (0 );
72+ ImGui::PushID (entity->GetEntityIndex ().Get ());
73+ if (ImGui::Selectable (entity->GetClassname (), false , ImGuiSelectableFlags_SpanAllColumns))
74+ {
75+ g_pSelectedEntity = entity->GetRefEHandle ();
76+ }
77+ ImGui::PopID ();
78+ ImGui::TableSetColumnIndex (1 );
79+ ImGui::Text (" %d" , entity->GetEntityIndex ());
7580 }
76- ImGui::PopID ();
77- ImGui::TableSetColumnIndex (1 );
78- ImGui::Text (" %d" , entity->GetEntityIndex ());
7981 }
8082
8183 ImGui::EndTable ();
You can’t perform that action at this time.
0 commit comments