public void SetEntityListSelection(EntityListQuery newListQuery) { if (newListQuery == null) { SetSelection(new List <int>()); return; } if (newListQuery.Group != null) { foreach (var pair in componentGroupsById) { if (pair.Value == newListQuery.Group) { SetSelection(new List <int> { pair.Key }); return; } } } else { foreach (var pair in queriesById) { if (pair.Value == newListQuery.Query) { SetSelection(new List <int> { pair.Key }); return; } } } SetSelection(new List <int>()); }
public void SetAllEntitiesFilter(EntityListQuery entityQuery) { filterQuery = entityQuery; if (WorldSelection == null || SystemSelection is ComponentSystemBase) { return; } ApplyAllEntitiesFilter(); }
public void SetEntityListSelection(EntityListQuery newSelection, bool updateList, bool propagate) { EntityListQuerySelection = newSelection; if (updateList) { componentGroupListView.SetEntityListSelection(newSelection); } entityListView.SelectedEntityQuery = newSelection; if (propagate) { entityListView.TouchSelection(); } }
public EntityListView(TreeViewState state, EntityListQuery entityQuery, EntitySelectionCallback entitySelectionCallback, WorldSelectionGetter getWorldSelection, SystemSelectionGetter getSystemSelection) : base(state) { this.setEntitySelection = entitySelectionCallback; this.getWorldSelection = getWorldSelection; this.getSystemSelection = getSystemSelection; selectedEntityQuery = entityQuery; rows = new EntityArrayListAdapter(); getNewSelectionOverride = (item, selection, shift) => new List <int>() { item.id }; Reload(); }
public void SetEntityListSelection(EntityListQuery newSelection, bool updateList, bool propagate) { chunkInfoListView.ClearSelection(); EntityListQuerySelection = newSelection; if (updateList) { entityQueryListView.SetEntityListSelection(newSelection); } entityListView.SelectedEntityQuery = newSelection; if (propagate) { entityListView.TouchSelection(); } }
public EntityListView(TreeViewState state, EntityListQuery entityQuery, EntitySelectionCallback entitySelectionCallback, WorldSelectionGetter getWorldSelection, SystemSelectionGetter getSystemSelection, ChunkArrayAssignmentCallback setChunkArray) : base(state, new MultiColumnHeader(CreateState())) { this.setEntitySelection = entitySelectionCallback; this.getWorldSelection = getWorldSelection; this.getSystemSelection = getSystemSelection; this.setChunkArray = setChunkArray; selectedEntityQuery = entityQuery; rows = new EntityArrayListAdapter(); getNewSelectionOverride = (item, selection, shift) => new List <int>() { item.id }; showAlternatingRowBackgrounds = true; Reload(); }
internal static void SetAllSelections(World world, ComponentSystemBase system, EntityListQuery entityQuery, Entity entity) { if (Instance == null) { return; } Instance.SetWorldSelection(world, false); Instance.SetSystemSelection(system, world, true, false); Instance.SetEntityListSelection(entityQuery, true, false); Instance.SetEntitySelection(entity, true); Instance.entityListView.FrameSelection(); }