protected override void OnDraw() { if (ImGui.BeginMenuBar()) { if (ImGui.BeginMenu("Settings")) { if (ImGui.MenuItem("Keep Aspect", "", keepAspect, true)) { keepAspect = !keepAspect; } ImGui.EndMenu(); } ImGui.EndMenuBar(); } currSize = ImGui.GetContentRegionAvail(); if (keepAspect) { currSize = GetAspectArea(currSize); } if (prevSize != currSize) { AppScreen.Resolution = (Vec2i)currSize; } prevSize = currSize; EntityIterator.PerformIteration(EntityWorld.Active, new RenderCamera() { imageSize = currSize }, new EntityQuery().Any(TypeCache.ReadType <C_Camera>())); }
protected override void OnDraw() { ImGui.Text($"ID: {Context.id}"); ImGui.SameLine(); ImGui.Text($"Version: {Context.version}"); ImGui.Separator(); EntityIterator.PerformIteration(EntityWorld.Active, new DrawComponentsFromEntity() { entity = Context, drawers = drawers }, new EntityQuery()); }
protected void IterateQuery(IQueryIterator iterator, EntityQuery query, bool onlyDirty = true) { if (onlyDirty) { EntityIterator.PerformIteration(World, iterator, query, LastVersionWorked); } else { EntityIterator.PerformIteration(World, iterator, query); } }