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; } }
public bool Equals(CellWithRadius other) { if (cell.Equals(other.cell)) { return(radius.Equals(other.radius)); } return(false); }
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); }
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); }
public bool Equals(PositionColorKey other) { return(position.Equals(other.position) && color.Equals(other.color)); }