示例#1
0
        private void DoGuiForTargetingDrop(Rect targetingFooter)
        {
            if (Widgets.ButtonText(targetingFooter.LeftHalf(), "Drop Target", true, true, true))
            {
                Find.Targeter.BeginTargeting(this.targetingParams, delegate(LocalTargetInfo target)
                {
                    this.SelectedCompTransponder.DropLocation = target.Cell;
                }, null, null, null);
            }

            Rect _LableLcoation = targetingFooter.RightHalf().LeftHalf().ContractedBy(5f);

            if (IntVec3.Equals(this.SelectedCompTransponder.DropLocation, IntVec3.Invalid))
            {
                Widgets.Label(_LableLcoation, "This Location");
            }
            else
            {
                Widgets.Label(_LableLcoation, "X: " + this.SelectedCompTransponder.DropLocation.x + " Z: " + this.SelectedCompTransponder.DropLocation.z);
            }

            if (Widgets.ButtonText(targetingFooter.RightHalf().RightHalf(), "Reset", true, true, true))
            {
                this.SelectedCompTransponder.DropLocation = IntVec3.Invalid;
            }
        }
示例#2
0
 public bool Equals(CellWithRadius other)
 {
     if (cell.Equals(other.cell))
     {
         return(radius.Equals(other.radius));
     }
     return(false);
 }
示例#3
0
 public bool Equals(CellRequest other)
 {
     if (cell.Equals(other.cell) && radius.Equals(other.radius) && GenCollection.ListsEqual(defs, other.defs))
     {
         return(forThing == other.forThing);
     }
     return(false);
 }
示例#4
0
        protected override void FillTab()
        {
            int _TargetingBarHeight = 30;

            Vector2 _WindowSize   = ITab_Fabrication.WinSize;
            Rect    _DrawingSpace = new Rect(0f, 0f, _WindowSize.x, _WindowSize.y).ContractedBy(10f);

            Rect _MainWindow   = _DrawingSpace.TopPartPixels(_DrawingSpace.height - _TargetingBarHeight);
            Rect _TargetingBar = _DrawingSpace.BottomPartPixels(_TargetingBarHeight);

            this.DoGuiForTargetingDrop(_TargetingBar);

            IntVec3 _DropLocation = this.SelectedCompTransponder.parent.Position;

            if (!IntVec3.Equals(this.SelectedCompTransponder.DropLocation, IntVec3.Invalid))
            {
                _DropLocation = this.SelectedCompTransponder.DropLocation;
            }

            Dialog_Prometheus.DoGuiFabrication(_MainWindow,
                                               true,
                                               _DropLocation,
                                               this.SelectedCompTransponder.parent.Map);
        }
示例#5
0
 public bool Equals(PositionColorKey other)
 {
     return(position.Equals(other.position) && color.Equals(other.color));
 }