示例#1
0
 public override void WindowUpdate()
 {
     base.WindowUpdate();
     if (this.selectedDesPanel != null && this.selectedDesPanel.def.showPowerGrid)
     {
         OverlayDrawHandler.DrawPowerGridOverlayThisFrame();
     }
 }
示例#2
0
 public override void SelectedUpdate()
 {
     base.SelectedUpdate();
     GenUI.RenderMouseoverBracket();
     OverlayDrawHandler.DrawZonesThisFrame();
     if (Find.Selector.SelectedZone != null)
     {
         GenDraw.DrawFieldEdges(Find.Selector.SelectedZone.Cells);
     }
     GenDraw.DrawNoZoneEdgeLines();
 }
        public static void TryDrawPowerGridAndAnticipatedConnection(BuildableDef def, Rot4 rotation)
        {
            ThingDef thingDef = def as ThingDef;

            if (thingDef != null && (thingDef.EverTransmitsPower || thingDef.ConnectToPower))
            {
                OverlayDrawHandler.DrawPowerGridOverlayThisFrame();
                if (thingDef.ConnectToPower)
                {
                    IntVec3   intVec    = UI.MouseCell();
                    CompPower compPower = PowerConnectionMaker.BestTransmitterForConnector(intVec, Find.CurrentMap, null);
                    if (compPower != null && !compPower.parent.Position.Fogged(compPower.parent.Map))
                    {
                        PowerNetGraphics.RenderAnticipatedWirePieceConnecting(intVec, rotation, def.Size, compPower.parent);
                    }
                }
            }
        }