void drawDrillStatus(Display screen, GeneralStatus status, float loadFactor, float angle, float targetAngle) { using (Display.Frame f = screen.DrawFrame()) { if (status.AreFrontLightsOn) { f.DrawCollection("drillLights", translation: LIGHTS_OFFSET); } if (status.AreArmLightsOn) { f.DrawCollection("drillLights", translation: DRILL_ARM_CENTER, rotation: angle); } f.DrawCollection("drillsShapesBackground"); f.Draw(new Shape("SquareSimple", this.scheme.MedDark, position: new Vector2(32, 93), size: new Vector2(loadFactor * 108, 45))); f.DrawCollection("drillsShapesForeground"); if (!float.IsNaN(angle)) { if (!float.IsNaN(targetAngle)) { f.DrawCollection("drillShapesArm", translation: DRILL_ARM_CENTER, rotation: targetAngle, color: this.scheme.MedDark); } f.DrawCollection("drillShapesArm", translation: DRILL_ARM_CENTER, rotation: angle); } f.DrawText($"Full at {loadFactor * 100:000}%", INV_TEXT_POS, scale: 0.5f, alignment: TextAlignment.LEFT); f.DrawText(this.conStatus(), CON_TEXT_POS, scale: 0.5f, alignment: TextAlignment.LEFT); } }
void updateInventoryDisplay(Display display, string title, List <ComponentStatus> statuses) { using (Display.Frame f = display.DrawFrame()) { f.DrawText(title, new Vector2(display.SurfaceSize.X / 2, 0)); float y = 50; foreach (ComponentStatus status in statuses) { Color?color = status.Status == ComponentStatusLevel.ERROR ? CRITICAL : status.Status == ComponentStatusLevel.WARNING ? WARNING : (Color?)null; this.drawLineOfText(f, status.Type.DisplayName, $"{status.Amount:N0}", display.SurfaceSize.X - 2, ref y, color); } } }