Partial entity inspector
This commit is contained in:
@@ -64,6 +64,24 @@ void inputPrimaryAction(Game *game, InputState *input) {
|
||||
input->state = INPUT_SELECTED_BUILDING;
|
||||
}
|
||||
selectedCount = ecs_query_entity_count(input->queries.selected);
|
||||
if (IsKeyDown(KEY_LEFT_ALT) && IsKeyDown(KEY_LEFT_SHIFT)) {
|
||||
ecs_iter_t it = ecs_query_iter(ECS, input->queries.selected);
|
||||
while (ecs_iter_next(&it)) {
|
||||
for (i32 i = 0; i < it.count; i++) {
|
||||
ecs_entity_t entity = it.entities[i];
|
||||
bool alreadyInspecting = false;
|
||||
for (i32 j = 0; j < bzArraySize(game->debug.inspecting); j++) {
|
||||
if (game->debug.inspecting[j] == entity) {
|
||||
alreadyInspecting = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!alreadyInspecting)
|
||||
bzArrayPush(game->debug.inspecting, entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (selectedCount == 0)
|
||||
|
||||
Reference in New Issue
Block a user