/// <inheritdoc /> public bool Equals([AllowNull] Pie other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( Visible == other.Visible || Visible != null && Visible.Equals(other.Visible) ) && ( ShowLegend == other.ShowLegend || ShowLegend != null && ShowLegend.Equals(other.ShowLegend) ) && ( LegendGroup == other.LegendGroup || LegendGroup != null && LegendGroup.Equals(other.LegendGroup) ) && ( Opacity == other.Opacity || Opacity != null && Opacity.Equals(other.Opacity) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( UId == other.UId || UId != null && UId.Equals(other.UId) ) && ( Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids) ) && ( Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData) ) && ( Meta == other.Meta || Meta != null && Meta.Equals(other.Meta) ) && ( Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray) ) && ( HoverLabel == other.HoverLabel || HoverLabel != null && HoverLabel.Equals(other.HoverLabel) ) && ( Stream == other.Stream || Stream != null && Stream.Equals(other.Stream) ) && ( Equals(Transforms, other.Transforms) || Transforms != null && other.Transforms != null && Transforms.SequenceEqual(other.Transforms) ) && ( UiRevision == other.UiRevision || UiRevision != null && UiRevision.Equals(other.UiRevision) ) && ( Equals(Labels, other.Labels) || Labels != null && other.Labels != null && Labels.SequenceEqual(other.Labels) ) && ( Label0 == other.Label0 || Label0 != null && Label0.Equals(other.Label0) ) && ( DLabel == other.DLabel || DLabel != null && DLabel.Equals(other.DLabel) ) && ( Equals(Values, other.Values) || Values != null && other.Values != null && Values.SequenceEqual(other.Values) ) && ( Marker == other.Marker || Marker != null && Marker.Equals(other.Marker) ) && ( Equals(Text, other.Text) || Text != null && other.Text != null && Text.SequenceEqual(other.Text) ) && ( HoverText == other.HoverText || HoverText != null && HoverText.Equals(other.HoverText) ) && ( Equals(HoverTextArray, other.HoverTextArray) || HoverTextArray != null && other.HoverTextArray != null && HoverTextArray.SequenceEqual(other.HoverTextArray) ) && ( ScaleGroup == other.ScaleGroup || ScaleGroup != null && ScaleGroup.Equals(other.ScaleGroup) ) && ( TextInfo == other.TextInfo || TextInfo != null && TextInfo.Equals(other.TextInfo) ) && ( HoverInfo == other.HoverInfo || HoverInfo != null && HoverInfo.Equals(other.HoverInfo) ) && ( Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray) ) && ( HoverTemplate == other.HoverTemplate || HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate) ) && ( Equals(HoverTemplateArray, other.HoverTemplateArray) || HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray) ) && ( TextTemplate == other.TextTemplate || TextTemplate != null && TextTemplate.Equals(other.TextTemplate) ) && ( Equals(TextTemplateArray, other.TextTemplateArray) || TextTemplateArray != null && other.TextTemplateArray != null && TextTemplateArray.SequenceEqual(other.TextTemplateArray) ) && ( TextPosition == other.TextPosition || TextPosition != null && TextPosition.Equals(other.TextPosition) ) && ( Equals(TextPositionArray, other.TextPositionArray) || TextPositionArray != null && other.TextPositionArray != null && TextPositionArray.SequenceEqual(other.TextPositionArray) ) && ( TextFont == other.TextFont || TextFont != null && TextFont.Equals(other.TextFont) ) && ( InsideTextOrientation == other.InsideTextOrientation || InsideTextOrientation != null && InsideTextOrientation.Equals(other.InsideTextOrientation) ) && ( InsideTextFont == other.InsideTextFont || InsideTextFont != null && InsideTextFont.Equals(other.InsideTextFont) ) && ( OutsideTextFont == other.OutsideTextFont || OutsideTextFont != null && OutsideTextFont.Equals(other.OutsideTextFont) ) && ( AutoMargin == other.AutoMargin || AutoMargin != null && AutoMargin.Equals(other.AutoMargin) ) && ( Title == other.Title || Title != null && Title.Equals(other.Title) ) && ( Domain == other.Domain || Domain != null && Domain.Equals(other.Domain) ) && ( Hole == other.Hole || Hole != null && Hole.Equals(other.Hole) ) && ( Sort == other.Sort || Sort != null && Sort.Equals(other.Sort) ) && ( Direction == other.Direction || Direction != null && Direction.Equals(other.Direction) ) && ( Rotation == other.Rotation || Rotation != null && Rotation.Equals(other.Rotation) ) && ( Pull == other.Pull || Pull != null && Pull.Equals(other.Pull) ) && ( Equals(PullArray, other.PullArray) || PullArray != null && other.PullArray != null && PullArray.SequenceEqual(other.PullArray) ) && ( IdsSrc == other.IdsSrc || IdsSrc != null && IdsSrc.Equals(other.IdsSrc) ) && ( CustomDataSrc == other.CustomDataSrc || CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc) ) && ( MetaSrc == other.MetaSrc || MetaSrc != null && MetaSrc.Equals(other.MetaSrc) ) && ( LabelsSrc == other.LabelsSrc || LabelsSrc != null && LabelsSrc.Equals(other.LabelsSrc) ) && ( ValuesSrc == other.ValuesSrc || ValuesSrc != null && ValuesSrc.Equals(other.ValuesSrc) ) && ( TextSrc == other.TextSrc || TextSrc != null && TextSrc.Equals(other.TextSrc) ) && ( HoverTextSrc == other.HoverTextSrc || HoverTextSrc != null && HoverTextSrc.Equals(other.HoverTextSrc) ) && ( HoverInfoSrc == other.HoverInfoSrc || HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc) ) && ( HoverTemplateSrc == other.HoverTemplateSrc || HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc) ) && ( TextTemplateSrc == other.TextTemplateSrc || TextTemplateSrc != null && TextTemplateSrc.Equals(other.TextTemplateSrc) ) && ( TextPositionSrc == other.TextPositionSrc || TextPositionSrc != null && TextPositionSrc.Equals(other.TextPositionSrc) ) && ( PullSrc == other.PullSrc || PullSrc != null && PullSrc.Equals(other.PullSrc) )); }
public void PaintWorld(WorldLayer layer) { var h = 17; var w1 = 30; var textLocust = "L"; var layoutLocust = TextFontLocust.GetTextLayout(textLocust); var textHaunt = "H"; var layoutHaunt = TextFontHaunt.GetTextLayout(textHaunt); var py = Hud.Window.Size.Height / 600; var monsters = Hud.Game.AliveMonsters.Where(x => x.IsAlive); List <IMonster> monstersElite = new List <IMonster>(); foreach (var monster in monsters) { if (monster.SummonerAcdDynamicId == 0) { if (monster.Rarity == ActorRarity.Champion || monster.Rarity == ActorRarity.Rare) { monstersElite.Add(monster); } } } foreach (var monster in monstersElite) { var hptext = ValueToString(monster.CurHealth * 100 / monster.MaxHealth, ValueFormat.NormalNumberNoDecimal); var layout = TextFont.GetTextLayout(hptext); var w = monster.CurHealth * w1 / monster.MaxHealth; var monsterX = monster.FloorCoordinate.ToScreenCoordinate().X - w1 / 2; var monsterY = monster.FloorCoordinate.ToScreenCoordinate().Y + py * 12; var locustX = monsterX - w1 / 2; var hauntX = monsterX + w1 + 5; var buffY = monsterY - 1; var hpX = monsterX + 7; BorderBrush.DrawRectangle(monsterX, monsterY, w1, h); BackgroundBrush.DrawRectangle(monsterX, monsterY, w1, h); if (monster.Rarity == ActorRarity.Champion) { ChampionBrush.DrawRectangle(monsterX, monsterY, (float)w, h); } if (monster.Rarity == ActorRarity.Rare) { bool flagJ = false; foreach (var snoMonsterAffix in monster.AffixSnoList) { if (snoMonsterAffix.Affix == MonsterAffix.Juggernaut) { flagJ = true; break; } } if (flagJ) { RareJBrush.DrawRectangle(monsterX, monsterY, (float)w, h); } else { RareBrush.DrawRectangle(monsterX, monsterY, (float)w, h); } } if (monster.Locust) { TextFontLocust.DrawText(layoutLocust, locustX, buffY); } if (monster.Haunted) { TextFontHaunt.DrawText(layoutHaunt, hauntX, buffY); } TextFont.DrawText(layout, hpX, buffY); } monstersElite.Clear(); }
public void PaintWorld(WorldLayer layer) { var hedPlugin = Hud.GetPlugin <HotEnablerDisablerPlugin>(); bool GoOn = hedPlugin.CanIRun(Hud.Game.Me, this.GetType().Name); if (!GoOn) { return; } bool ZeiActive = false; ZeiRank = 0; var jewelsLocations = Hud.Game.Items.Where(x => x.Location == ItemLocation.LeftRing || x.Location == ItemLocation.RightRing || x.Location == ItemLocation.Neck); foreach (var ZeiLocation in jewelsLocations) { if (ZeiLocation.SocketCount != 1 || ZeiLocation.ItemsInSocket == null) { continue; } var Zei = ZeiLocation.ItemsInSocket.FirstOrDefault(); if (Zei == null) { continue; } if (Zei.SnoItem.Sno == 3249733225) { ZeiActive = true; ZeiRank = Zei.JewelRank; break; } else { continue; } } if (ZeiActive == false) { return; } if (permanentCircle) { if (Hud.Game.IsInTown) { return; } } else { if (!Hud.Game.Me.InCombat) { goto MiniMapCircle; } } OutlineBrush.DrawWorldEllipse(50, -1, Hud.Game.Me.FloorCoordinate); var Smonster = Hud.Game.SelectedMonster2 ?? Hud.Game.SelectedMonster1; if ((Smonster == null)) { return; } var monsters = Hud.Game.AliveMonsters.Where(monster => monster.Attackable && monster == Smonster); foreach (var monster in monsters) { if (ElitesOnlyNumbers && !monster.IsElite) { continue; } var monsterScreenCoordinate = monster.FloorCoordinate.ToScreenCoordinate(); percentDamageBonus = ""; float gemMaths = 4f + (0.08f * (float)ZeiRank); if (monster.NormalizedXyDistanceToMe < 50) { percentDamageBonus = "+" + (gemMaths * ((float)monster.NormalizedXyDistanceToMe / 10)).ToString("0.00") + "%"; } else { percentDamageBonus = "+" + (gemMaths * 5f).ToString("0.00") + "% Max!"; } float visibleX; float visibleY; float MidX = (float)midX; float MidY = (float)midY; if (monsterScreenCoordinate.X > MidX) { visibleX = monsterScreenCoordinate.X - 60f; } else { visibleX = monsterScreenCoordinate.X + 50f; } if (monsterScreenCoordinate.Y > MidY) { visibleY = monsterScreenCoordinate.Y - 150f; } else { visibleY = monsterScreenCoordinate.Y + 50f; } var layout = TextFont.GetTextLayout(percentDamageBonus); TextFont.DrawText(layout, visibleX, visibleY); } MiniMapCircle: if (Hud.Game.IsInTown) { return; } ZeiMiniMapDecorator.Paint(layer, null, Hud.Game.Me.FloorCoordinate, null); var cursorScreenCoord = Hud.Window.CreateScreenCoordinate(Hud.Window.CursorX, Hud.Window.CursorY); var visorWorldCoord = cursorScreenCoord.ToWorldCoordinate(); MiniMapVisorDecorator.Paint(layer, null, visorWorldCoord, null); }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (Visible != null) { hashCode = hashCode * 59 + Visible.GetHashCode(); } if (ShowLegend != null) { hashCode = hashCode * 59 + ShowLegend.GetHashCode(); } if (LegendGroup != null) { hashCode = hashCode * 59 + LegendGroup.GetHashCode(); } if (Opacity != null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (UId != null) { hashCode = hashCode * 59 + UId.GetHashCode(); } if (Ids != null) { hashCode = hashCode * 59 + Ids.GetHashCode(); } if (CustomData != null) { hashCode = hashCode * 59 + CustomData.GetHashCode(); } if (Meta != null) { hashCode = hashCode * 59 + Meta.GetHashCode(); } if (MetaArray != null) { hashCode = hashCode * 59 + MetaArray.GetHashCode(); } if (SelectedPoints != null) { hashCode = hashCode * 59 + SelectedPoints.GetHashCode(); } if (HoverLabel != null) { hashCode = hashCode * 59 + HoverLabel.GetHashCode(); } if (Stream != null) { hashCode = hashCode * 59 + Stream.GetHashCode(); } if (Transforms != null) { hashCode = hashCode * 59 + Transforms.GetHashCode(); } if (UiRevision != null) { hashCode = hashCode * 59 + UiRevision.GetHashCode(); } if (Lon != null) { hashCode = hashCode * 59 + Lon.GetHashCode(); } if (Lat != null) { hashCode = hashCode * 59 + Lat.GetHashCode(); } if (Locations != null) { hashCode = hashCode * 59 + Locations.GetHashCode(); } if (LocationMode != null) { hashCode = hashCode * 59 + LocationMode.GetHashCode(); } if (GeoJson != null) { hashCode = hashCode * 59 + GeoJson.GetHashCode(); } if (FeatureIdKey != null) { hashCode = hashCode * 59 + FeatureIdKey.GetHashCode(); } if (Mode != null) { hashCode = hashCode * 59 + Mode.GetHashCode(); } if (Text != null) { hashCode = hashCode * 59 + Text.GetHashCode(); } if (TextArray != null) { hashCode = hashCode * 59 + TextArray.GetHashCode(); } if (TextTemplate != null) { hashCode = hashCode * 59 + TextTemplate.GetHashCode(); } if (TextTemplateArray != null) { hashCode = hashCode * 59 + TextTemplateArray.GetHashCode(); } if (HoverText != null) { hashCode = hashCode * 59 + HoverText.GetHashCode(); } if (HoverTextArray != null) { hashCode = hashCode * 59 + HoverTextArray.GetHashCode(); } if (TextFont != null) { hashCode = hashCode * 59 + TextFont.GetHashCode(); } if (TextPosition != null) { hashCode = hashCode * 59 + TextPosition.GetHashCode(); } if (TextPositionArray != null) { hashCode = hashCode * 59 + TextPositionArray.GetHashCode(); } if (Line != null) { hashCode = hashCode * 59 + Line.GetHashCode(); } if (ConnectGaps != null) { hashCode = hashCode * 59 + ConnectGaps.GetHashCode(); } if (Marker != null) { hashCode = hashCode * 59 + Marker.GetHashCode(); } if (Fill != null) { hashCode = hashCode * 59 + Fill.GetHashCode(); } if (FillColor != null) { hashCode = hashCode * 59 + FillColor.GetHashCode(); } if (Selected != null) { hashCode = hashCode * 59 + Selected.GetHashCode(); } if (Unselected != null) { hashCode = hashCode * 59 + Unselected.GetHashCode(); } if (HoverInfo != null) { hashCode = hashCode * 59 + HoverInfo.GetHashCode(); } if (HoverInfoArray != null) { hashCode = hashCode * 59 + HoverInfoArray.GetHashCode(); } if (HoverTemplate != null) { hashCode = hashCode * 59 + HoverTemplate.GetHashCode(); } if (HoverTemplateArray != null) { hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode(); } if (Geo != null) { hashCode = hashCode * 59 + Geo.GetHashCode(); } if (IdsSrc != null) { hashCode = hashCode * 59 + IdsSrc.GetHashCode(); } if (CustomDataSrc != null) { hashCode = hashCode * 59 + CustomDataSrc.GetHashCode(); } if (MetaSrc != null) { hashCode = hashCode * 59 + MetaSrc.GetHashCode(); } if (LonSrc != null) { hashCode = hashCode * 59 + LonSrc.GetHashCode(); } if (LatSrc != null) { hashCode = hashCode * 59 + LatSrc.GetHashCode(); } if (LocationsSrc != null) { hashCode = hashCode * 59 + LocationsSrc.GetHashCode(); } if (TextSrc != null) { hashCode = hashCode * 59 + TextSrc.GetHashCode(); } if (TextTemplateSrc != null) { hashCode = hashCode * 59 + TextTemplateSrc.GetHashCode(); } if (HoverTextSrc != null) { hashCode = hashCode * 59 + HoverTextSrc.GetHashCode(); } if (TextPositionSrc != null) { hashCode = hashCode * 59 + TextPositionSrc.GetHashCode(); } if (HoverInfoSrc != null) { hashCode = hashCode * 59 + HoverInfoSrc.GetHashCode(); } if (HoverTemplateSrc != null) { hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode(); } return(hashCode); } }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (Visible != null) { hashCode = hashCode * 59 + Visible.GetHashCode(); } if (Opacity != null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (UId != null) { hashCode = hashCode * 59 + UId.GetHashCode(); } if (Ids != null) { hashCode = hashCode * 59 + Ids.GetHashCode(); } if (CustomData != null) { hashCode = hashCode * 59 + CustomData.GetHashCode(); } if (Meta != null) { hashCode = hashCode * 59 + Meta.GetHashCode(); } if (MetaArray != null) { hashCode = hashCode * 59 + MetaArray.GetHashCode(); } if (HoverLabel != null) { hashCode = hashCode * 59 + HoverLabel.GetHashCode(); } if (Stream != null) { hashCode = hashCode * 59 + Stream.GetHashCode(); } if (Transforms != null) { hashCode = hashCode * 59 + Transforms.GetHashCode(); } if (UiRevision != null) { hashCode = hashCode * 59 + UiRevision.GetHashCode(); } if (Labels != null) { hashCode = hashCode * 59 + Labels.GetHashCode(); } if (Parents != null) { hashCode = hashCode * 59 + Parents.GetHashCode(); } if (Values != null) { hashCode = hashCode * 59 + Values.GetHashCode(); } if (BranchValues != null) { hashCode = hashCode * 59 + BranchValues.GetHashCode(); } if (Count != null) { hashCode = hashCode * 59 + Count.GetHashCode(); } if (Level != null) { hashCode = hashCode * 59 + Level.GetHashCode(); } if (MaxDepth != null) { hashCode = hashCode * 59 + MaxDepth.GetHashCode(); } if (Marker != null) { hashCode = hashCode * 59 + Marker.GetHashCode(); } if (Leaf != null) { hashCode = hashCode * 59 + Leaf.GetHashCode(); } if (Text != null) { hashCode = hashCode * 59 + Text.GetHashCode(); } if (TextInfo != null) { hashCode = hashCode * 59 + TextInfo.GetHashCode(); } if (TextTemplate != null) { hashCode = hashCode * 59 + TextTemplate.GetHashCode(); } if (TextTemplateArray != null) { hashCode = hashCode * 59 + TextTemplateArray.GetHashCode(); } if (HoverText != null) { hashCode = hashCode * 59 + HoverText.GetHashCode(); } if (HoverTextArray != null) { hashCode = hashCode * 59 + HoverTextArray.GetHashCode(); } if (HoverInfo != null) { hashCode = hashCode * 59 + HoverInfo.GetHashCode(); } if (HoverInfoArray != null) { hashCode = hashCode * 59 + HoverInfoArray.GetHashCode(); } if (HoverTemplate != null) { hashCode = hashCode * 59 + HoverTemplate.GetHashCode(); } if (HoverTemplateArray != null) { hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode(); } if (TextFont != null) { hashCode = hashCode * 59 + TextFont.GetHashCode(); } if (InsideTextOrientation != null) { hashCode = hashCode * 59 + InsideTextOrientation.GetHashCode(); } if (InsideTextFont != null) { hashCode = hashCode * 59 + InsideTextFont.GetHashCode(); } if (OutsideTextFont != null) { hashCode = hashCode * 59 + OutsideTextFont.GetHashCode(); } if (Domain != null) { hashCode = hashCode * 59 + Domain.GetHashCode(); } if (IdsSrc != null) { hashCode = hashCode * 59 + IdsSrc.GetHashCode(); } if (CustomDataSrc != null) { hashCode = hashCode * 59 + CustomDataSrc.GetHashCode(); } if (MetaSrc != null) { hashCode = hashCode * 59 + MetaSrc.GetHashCode(); } if (LabelsSrc != null) { hashCode = hashCode * 59 + LabelsSrc.GetHashCode(); } if (ParentsSrc != null) { hashCode = hashCode * 59 + ParentsSrc.GetHashCode(); } if (ValuesSrc != null) { hashCode = hashCode * 59 + ValuesSrc.GetHashCode(); } if (TextSrc != null) { hashCode = hashCode * 59 + TextSrc.GetHashCode(); } if (TextTemplateSrc != null) { hashCode = hashCode * 59 + TextTemplateSrc.GetHashCode(); } if (HoverTextSrc != null) { hashCode = hashCode * 59 + HoverTextSrc.GetHashCode(); } if (HoverInfoSrc != null) { hashCode = hashCode * 59 + HoverInfoSrc.GetHashCode(); } if (HoverTemplateSrc != null) { hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode(); } return(hashCode); } }
public bool Equals([AllowNull] ScatterPolar other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) && (Visible == other.Visible && Visible != null && other.Visible != null && Visible.Equals(other.Visible)) && (ShowLegend == other.ShowLegend && ShowLegend != null && other.ShowLegend != null && ShowLegend.Equals(other.ShowLegend)) && (LegendGroup == other.LegendGroup && LegendGroup != null && other.LegendGroup != null && LegendGroup.Equals(other.LegendGroup)) && (Opacity == other.Opacity && Opacity != null && other.Opacity != null && Opacity.Equals(other.Opacity)) && (Name == other.Name && Name != null && other.Name != null && Name.Equals(other.Name)) && (UId == other.UId && UId != null && other.UId != null && UId.Equals(other.UId)) && (Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids)) && (Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData)) && (Meta == other.Meta && Meta != null && other.Meta != null && Meta.Equals(other.Meta)) && (Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray)) && (SelectedPoints == other.SelectedPoints && SelectedPoints != null && other.SelectedPoints != null && SelectedPoints.Equals(other.SelectedPoints)) && (HoverLabel == other.HoverLabel && HoverLabel != null && other.HoverLabel != null && HoverLabel.Equals(other.HoverLabel)) && (Stream == other.Stream && Stream != null && other.Stream != null && Stream.Equals(other.Stream)) && (Equals(Transforms, other.Transforms) || Transforms != null && other.Transforms != null && Transforms.SequenceEqual(other.Transforms)) && (UiRevision == other.UiRevision && UiRevision != null && other.UiRevision != null && UiRevision.Equals(other.UiRevision)) && (Mode == other.Mode && Mode != null && other.Mode != null && Mode.Equals(other.Mode)) && (Equals(R, other.R) || R != null && other.R != null && R.SequenceEqual(other.R)) && (Equals(Theta, other.Theta) || Theta != null && other.Theta != null && Theta.SequenceEqual(other.Theta)) && (R0 == other.R0 && R0 != null && other.R0 != null && R0.Equals(other.R0)) && (Dr == other.Dr && Dr != null && other.Dr != null && Dr.Equals(other.Dr)) && (Theta0 == other.Theta0 && Theta0 != null && other.Theta0 != null && Theta0.Equals(other.Theta0)) && (DTheta == other.DTheta && DTheta != null && other.DTheta != null && DTheta.Equals(other.DTheta)) && (ThetaUnit == other.ThetaUnit && ThetaUnit != null && other.ThetaUnit != null && ThetaUnit.Equals(other.ThetaUnit)) && (Text == other.Text && Text != null && other.Text != null && Text.Equals(other.Text)) && (Equals(TextArray, other.TextArray) || TextArray != null && other.TextArray != null && TextArray.SequenceEqual(other.TextArray)) && (TextTemplate == other.TextTemplate && TextTemplate != null && other.TextTemplate != null && TextTemplate.Equals(other.TextTemplate)) && (Equals(TextTemplateArray, other.TextTemplateArray) || TextTemplateArray != null && other.TextTemplateArray != null && TextTemplateArray.SequenceEqual(other.TextTemplateArray)) && (HoverText == other.HoverText && HoverText != null && other.HoverText != null && HoverText.Equals(other.HoverText)) && (Equals(HoverTextArray, other.HoverTextArray) || HoverTextArray != null && other.HoverTextArray != null && HoverTextArray.SequenceEqual(other.HoverTextArray)) && (Line == other.Line && Line != null && other.Line != null && Line.Equals(other.Line)) && (ConnectGaps == other.ConnectGaps && ConnectGaps != null && other.ConnectGaps != null && ConnectGaps.Equals(other.ConnectGaps)) && (Marker == other.Marker && Marker != null && other.Marker != null && Marker.Equals(other.Marker)) && (ClipOnAxis == other.ClipOnAxis && ClipOnAxis != null && other.ClipOnAxis != null && ClipOnAxis.Equals(other.ClipOnAxis)) && (TextPosition == other.TextPosition && TextPosition != null && other.TextPosition != null && TextPosition.Equals(other.TextPosition)) && (Equals(TextPositionArray, other.TextPositionArray) || TextPositionArray != null && other.TextPositionArray != null && TextPositionArray.SequenceEqual(other.TextPositionArray)) && (TextFont == other.TextFont && TextFont != null && other.TextFont != null && TextFont.Equals(other.TextFont)) && (Fill == other.Fill && Fill != null && other.Fill != null && Fill.Equals(other.Fill)) && (FillColor == other.FillColor && FillColor != null && other.FillColor != null && FillColor.Equals(other.FillColor)) && (HoverInfo == other.HoverInfo && HoverInfo != null && other.HoverInfo != null && HoverInfo.Equals(other.HoverInfo)) && (Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray)) && (HoverOn == other.HoverOn && HoverOn != null && other.HoverOn != null && HoverOn.Equals(other.HoverOn)) && (HoverTemplate == other.HoverTemplate && HoverTemplate != null && other.HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate)) && (Equals(HoverTemplateArray, other.HoverTemplateArray) || HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray)) && (Selected == other.Selected && Selected != null && other.Selected != null && Selected.Equals(other.Selected)) && (Unselected == other.Unselected && Unselected != null && other.Unselected != null && Unselected.Equals(other.Unselected)) && (Subplot == other.Subplot && Subplot != null && other.Subplot != null && Subplot.Equals(other.Subplot)) && (IdsSrc == other.IdsSrc && IdsSrc != null && other.IdsSrc != null && IdsSrc.Equals(other.IdsSrc)) && (CustomDataSrc == other.CustomDataSrc && CustomDataSrc != null && other.CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc)) && (MetaSrc == other.MetaSrc && MetaSrc != null && other.MetaSrc != null && MetaSrc.Equals(other.MetaSrc)) && (RSrc == other.RSrc && RSrc != null && other.RSrc != null && RSrc.Equals(other.RSrc)) && (ThetaSrc == other.ThetaSrc && ThetaSrc != null && other.ThetaSrc != null && ThetaSrc.Equals(other.ThetaSrc)) && (TextSrc == other.TextSrc && TextSrc != null && other.TextSrc != null && TextSrc.Equals(other.TextSrc)) && (TextTemplateSrc == other.TextTemplateSrc && TextTemplateSrc != null && other.TextTemplateSrc != null && TextTemplateSrc.Equals(other.TextTemplateSrc)) && (HoverTextSrc == other.HoverTextSrc && HoverTextSrc != null && other.HoverTextSrc != null && HoverTextSrc.Equals(other.HoverTextSrc)) && (TextPositionSrc == other.TextPositionSrc && TextPositionSrc != null && other.TextPositionSrc != null && TextPositionSrc.Equals(other.TextPositionSrc)) && (HoverInfoSrc == other.HoverInfoSrc && HoverInfoSrc != null && other.HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc)) && (HoverTemplateSrc == other.HoverTemplateSrc && HoverTemplateSrc != null && other.HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc))); }
public TextStyle(TextAlignment alignment, TextFont font, float size, float maxwidth, int maxlines, float linespacing, Vector3 colour) : this(alignment, font, size, maxwidth, maxlines, linespacing, new Vector4(colour, 1)) { }
public void Paint(float x, float y, float w, float h, HorizontalAlign align) { if (!Enabled) { return; } if (TextFont == null) { return; } var text = TextFunc != null?TextFunc.Invoke() : null; var hint = HintFunc != null?HintFunc.Invoke() : null; if (string.IsNullOrEmpty(text) && HideBackgroundWhenTextIsEmpty) { return; } if (Hud.Window.CursorInsideRect(x, y, w, h)) { var expanded = false; if (ExpandUpLabels != null && ExpandUpLabels.Count > 0) { var ly = y - h; foreach (var label in ExpandUpLabels) { label.Paint(x, ly, w, h, align); label.PaintExpandedHint(x + w, ly, w * label.ExpandedHintWidthMultiplier, h, HorizontalAlign.Center); ly -= h; expanded = true; } this.PaintExpandedHint(x + w, y, w * 3, h, HorizontalAlign.Center); } if (ExpandDownLabels != null && ExpandDownLabels.Count > 0) { var ly = y + h; foreach (var label in ExpandDownLabels) { label.Paint(x, ly, w, h, align); label.PaintExpandedHint(x + w, ly, w * label.ExpandedHintWidthMultiplier, h, HorizontalAlign.Center); ly += h; expanded = true; } this.PaintExpandedHint(x + w, y, w * 3, h, HorizontalAlign.Center); } if (ExpandRightLabels != null && ExpandRightLabels.Count > 0) { var lx = x + w; foreach (var label in ExpandRightLabels) { label.Paint(lx, y, w, h, align); lx += h; expanded = true; } } if (ExpandLeftLabels != null && ExpandLeftLabels.Count > 0) { var lx = x - w; foreach (var label in ExpandLeftLabels) { label.Paint(lx, y, w, h, align); lx -= h; expanded = true; } } if (!expanded) { if (!string.IsNullOrEmpty(hint)) { Hud.Render.SetHint(hint); } } } if (BackgroundTexture1 != null) { BackgroundTexture1.Draw(x, y, w, h, BackgroundTextureOpacity1); } if (BackgroundTexture2 != null) { BackgroundTexture2.Draw(x, y, w, h, BackgroundTextureOpacity2); } if (BackgroundBrush != null) { BackgroundBrush.DrawRectangle(x, y, w, h); } if (!string.IsNullOrEmpty(text)) { var layout = TextFont.GetTextLayout(text); switch (align) { case HorizontalAlign.Left: TextFont.DrawText(layout, x, y + (h - layout.Metrics.Height) / 2); break; case HorizontalAlign.Center: TextFont.DrawText(layout, x + (w - layout.Metrics.Width) / 2, y + (h - layout.Metrics.Height) / 2); break; case HorizontalAlign.Right: TextFont.DrawText(layout, x + w - layout.Metrics.Width, y + (h - layout.Metrics.Height) / 2); break; } } if (BorderBrush != null) { BorderBrush.DrawRectangle(x, y, w, h); } }
public bool Equals([AllowNull] FunnelArea other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) && (Visible == other.Visible && Visible != null && other.Visible != null && Visible.Equals(other.Visible)) && (ShowLegend == other.ShowLegend && ShowLegend != null && other.ShowLegend != null && ShowLegend.Equals(other.ShowLegend)) && (LegendGroup == other.LegendGroup && LegendGroup != null && other.LegendGroup != null && LegendGroup.Equals(other.LegendGroup)) && (Opacity == other.Opacity && Opacity != null && other.Opacity != null && Opacity.Equals(other.Opacity)) && (Name == other.Name && Name != null && other.Name != null && Name.Equals(other.Name)) && (UId == other.UId && UId != null && other.UId != null && UId.Equals(other.UId)) && (Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids)) && (Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData)) && (Meta == other.Meta && Meta != null && other.Meta != null && Meta.Equals(other.Meta)) && (Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray)) && (HoverLabel == other.HoverLabel && HoverLabel != null && other.HoverLabel != null && HoverLabel.Equals(other.HoverLabel)) && (Stream == other.Stream && Stream != null && other.Stream != null && Stream.Equals(other.Stream)) && (Equals(Transforms, other.Transforms) || Transforms != null && other.Transforms != null && Transforms.SequenceEqual(other.Transforms)) && (UiRevision == other.UiRevision && UiRevision != null && other.UiRevision != null && UiRevision.Equals(other.UiRevision)) && (Equals(Labels, other.Labels) || Labels != null && other.Labels != null && Labels.SequenceEqual(other.Labels)) && (Label0 == other.Label0 && Label0 != null && other.Label0 != null && Label0.Equals(other.Label0)) && (DLabel == other.DLabel && DLabel != null && other.DLabel != null && DLabel.Equals(other.DLabel)) && (Equals(Values, other.Values) || Values != null && other.Values != null && Values.SequenceEqual(other.Values)) && (Marker == other.Marker && Marker != null && other.Marker != null && Marker.Equals(other.Marker)) && (Equals(Text, other.Text) || Text != null && other.Text != null && Text.SequenceEqual(other.Text)) && (HoverText == other.HoverText && HoverText != null && other.HoverText != null && HoverText.Equals(other.HoverText)) && (Equals(HoverTextArray, other.HoverTextArray) || HoverTextArray != null && other.HoverTextArray != null && HoverTextArray.SequenceEqual(other.HoverTextArray)) && (ScaleGroup == other.ScaleGroup && ScaleGroup != null && other.ScaleGroup != null && ScaleGroup.Equals(other.ScaleGroup)) && (TextInfo == other.TextInfo && TextInfo != null && other.TextInfo != null && TextInfo.Equals(other.TextInfo)) && (TextTemplate == other.TextTemplate && TextTemplate != null && other.TextTemplate != null && TextTemplate.Equals(other.TextTemplate)) && (Equals(TextTemplateArray, other.TextTemplateArray) || TextTemplateArray != null && other.TextTemplateArray != null && TextTemplateArray.SequenceEqual(other.TextTemplateArray)) && (HoverInfo == other.HoverInfo && HoverInfo != null && other.HoverInfo != null && HoverInfo.Equals(other.HoverInfo)) && (Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray)) && (HoverTemplate == other.HoverTemplate && HoverTemplate != null && other.HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate)) && (Equals(HoverTemplateArray, other.HoverTemplateArray) || HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray)) && (TextPosition == other.TextPosition && TextPosition != null && other.TextPosition != null && TextPosition.Equals(other.TextPosition)) && (Equals(TextPositionArray, other.TextPositionArray) || TextPositionArray != null && other.TextPositionArray != null && TextPositionArray.SequenceEqual(other.TextPositionArray)) && (TextFont == other.TextFont && TextFont != null && other.TextFont != null && TextFont.Equals(other.TextFont)) && (InsideTextFont == other.InsideTextFont && InsideTextFont != null && other.InsideTextFont != null && InsideTextFont.Equals(other.InsideTextFont)) && (Title == other.Title && Title != null && other.Title != null && Title.Equals(other.Title)) && (Domain == other.Domain && Domain != null && other.Domain != null && Domain.Equals(other.Domain)) && (AspectRatio == other.AspectRatio && AspectRatio != null && other.AspectRatio != null && AspectRatio.Equals(other.AspectRatio)) && (BaseRatio == other.BaseRatio && BaseRatio != null && other.BaseRatio != null && BaseRatio.Equals(other.BaseRatio)) && (IdsSrc == other.IdsSrc && IdsSrc != null && other.IdsSrc != null && IdsSrc.Equals(other.IdsSrc)) && (CustomDataSrc == other.CustomDataSrc && CustomDataSrc != null && other.CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc)) && (MetaSrc == other.MetaSrc && MetaSrc != null && other.MetaSrc != null && MetaSrc.Equals(other.MetaSrc)) && (LabelsSrc == other.LabelsSrc && LabelsSrc != null && other.LabelsSrc != null && LabelsSrc.Equals(other.LabelsSrc)) && (ValuesSrc == other.ValuesSrc && ValuesSrc != null && other.ValuesSrc != null && ValuesSrc.Equals(other.ValuesSrc)) && (TextSrc == other.TextSrc && TextSrc != null && other.TextSrc != null && TextSrc.Equals(other.TextSrc)) && (HoverTextSrc == other.HoverTextSrc && HoverTextSrc != null && other.HoverTextSrc != null && HoverTextSrc.Equals(other.HoverTextSrc)) && (TextTemplateSrc == other.TextTemplateSrc && TextTemplateSrc != null && other.TextTemplateSrc != null && TextTemplateSrc.Equals(other.TextTemplateSrc)) && (HoverInfoSrc == other.HoverInfoSrc && HoverInfoSrc != null && other.HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc)) && (HoverTemplateSrc == other.HoverTemplateSrc && HoverTemplateSrc != null && other.HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc)) && (TextPositionSrc == other.TextPositionSrc && TextPositionSrc != null && other.TextPositionSrc != null && TextPositionSrc.Equals(other.TextPositionSrc))); }
public void Dispose() { TextFont?.Dispose(); TitleFont?.Dispose(); Image?.Dispose(); }
public ToolboxText(Canvas canvas) : base(canvas) { TextFont.Dispose(); TextFont = new Font(FontFamily.GenericSansSerif, 20); }
public TextGameObject(TextFont textFont, int layer = 0, string id = "") : base(textFont, layer, id) { }
public TextFontProxy(TextFont textFont, Action disposed) { this.textFont = textFont; this.disposed = disposed; }
public override void PaintWorld(WorldLayer layer) { var monsters = Hud.Game.AliveMonsters; Dictionary <IMonster, string> eliteGroup = new Dictionary <IMonster, string>(); foreach (var monster in monsters) { if (monster.Rarity == ActorRarity.Champion || monster.Rarity == ActorRarity.Rare) { eliteGroup.Add(monster, String.Join(", ", monster.AffixSnoList)); } } Dictionary <IMonster, string> eliteGroup1 = eliteGroup.OrderBy(p => p.Value).ToDictionary(p => p.Key, o => o.Value); var px = Hud.Window.Size.Width * 0.00125f; var py = Hud.Window.Size.Height * 0.001667f; var h = py * 6; var w2 = py * 80; var count = 0; string preStr = null; //remove clone foreach (var elite in eliteGroup1) { if (elite.Key.Rarity == ActorRarity.Champion) { var eliteCurMaxHealth = 0.0d; var eliteMaxHealth = 0.0d; bool illusionist = false; int same = 0; eliteCurMaxHealth = elite.Key.MaxHealth; same = 0; foreach (var monster2 in monsters) { if (eliteMaxHealth < monster2.MaxHealth && monster2.Rarity == ActorRarity.Champion) { eliteMaxHealth = monster2.MaxHealth; } } foreach (var monster1 in monsters) { if (monster1.Rarity == ActorRarity.Champion) { if (eliteCurMaxHealth == monster1.MaxHealth) { same++; } if (same == 2) { illusionist = true; break; } } } if (illusionist == false) { var w = elite.Key.CurHealth * w2 / elite.Key.MaxHealth; var text = (elite.Key.CurHealth * 100 / elite.Key.MaxHealth).ToString("f0") + "%"; var layout = TextFont.GetTextLayout(text); if (preStr != elite.Value || preStr == null) { count++; } var y = py * 8 * count; //BorderBrush.DrawRectangle(x, y, 70, h); BackgroundBrush.DrawRectangle(Hud.Window.Size.Width * 0.125f, y, w2, h); TextFont.DrawText(layout, Hud.Window.Size.Width * 0.125f + px + w2, y - py); ChampionBrush.DrawRectangle(Hud.Window.Size.Width * 0.125f, y, (float)w, h); preStr = elite.Value; count++; } } if (elite.Key.Rarity == ActorRarity.Rare) { var eliteCurMaxHealth = 0.0d; var eliteMaxHealth = 0.0d; bool illusionist = false; int same = 0; eliteCurMaxHealth = elite.Key.MaxHealth; same = 0; foreach (var monster2 in monsters) { if (eliteMaxHealth < monster2.MaxHealth && monster2.Rarity == ActorRarity.Rare) { eliteMaxHealth = monster2.MaxHealth; } } foreach (var monster1 in monsters) { if (monster1.Rarity == ActorRarity.Rare) { if (eliteCurMaxHealth == monster1.MaxHealth) { same++; } if (same == 2) { illusionist = true; break; } } } if (illusionist == false) { var w = elite.Key.CurHealth * w2 / elite.Key.MaxHealth; var text = (elite.Key.CurHealth * 100 / elite.Key.MaxHealth).ToString("f0") + "%"; var layout = TextFont.GetTextLayout(text); if (preStr != elite.Value || preStr == null) { count++; } var y = py * 8 * count; //BorderBrush.DrawRectangle(x, y, 70, h); BackgroundBrush.DrawRectangle(Hud.Window.Size.Width * 0.125f, y, w2, h); TextFont.DrawText(layout, Hud.Window.Size.Width * 0.125f + px + w2, y - py); RareBrush.DrawRectangle(Hud.Window.Size.Width * 0.125f, y, (float)w, h); preStr = elite.Value; count++; } } } eliteGroup.Clear(); }
public void Paint(ISnoPower power, float x, float y, int textLenght = 25) { var name = string.Empty; var items = power.GetItemSnos(); if (items.Any(xx => xx != 0) && string.IsNullOrWhiteSpace(power.NameEnglish)) { //name = Hud.Inventory.GetSnoItem(items.First()).NameEnglish; var item = Hud.Inventory.GetSnoItem(items.First()); name = item == null?power.Sno.ToString() : item.NameEnglish; } else { name = string.IsNullOrWhiteSpace(power.NameEnglish) ? power.Sno.ToString() : power.NameEnglish; } if (name.Length > textLenght) { name = name.Substring(0, textLenght); } var layout = TextFont.GetTextLayout(string.Format("{0,25} Ic:", name)); var layoutSpacer = TextFont.GetTextLayout(":"); TextFont.DrawText(layout, x, y); if (Hud.Window.CursorInsideRect(x, y, layout.Metrics.Width, layout.Metrics.Height)) { Hud.Render.SetHint(power.Sno + " : " + power.Code + " : " + power.DescriptionEnglish); } x += layout.Metrics.Width + layoutSpacer.Metrics.Width * 2; if (power.NormalIconTextureId != 0) { var texture = Hud.Texture.GetTexture(power.NormalIconTextureId); if (texture != null) { texture.Draw(x, y, StandardIconSize, StandardIconSize); } else { BackgroundBrush.DrawRectangle(x, y, StandardIconSize, StandardIconSize); } if (Hud.Window.CursorInsideRect(x, y, StandardIconSize, StandardIconSize)) { Hud.Render.SetHint("TextureId : " + power.NormalIconTextureId); } x += StandardIconSize + StandardIconSpacing; } foreach (var icon in power.Icons.Where(xxx => xxx.Exists && xxx.TextureId != 0 && xxx.TextureId != power.NormalIconTextureId).Select(xxx => xxx.TextureId).Distinct()) { var texture = Hud.Texture.GetTexture(icon); if (texture != null) { texture.Draw(x, y, StandardIconSize, StandardIconSize); } else { BackgroundBrush.DrawRectangle(x, y, StandardIconSize, StandardIconSize); } if (Hud.Window.CursorInsideRect(x, y, StandardIconSize, StandardIconSize)) { Hud.Render.SetHint("TextureId : " + icon); } x += StandardIconSize + StandardIconSpacing; } layout = TextFont.GetTextLayout(" It:"); TextFont.DrawText(layout, x, y); x += layout.Metrics.Width + layoutSpacer.Metrics.Width; foreach (var sno in items) { if (sno == 0) { continue; } var item = Hud.Inventory.GetSnoItem(sno); if (item == null) { continue; } var brush = item.SetItemBonusesSno == uint.MaxValue ? LegendaryBackgroundBrush : SetBackgroundBrush; brush.DrawRectangle(x, y, StandardIconSize, StandardIconSize); var texture = Hud.Texture.GetItemTexture(item); if (texture != null) { texture.Draw(x, y, StandardIconSize, StandardIconSize); } else { BackgroundBrush.DrawRectangle(x, y, StandardIconSize, StandardIconSize); } if (Hud.Window.CursorInsideRect(x, y, StandardIconSize, StandardIconSize)) { Hud.Render.SetHint(item.NameEnglish + " : " + item.Sno + " : i" + item.Level + " : " + item.SetItemBonusesSno); } x += StandardIconSize + StandardIconSpacing; } }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (Visible != null) { hashCode = hashCode * 59 + Visible.GetHashCode(); } if (ShowLegend != null) { hashCode = hashCode * 59 + ShowLegend.GetHashCode(); } if (LegendGroup != null) { hashCode = hashCode * 59 + LegendGroup.GetHashCode(); } if (Opacity != null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (UId != null) { hashCode = hashCode * 59 + UId.GetHashCode(); } if (Ids != null) { hashCode = hashCode * 59 + Ids.GetHashCode(); } if (CustomData != null) { hashCode = hashCode * 59 + CustomData.GetHashCode(); } if (Meta != null) { hashCode = hashCode * 59 + Meta.GetHashCode(); } if (MetaArray != null) { hashCode = hashCode * 59 + MetaArray.GetHashCode(); } if (HoverLabel != null) { hashCode = hashCode * 59 + HoverLabel.GetHashCode(); } if (Stream != null) { hashCode = hashCode * 59 + Stream.GetHashCode(); } if (Transforms != null) { hashCode = hashCode * 59 + Transforms.GetHashCode(); } if (UiRevision != null) { hashCode = hashCode * 59 + UiRevision.GetHashCode(); } if (Labels != null) { hashCode = hashCode * 59 + Labels.GetHashCode(); } if (Label0 != null) { hashCode = hashCode * 59 + Label0.GetHashCode(); } if (DLabel != null) { hashCode = hashCode * 59 + DLabel.GetHashCode(); } if (Values != null) { hashCode = hashCode * 59 + Values.GetHashCode(); } if (Marker != null) { hashCode = hashCode * 59 + Marker.GetHashCode(); } if (Text != null) { hashCode = hashCode * 59 + Text.GetHashCode(); } if (HoverText != null) { hashCode = hashCode * 59 + HoverText.GetHashCode(); } if (HoverTextArray != null) { hashCode = hashCode * 59 + HoverTextArray.GetHashCode(); } if (ScaleGroup != null) { hashCode = hashCode * 59 + ScaleGroup.GetHashCode(); } if (TextInfo != null) { hashCode = hashCode * 59 + TextInfo.GetHashCode(); } if (TextTemplate != null) { hashCode = hashCode * 59 + TextTemplate.GetHashCode(); } if (TextTemplateArray != null) { hashCode = hashCode * 59 + TextTemplateArray.GetHashCode(); } if (HoverInfo != null) { hashCode = hashCode * 59 + HoverInfo.GetHashCode(); } if (HoverInfoArray != null) { hashCode = hashCode * 59 + HoverInfoArray.GetHashCode(); } if (HoverTemplate != null) { hashCode = hashCode * 59 + HoverTemplate.GetHashCode(); } if (HoverTemplateArray != null) { hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode(); } if (TextPosition != null) { hashCode = hashCode * 59 + TextPosition.GetHashCode(); } if (TextPositionArray != null) { hashCode = hashCode * 59 + TextPositionArray.GetHashCode(); } if (TextFont != null) { hashCode = hashCode * 59 + TextFont.GetHashCode(); } if (InsideTextFont != null) { hashCode = hashCode * 59 + InsideTextFont.GetHashCode(); } if (Title != null) { hashCode = hashCode * 59 + Title.GetHashCode(); } if (Domain != null) { hashCode = hashCode * 59 + Domain.GetHashCode(); } if (AspectRatio != null) { hashCode = hashCode * 59 + AspectRatio.GetHashCode(); } if (BaseRatio != null) { hashCode = hashCode * 59 + BaseRatio.GetHashCode(); } if (IdsSrc != null) { hashCode = hashCode * 59 + IdsSrc.GetHashCode(); } if (CustomDataSrc != null) { hashCode = hashCode * 59 + CustomDataSrc.GetHashCode(); } if (MetaSrc != null) { hashCode = hashCode * 59 + MetaSrc.GetHashCode(); } if (LabelsSrc != null) { hashCode = hashCode * 59 + LabelsSrc.GetHashCode(); } if (ValuesSrc != null) { hashCode = hashCode * 59 + ValuesSrc.GetHashCode(); } if (TextSrc != null) { hashCode = hashCode * 59 + TextSrc.GetHashCode(); } if (HoverTextSrc != null) { hashCode = hashCode * 59 + HoverTextSrc.GetHashCode(); } if (TextTemplateSrc != null) { hashCode = hashCode * 59 + TextTemplateSrc.GetHashCode(); } if (HoverInfoSrc != null) { hashCode = hashCode * 59 + HoverInfoSrc.GetHashCode(); } if (HoverTemplateSrc != null) { hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode(); } if (TextPositionSrc != null) { hashCode = hashCode * 59 + TextPositionSrc.GetHashCode(); } return(hashCode); } }
public void PaintTopInGame(ClipState clipState) { if (clipState != ClipState.AfterClip) { return; } if (!uiInventory.Visible) { return; } //GreyBrush.DrawRectangle(0, 0, Hud.Window.Size.Width, Hud.Window.Size.Height); if (items == null) { items = Hud.Game.Items.Where(i => i.Location >= ItemLocation.Head && i.Location <= ItemLocation.Neck); } // TODO : there is probably a better way to cache this, but i'm not able to detect stats reroll with enchantress attributes = items.SelectMany(i => i.Perfections).Select(p => p.Attribute.Code).Distinct(); var topOffset = 30f; var yOffset = 15f; var _columnHeaderWidth = columnHeaderWidth(); var x = uiInventory.Rectangle.Left; var y = topOffset + _columnHeaderWidth * 2; foreach (var item in items) { var rect = Hud.Inventory.GetItemRect(item); if (rect == RectangleF.Empty) { continue; } var text = string.Format("{0:0.#} %", item.Perfection); var layout = TextFont.GetTextLayout(text); var brushIndex = (int)Math.Round(item.Perfection / 100 * (float)(gradientBrushes.Count - 1)); if (brushIndex >= 0 && brushIndex < gradientBrushes.Count) { gradientBrushes[brushIndex].DrawRectangle(rect.X, rect.Y - layout.Metrics.Height, _columnHeaderWidth, layout.Metrics.Height); } TextFont.DrawText(layout, rect.X + _columnHeaderWidth / 2 - layout.Metrics.Width / 2, rect.Y - layout.Metrics.Height); } //DrawHeaderLine(x, topOffset, _columnHeaderWidth, items); //y += DrawStatBlock(primaryDamageAttributes, y, x, _columnHeaderWidth); //y += yOffset; //y += DrawStatBlock(ehpAttributes, y, x, _columnHeaderWidth); //y += yOffset; //y += DrawStatBlock(secondaryAttributes, y, x, _columnHeaderWidth); //y += yOffset; //y += DrawStatBlock(powersAttributes, y, x, _columnHeaderWidth); //y += yOffset; //// TODO : remove this, only useful while debugging to find missing stats //foreach (var attributeCode in attributes) //{ // if (primaryDamageAttributes.Contains(attributeCode)) continue; // if (ehpAttributes.Contains(attributeCode)) continue; // if (secondaryAttributes.Contains(attributeCode)) continue; // if (powersAttributes.Contains(attributeCode)) continue; // y += DrawStatLine(attributeCode, x, y, _columnHeaderWidth); //} }
public override Point GetPreferredSize(Point availableSpace) { var textSize = Vector2.Ceiling(TextFont.MeasureString(Text)).ToPoint(); return(new Point(textSize.X + Padding.Horizontal, textSize.Y + Padding.Vertical)); }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (Visible != null) { hashCode = hashCode * 59 + Visible.GetHashCode(); } if (ShowLegend != null) { hashCode = hashCode * 59 + ShowLegend.GetHashCode(); } if (LegendGroup != null) { hashCode = hashCode * 59 + LegendGroup.GetHashCode(); } if (Opacity != null) { hashCode = hashCode * 59 + Opacity.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (UId != null) { hashCode = hashCode * 59 + UId.GetHashCode(); } if (Ids != null) { hashCode = hashCode * 59 + Ids.GetHashCode(); } if (CustomData != null) { hashCode = hashCode * 59 + CustomData.GetHashCode(); } if (Meta != null) { hashCode = hashCode * 59 + Meta.GetHashCode(); } if (MetaArray != null) { hashCode = hashCode * 59 + MetaArray.GetHashCode(); } if (SelectedPoints != null) { hashCode = hashCode * 59 + SelectedPoints.GetHashCode(); } if (HoverLabel != null) { hashCode = hashCode * 59 + HoverLabel.GetHashCode(); } if (Stream != null) { hashCode = hashCode * 59 + Stream.GetHashCode(); } if (Transforms != null) { hashCode = hashCode * 59 + Transforms.GetHashCode(); } if (UiRevision != null) { hashCode = hashCode * 59 + UiRevision.GetHashCode(); } if (Mode != null) { hashCode = hashCode * 59 + Mode.GetHashCode(); } if (R != null) { hashCode = hashCode * 59 + R.GetHashCode(); } if (Theta != null) { hashCode = hashCode * 59 + Theta.GetHashCode(); } if (R0 != null) { hashCode = hashCode * 59 + R0.GetHashCode(); } if (Dr != null) { hashCode = hashCode * 59 + Dr.GetHashCode(); } if (Theta0 != null) { hashCode = hashCode * 59 + Theta0.GetHashCode(); } if (DTheta != null) { hashCode = hashCode * 59 + DTheta.GetHashCode(); } if (ThetaUnit != null) { hashCode = hashCode * 59 + ThetaUnit.GetHashCode(); } if (Text != null) { hashCode = hashCode * 59 + Text.GetHashCode(); } if (TextArray != null) { hashCode = hashCode * 59 + TextArray.GetHashCode(); } if (TextTemplate != null) { hashCode = hashCode * 59 + TextTemplate.GetHashCode(); } if (TextTemplateArray != null) { hashCode = hashCode * 59 + TextTemplateArray.GetHashCode(); } if (HoverText != null) { hashCode = hashCode * 59 + HoverText.GetHashCode(); } if (HoverTextArray != null) { hashCode = hashCode * 59 + HoverTextArray.GetHashCode(); } if (Line != null) { hashCode = hashCode * 59 + Line.GetHashCode(); } if (ConnectGaps != null) { hashCode = hashCode * 59 + ConnectGaps.GetHashCode(); } if (Marker != null) { hashCode = hashCode * 59 + Marker.GetHashCode(); } if (ClipOnAxis != null) { hashCode = hashCode * 59 + ClipOnAxis.GetHashCode(); } if (TextPosition != null) { hashCode = hashCode * 59 + TextPosition.GetHashCode(); } if (TextPositionArray != null) { hashCode = hashCode * 59 + TextPositionArray.GetHashCode(); } if (TextFont != null) { hashCode = hashCode * 59 + TextFont.GetHashCode(); } if (Fill != null) { hashCode = hashCode * 59 + Fill.GetHashCode(); } if (FillColor != null) { hashCode = hashCode * 59 + FillColor.GetHashCode(); } if (HoverInfo != null) { hashCode = hashCode * 59 + HoverInfo.GetHashCode(); } if (HoverInfoArray != null) { hashCode = hashCode * 59 + HoverInfoArray.GetHashCode(); } if (HoverOn != null) { hashCode = hashCode * 59 + HoverOn.GetHashCode(); } if (HoverTemplate != null) { hashCode = hashCode * 59 + HoverTemplate.GetHashCode(); } if (HoverTemplateArray != null) { hashCode = hashCode * 59 + HoverTemplateArray.GetHashCode(); } if (Selected != null) { hashCode = hashCode * 59 + Selected.GetHashCode(); } if (Unselected != null) { hashCode = hashCode * 59 + Unselected.GetHashCode(); } if (Subplot != null) { hashCode = hashCode * 59 + Subplot.GetHashCode(); } if (IdsSrc != null) { hashCode = hashCode * 59 + IdsSrc.GetHashCode(); } if (CustomDataSrc != null) { hashCode = hashCode * 59 + CustomDataSrc.GetHashCode(); } if (MetaSrc != null) { hashCode = hashCode * 59 + MetaSrc.GetHashCode(); } if (RSrc != null) { hashCode = hashCode * 59 + RSrc.GetHashCode(); } if (ThetaSrc != null) { hashCode = hashCode * 59 + ThetaSrc.GetHashCode(); } if (TextSrc != null) { hashCode = hashCode * 59 + TextSrc.GetHashCode(); } if (TextTemplateSrc != null) { hashCode = hashCode * 59 + TextTemplateSrc.GetHashCode(); } if (HoverTextSrc != null) { hashCode = hashCode * 59 + HoverTextSrc.GetHashCode(); } if (TextPositionSrc != null) { hashCode = hashCode * 59 + TextPositionSrc.GetHashCode(); } if (HoverInfoSrc != null) { hashCode = hashCode * 59 + HoverInfoSrc.GetHashCode(); } if (HoverTemplateSrc != null) { hashCode = hashCode * 59 + HoverTemplateSrc.GetHashCode(); } return(hashCode); } }
public bool Equals([AllowNull] Symbol other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Icon == other.Icon && Icon != null && other.Icon != null && Icon.Equals(other.Icon)) && (IconSize == other.IconSize && IconSize != null && other.IconSize != null && IconSize.Equals(other.IconSize)) && (Text == other.Text && Text != null && other.Text != null && Text.Equals(other.Text)) && (Placement == other.Placement && Placement != null && other.Placement != null && Placement.Equals(other.Placement)) && (TextFont == other.TextFont && TextFont != null && other.TextFont != null && TextFont.Equals(other.TextFont)) && (TextPosition == other.TextPosition && TextPosition != null && other.TextPosition != null && TextPosition.Equals(other.TextPosition))); }
/// <inheritdoc /> public bool Equals([AllowNull] ScatterGeo other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( Visible == other.Visible || Visible != null && Visible.Equals(other.Visible) ) && ( ShowLegend == other.ShowLegend || ShowLegend != null && ShowLegend.Equals(other.ShowLegend) ) && ( LegendGroup == other.LegendGroup || LegendGroup != null && LegendGroup.Equals(other.LegendGroup) ) && ( Opacity == other.Opacity || Opacity != null && Opacity.Equals(other.Opacity) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( UId == other.UId || UId != null && UId.Equals(other.UId) ) && ( Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids) ) && ( Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData) ) && ( Meta == other.Meta || Meta != null && Meta.Equals(other.Meta) ) && ( Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray) ) && ( SelectedPoints == other.SelectedPoints || SelectedPoints != null && SelectedPoints.Equals(other.SelectedPoints) ) && ( HoverLabel == other.HoverLabel || HoverLabel != null && HoverLabel.Equals(other.HoverLabel) ) && ( Stream == other.Stream || Stream != null && Stream.Equals(other.Stream) ) && ( Equals(Transforms, other.Transforms) || Transforms != null && other.Transforms != null && Transforms.SequenceEqual(other.Transforms) ) && ( UiRevision == other.UiRevision || UiRevision != null && UiRevision.Equals(other.UiRevision) ) && ( Equals(Lon, other.Lon) || Lon != null && other.Lon != null && Lon.SequenceEqual(other.Lon) ) && ( Equals(Lat, other.Lat) || Lat != null && other.Lat != null && Lat.SequenceEqual(other.Lat) ) && ( Equals(Locations, other.Locations) || Locations != null && other.Locations != null && Locations.SequenceEqual(other.Locations) ) && ( LocationMode == other.LocationMode || LocationMode != null && LocationMode.Equals(other.LocationMode) ) && ( GeoJson == other.GeoJson || GeoJson != null && GeoJson.Equals(other.GeoJson) ) && ( FeatureIdKey == other.FeatureIdKey || FeatureIdKey != null && FeatureIdKey.Equals(other.FeatureIdKey) ) && ( Mode == other.Mode || Mode != null && Mode.Equals(other.Mode) ) && ( Text == other.Text || Text != null && Text.Equals(other.Text) ) && ( Equals(TextArray, other.TextArray) || TextArray != null && other.TextArray != null && TextArray.SequenceEqual(other.TextArray) ) && ( TextTemplate == other.TextTemplate || TextTemplate != null && TextTemplate.Equals(other.TextTemplate) ) && ( Equals(TextTemplateArray, other.TextTemplateArray) || TextTemplateArray != null && other.TextTemplateArray != null && TextTemplateArray.SequenceEqual(other.TextTemplateArray) ) && ( HoverText == other.HoverText || HoverText != null && HoverText.Equals(other.HoverText) ) && ( Equals(HoverTextArray, other.HoverTextArray) || HoverTextArray != null && other.HoverTextArray != null && HoverTextArray.SequenceEqual(other.HoverTextArray) ) && ( TextFont == other.TextFont || TextFont != null && TextFont.Equals(other.TextFont) ) && ( TextPosition == other.TextPosition || TextPosition != null && TextPosition.Equals(other.TextPosition) ) && ( Equals(TextPositionArray, other.TextPositionArray) || TextPositionArray != null && other.TextPositionArray != null && TextPositionArray.SequenceEqual(other.TextPositionArray) ) && ( Line == other.Line || Line != null && Line.Equals(other.Line) ) && ( ConnectGaps == other.ConnectGaps || ConnectGaps != null && ConnectGaps.Equals(other.ConnectGaps) ) && ( Marker == other.Marker || Marker != null && Marker.Equals(other.Marker) ) && ( Fill == other.Fill || Fill != null && Fill.Equals(other.Fill) ) && ( FillColor == other.FillColor || FillColor != null && FillColor.Equals(other.FillColor) ) && ( Selected == other.Selected || Selected != null && Selected.Equals(other.Selected) ) && ( Unselected == other.Unselected || Unselected != null && Unselected.Equals(other.Unselected) ) && ( HoverInfo == other.HoverInfo || HoverInfo != null && HoverInfo.Equals(other.HoverInfo) ) && ( Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray) ) && ( HoverTemplate == other.HoverTemplate || HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate) ) && ( Equals(HoverTemplateArray, other.HoverTemplateArray) || HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray) ) && ( Geo == other.Geo || Geo != null && Geo.Equals(other.Geo) ) && ( IdsSrc == other.IdsSrc || IdsSrc != null && IdsSrc.Equals(other.IdsSrc) ) && ( CustomDataSrc == other.CustomDataSrc || CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc) ) && ( MetaSrc == other.MetaSrc || MetaSrc != null && MetaSrc.Equals(other.MetaSrc) ) && ( LonSrc == other.LonSrc || LonSrc != null && LonSrc.Equals(other.LonSrc) ) && ( LatSrc == other.LatSrc || LatSrc != null && LatSrc.Equals(other.LatSrc) ) && ( LocationsSrc == other.LocationsSrc || LocationsSrc != null && LocationsSrc.Equals(other.LocationsSrc) ) && ( TextSrc == other.TextSrc || TextSrc != null && TextSrc.Equals(other.TextSrc) ) && ( TextTemplateSrc == other.TextTemplateSrc || TextTemplateSrc != null && TextTemplateSrc.Equals(other.TextTemplateSrc) ) && ( HoverTextSrc == other.HoverTextSrc || HoverTextSrc != null && HoverTextSrc.Equals(other.HoverTextSrc) ) && ( TextPositionSrc == other.TextPositionSrc || TextPositionSrc != null && TextPositionSrc.Equals(other.TextPositionSrc) ) && ( HoverInfoSrc == other.HoverInfoSrc || HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc) ) && ( HoverTemplateSrc == other.HoverTemplateSrc || HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc) )); }
/// <inheritdoc /> public bool Equals([AllowNull] Sankey other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( Visible == other.Visible || Visible != null && Visible.Equals(other.Visible) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( UId == other.UId || UId != null && UId.Equals(other.UId) ) && ( Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids) ) && ( Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData) ) && ( Meta == other.Meta || Meta != null && Meta.Equals(other.Meta) ) && ( Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray) ) && ( SelectedPoints == other.SelectedPoints || SelectedPoints != null && SelectedPoints.Equals(other.SelectedPoints) ) && ( Stream == other.Stream || Stream != null && Stream.Equals(other.Stream) ) && ( UiRevision == other.UiRevision || UiRevision != null && UiRevision.Equals(other.UiRevision) ) && ( HoverInfo == other.HoverInfo || HoverInfo != null && HoverInfo.Equals(other.HoverInfo) ) && ( HoverLabel == other.HoverLabel || HoverLabel != null && HoverLabel.Equals(other.HoverLabel) ) && ( Domain == other.Domain || Domain != null && Domain.Equals(other.Domain) ) && ( Orientation == other.Orientation || Orientation != null && Orientation.Equals(other.Orientation) ) && ( ValueFormat == other.ValueFormat || ValueFormat != null && ValueFormat.Equals(other.ValueFormat) ) && ( ValueSuffix == other.ValueSuffix || ValueSuffix != null && ValueSuffix.Equals(other.ValueSuffix) ) && ( Arrangement == other.Arrangement || Arrangement != null && Arrangement.Equals(other.Arrangement) ) && ( TextFont == other.TextFont || TextFont != null && TextFont.Equals(other.TextFont) ) && ( Node == other.Node || Node != null && Node.Equals(other.Node) ) && ( Link == other.Link || Link != null && Link.Equals(other.Link) ) && ( IdsSrc == other.IdsSrc || IdsSrc != null && IdsSrc.Equals(other.IdsSrc) ) && ( CustomDataSrc == other.CustomDataSrc || CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc) ) && ( MetaSrc == other.MetaSrc || MetaSrc != null && MetaSrc.Equals(other.MetaSrc) )); }
/// <inheritdoc /> public bool Equals([AllowNull] Sunburst other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( Visible == other.Visible || Visible != null && Visible.Equals(other.Visible) ) && ( Opacity == other.Opacity || Opacity != null && Opacity.Equals(other.Opacity) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( UId == other.UId || UId != null && UId.Equals(other.UId) ) && ( Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids) ) && ( Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData) ) && ( Meta == other.Meta || Meta != null && Meta.Equals(other.Meta) ) && ( Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray) ) && ( HoverLabel == other.HoverLabel || HoverLabel != null && HoverLabel.Equals(other.HoverLabel) ) && ( Stream == other.Stream || Stream != null && Stream.Equals(other.Stream) ) && ( Equals(Transforms, other.Transforms) || Transforms != null && other.Transforms != null && Transforms.SequenceEqual(other.Transforms) ) && ( UiRevision == other.UiRevision || UiRevision != null && UiRevision.Equals(other.UiRevision) ) && ( Equals(Labels, other.Labels) || Labels != null && other.Labels != null && Labels.SequenceEqual(other.Labels) ) && ( Equals(Parents, other.Parents) || Parents != null && other.Parents != null && Parents.SequenceEqual(other.Parents) ) && ( Equals(Values, other.Values) || Values != null && other.Values != null && Values.SequenceEqual(other.Values) ) && ( BranchValues == other.BranchValues || BranchValues != null && BranchValues.Equals(other.BranchValues) ) && ( Count == other.Count || Count != null && Count.Equals(other.Count) ) && ( Level == other.Level || Level != null && Level.Equals(other.Level) ) && ( MaxDepth == other.MaxDepth || MaxDepth != null && MaxDepth.Equals(other.MaxDepth) ) && ( Marker == other.Marker || Marker != null && Marker.Equals(other.Marker) ) && ( Leaf == other.Leaf || Leaf != null && Leaf.Equals(other.Leaf) ) && ( Equals(Text, other.Text) || Text != null && other.Text != null && Text.SequenceEqual(other.Text) ) && ( TextInfo == other.TextInfo || TextInfo != null && TextInfo.Equals(other.TextInfo) ) && ( TextTemplate == other.TextTemplate || TextTemplate != null && TextTemplate.Equals(other.TextTemplate) ) && ( Equals(TextTemplateArray, other.TextTemplateArray) || TextTemplateArray != null && other.TextTemplateArray != null && TextTemplateArray.SequenceEqual(other.TextTemplateArray) ) && ( HoverText == other.HoverText || HoverText != null && HoverText.Equals(other.HoverText) ) && ( Equals(HoverTextArray, other.HoverTextArray) || HoverTextArray != null && other.HoverTextArray != null && HoverTextArray.SequenceEqual(other.HoverTextArray) ) && ( HoverInfo == other.HoverInfo || HoverInfo != null && HoverInfo.Equals(other.HoverInfo) ) && ( Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray) ) && ( HoverTemplate == other.HoverTemplate || HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate) ) && ( Equals(HoverTemplateArray, other.HoverTemplateArray) || HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray) ) && ( TextFont == other.TextFont || TextFont != null && TextFont.Equals(other.TextFont) ) && ( InsideTextOrientation == other.InsideTextOrientation || InsideTextOrientation != null && InsideTextOrientation.Equals(other.InsideTextOrientation) ) && ( InsideTextFont == other.InsideTextFont || InsideTextFont != null && InsideTextFont.Equals(other.InsideTextFont) ) && ( OutsideTextFont == other.OutsideTextFont || OutsideTextFont != null && OutsideTextFont.Equals(other.OutsideTextFont) ) && ( Domain == other.Domain || Domain != null && Domain.Equals(other.Domain) ) && ( IdsSrc == other.IdsSrc || IdsSrc != null && IdsSrc.Equals(other.IdsSrc) ) && ( CustomDataSrc == other.CustomDataSrc || CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc) ) && ( MetaSrc == other.MetaSrc || MetaSrc != null && MetaSrc.Equals(other.MetaSrc) ) && ( LabelsSrc == other.LabelsSrc || LabelsSrc != null && LabelsSrc.Equals(other.LabelsSrc) ) && ( ParentsSrc == other.ParentsSrc || ParentsSrc != null && ParentsSrc.Equals(other.ParentsSrc) ) && ( ValuesSrc == other.ValuesSrc || ValuesSrc != null && ValuesSrc.Equals(other.ValuesSrc) ) && ( TextSrc == other.TextSrc || TextSrc != null && TextSrc.Equals(other.TextSrc) ) && ( TextTemplateSrc == other.TextTemplateSrc || TextTemplateSrc != null && TextTemplateSrc.Equals(other.TextTemplateSrc) ) && ( HoverTextSrc == other.HoverTextSrc || HoverTextSrc != null && HoverTextSrc.Equals(other.HoverTextSrc) ) && ( HoverInfoSrc == other.HoverInfoSrc || HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc) ) && ( HoverTemplateSrc == other.HoverTemplateSrc || HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc) )); }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Type != null) { hashCode = hashCode * 59 + Type.GetHashCode(); } if (Visible != null) { hashCode = hashCode * 59 + Visible.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (UId != null) { hashCode = hashCode * 59 + UId.GetHashCode(); } if (Ids != null) { hashCode = hashCode * 59 + Ids.GetHashCode(); } if (CustomData != null) { hashCode = hashCode * 59 + CustomData.GetHashCode(); } if (Meta != null) { hashCode = hashCode * 59 + Meta.GetHashCode(); } if (MetaArray != null) { hashCode = hashCode * 59 + MetaArray.GetHashCode(); } if (SelectedPoints != null) { hashCode = hashCode * 59 + SelectedPoints.GetHashCode(); } if (Stream != null) { hashCode = hashCode * 59 + Stream.GetHashCode(); } if (UiRevision != null) { hashCode = hashCode * 59 + UiRevision.GetHashCode(); } if (HoverInfo != null) { hashCode = hashCode * 59 + HoverInfo.GetHashCode(); } if (HoverLabel != null) { hashCode = hashCode * 59 + HoverLabel.GetHashCode(); } if (Domain != null) { hashCode = hashCode * 59 + Domain.GetHashCode(); } if (Orientation != null) { hashCode = hashCode * 59 + Orientation.GetHashCode(); } if (ValueFormat != null) { hashCode = hashCode * 59 + ValueFormat.GetHashCode(); } if (ValueSuffix != null) { hashCode = hashCode * 59 + ValueSuffix.GetHashCode(); } if (Arrangement != null) { hashCode = hashCode * 59 + Arrangement.GetHashCode(); } if (TextFont != null) { hashCode = hashCode * 59 + TextFont.GetHashCode(); } if (Node != null) { hashCode = hashCode * 59 + Node.GetHashCode(); } if (Link != null) { hashCode = hashCode * 59 + Link.GetHashCode(); } if (IdsSrc != null) { hashCode = hashCode * 59 + IdsSrc.GetHashCode(); } if (CustomDataSrc != null) { hashCode = hashCode * 59 + CustomDataSrc.GetHashCode(); } if (MetaSrc != null) { hashCode = hashCode * 59 + MetaSrc.GetHashCode(); } return(hashCode); } }
public void PaintWorld(WorldLayer layer) { var monsters = Hud.Game.AliveMonsters; Dictionary <IMonster, string> eliteGroup = new Dictionary <IMonster, string>(); foreach (var monster in monsters) { if (monster.Rarity == ActorRarity.Champion || monster.Rarity == ActorRarity.Rare) { if (eliteGroup.ContainsKey(monster)) { eliteGroup[monster] = monster.SnoMonster.Priority.ToString() + monster.SnoMonster.Sno + monster.SnoMonster.NameEnglish + String.Join(", ", monster.AffixSnoList); } else { eliteGroup.Add(monster, monster.SnoMonster.Priority.ToString() + monster.SnoMonster.Sno + monster.SnoMonster.NameEnglish + String.Join(", ", monster.AffixSnoList)); } } } Dictionary <IMonster, string> eliteGroup1 = eliteGroup.OrderBy(p => p.Value).ToDictionary(p => p.Key, o => o.Value); var px = Hud.Window.Size.Width * 0.00125f; var py = Hud.Window.Size.Height * 0.001667f; var h = py * 5; var w2 = py * 50; var count = 0; string preStr = null; //remove clone foreach (var elite in eliteGroup1) { if (elite.Key.Illusion) { continue; } if (elite.Key.Rarity == ActorRarity.Champion) { var x = Hud.Window.Size.Width * 0.125f; var w = elite.Key.CurHealth * w2 / elite.Key.MaxHealth; var affixlist = ""; foreach (var Affix in elite.Key.AffixSnoList) { affixlist = affixlist + " " + Affix.NameLocalized; } var text = (elite.Key.CurHealth * 100 / elite.Key.MaxHealth).ToString("f1") + "% " + elite.Key.SnoMonster.NameLocalized + affixlist; var layout = TextFont.GetTextLayout(text); if (preStr != elite.Value || preStr == null) { count++; } var y = py * 8 * count; if (elite.Key.Invulnerable) { BorderBrush.DrawRectangle(x, y, w2, h); } BackgroundBrush.DrawRectangle(x, y, w2, h); TextFont.DrawText(layout, x + px + w2, y - py); ChampionBrush.DrawRectangle(x, y, (float)w, h); preStr = elite.Value; count++; } if (elite.Key.Rarity == ActorRarity.Rare) { var x = Hud.Window.Size.Width * 0.125f; var w = elite.Key.CurHealth * w2 / elite.Key.MaxHealth; var affixlist = ""; foreach (var Affix in elite.Key.AffixSnoList) { affixlist = affixlist + " " + Affix.NameLocalized; } var text = (elite.Key.CurHealth * 100 / elite.Key.MaxHealth).ToString("f1") + "% " + elite.Key.SnoMonster.NameLocalized + affixlist; var layout = TextFont.GetTextLayout(text); if (preStr != elite.Value || preStr == null) { count++; } var y = py * 8 * count; if (elite.Key.Invulnerable) { BorderBrush.DrawRectangle(x, y, w2, h); } BackgroundBrush.DrawRectangle(x, y, w2, h); TextFont.DrawText(layout, x + px + w2, y - py); RareBrush.DrawRectangle(x, y, (float)w, h); preStr = elite.Value; count++; } } eliteGroup.Clear(); eliteGroup1.Clear(); }
/// <inheritdoc /> public bool Equals([AllowNull] ScatterTernary other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( Visible == other.Visible || Visible != null && Visible.Equals(other.Visible) ) && ( ShowLegend == other.ShowLegend || ShowLegend != null && ShowLegend.Equals(other.ShowLegend) ) && ( LegendGroup == other.LegendGroup || LegendGroup != null && LegendGroup.Equals(other.LegendGroup) ) && ( Opacity == other.Opacity || Opacity != null && Opacity.Equals(other.Opacity) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( UId == other.UId || UId != null && UId.Equals(other.UId) ) && ( Equals(Ids, other.Ids) || Ids != null && other.Ids != null && Ids.SequenceEqual(other.Ids) ) && ( Equals(CustomData, other.CustomData) || CustomData != null && other.CustomData != null && CustomData.SequenceEqual(other.CustomData) ) && ( Meta == other.Meta || Meta != null && Meta.Equals(other.Meta) ) && ( Equals(MetaArray, other.MetaArray) || MetaArray != null && other.MetaArray != null && MetaArray.SequenceEqual(other.MetaArray) ) && ( SelectedPoints == other.SelectedPoints || SelectedPoints != null && SelectedPoints.Equals(other.SelectedPoints) ) && ( HoverLabel == other.HoverLabel || HoverLabel != null && HoverLabel.Equals(other.HoverLabel) ) && ( Stream == other.Stream || Stream != null && Stream.Equals(other.Stream) ) && ( Equals(Transforms, other.Transforms) || Transforms != null && other.Transforms != null && Transforms.SequenceEqual(other.Transforms) ) && ( UiRevision == other.UiRevision || UiRevision != null && UiRevision.Equals(other.UiRevision) ) && ( Equals(A, other.A) || A != null && other.A != null && A.SequenceEqual(other.A) ) && ( Equals(B, other.B) || B != null && other.B != null && B.SequenceEqual(other.B) ) && ( Equals(C, other.C) || C != null && other.C != null && C.SequenceEqual(other.C) ) && ( Sum == other.Sum || Sum != null && Sum.Equals(other.Sum) ) && ( Mode == other.Mode || Mode != null && Mode.Equals(other.Mode) ) && ( Text == other.Text || Text != null && Text.Equals(other.Text) ) && ( Equals(TextArray, other.TextArray) || TextArray != null && other.TextArray != null && TextArray.SequenceEqual(other.TextArray) ) && ( TextTemplate == other.TextTemplate || TextTemplate != null && TextTemplate.Equals(other.TextTemplate) ) && ( Equals(TextTemplateArray, other.TextTemplateArray) || TextTemplateArray != null && other.TextTemplateArray != null && TextTemplateArray.SequenceEqual(other.TextTemplateArray) ) && ( HoverText == other.HoverText || HoverText != null && HoverText.Equals(other.HoverText) ) && ( Equals(HoverTextArray, other.HoverTextArray) || HoverTextArray != null && other.HoverTextArray != null && HoverTextArray.SequenceEqual(other.HoverTextArray) ) && ( Line == other.Line || Line != null && Line.Equals(other.Line) ) && ( ConnectGaps == other.ConnectGaps || ConnectGaps != null && ConnectGaps.Equals(other.ConnectGaps) ) && ( ClipOnAxis == other.ClipOnAxis || ClipOnAxis != null && ClipOnAxis.Equals(other.ClipOnAxis) ) && ( Fill == other.Fill || Fill != null && Fill.Equals(other.Fill) ) && ( FillColor == other.FillColor || FillColor != null && FillColor.Equals(other.FillColor) ) && ( Marker == other.Marker || Marker != null && Marker.Equals(other.Marker) ) && ( TextFont == other.TextFont || TextFont != null && TextFont.Equals(other.TextFont) ) && ( TextPosition == other.TextPosition || TextPosition != null && TextPosition.Equals(other.TextPosition) ) && ( Equals(TextPositionArray, other.TextPositionArray) || TextPositionArray != null && other.TextPositionArray != null && TextPositionArray.SequenceEqual(other.TextPositionArray) ) && ( Selected == other.Selected || Selected != null && Selected.Equals(other.Selected) ) && ( Unselected == other.Unselected || Unselected != null && Unselected.Equals(other.Unselected) ) && ( HoverInfo == other.HoverInfo || HoverInfo != null && HoverInfo.Equals(other.HoverInfo) ) && ( Equals(HoverInfoArray, other.HoverInfoArray) || HoverInfoArray != null && other.HoverInfoArray != null && HoverInfoArray.SequenceEqual(other.HoverInfoArray) ) && ( HoverOn == other.HoverOn || HoverOn != null && HoverOn.Equals(other.HoverOn) ) && ( HoverTemplate == other.HoverTemplate || HoverTemplate != null && HoverTemplate.Equals(other.HoverTemplate) ) && ( Equals(HoverTemplateArray, other.HoverTemplateArray) || HoverTemplateArray != null && other.HoverTemplateArray != null && HoverTemplateArray.SequenceEqual(other.HoverTemplateArray) ) && ( Subplot == other.Subplot || Subplot != null && Subplot.Equals(other.Subplot) ) && ( IdsSrc == other.IdsSrc || IdsSrc != null && IdsSrc.Equals(other.IdsSrc) ) && ( CustomDataSrc == other.CustomDataSrc || CustomDataSrc != null && CustomDataSrc.Equals(other.CustomDataSrc) ) && ( MetaSrc == other.MetaSrc || MetaSrc != null && MetaSrc.Equals(other.MetaSrc) ) && ( ASrc == other.ASrc || ASrc != null && ASrc.Equals(other.ASrc) ) && ( BSrc == other.BSrc || BSrc != null && BSrc.Equals(other.BSrc) ) && ( CSrc == other.CSrc || CSrc != null && CSrc.Equals(other.CSrc) ) && ( TextSrc == other.TextSrc || TextSrc != null && TextSrc.Equals(other.TextSrc) ) && ( TextTemplateSrc == other.TextTemplateSrc || TextTemplateSrc != null && TextTemplateSrc.Equals(other.TextTemplateSrc) ) && ( HoverTextSrc == other.HoverTextSrc || HoverTextSrc != null && HoverTextSrc.Equals(other.HoverTextSrc) ) && ( TextPositionSrc == other.TextPositionSrc || TextPositionSrc != null && TextPositionSrc.Equals(other.TextPositionSrc) ) && ( HoverInfoSrc == other.HoverInfoSrc || HoverInfoSrc != null && HoverInfoSrc.Equals(other.HoverInfoSrc) ) && ( HoverTemplateSrc == other.HoverTemplateSrc || HoverTemplateSrc != null && HoverTemplateSrc.Equals(other.HoverTemplateSrc) )); }
public ToolboxButtonShape(Canvas canvas) : base(canvas) { TextFont.Dispose(); TextFont = new Font(FontFamily.GenericSansSerif, 8); }
protected SizeF Size(Graphics g) { using (Font f = TextFont.CreateFont()) return(g.MeasureString(text, f)); }
public void PaintWorld(WorldLayer layer) { var w1 = Hud.Window.Size.Width * 0.00333f * b; var textLocust = "虫群"; //"L" var layoutLocust = TextFontLocust.GetTextLayout(textLocust); var textHaunt = "蚀魂"; //"H" var layoutHaunt = TextFontHaunt.GetTextLayout(textHaunt); var h2 = Hud.Window.Size.Height * 0.017f; var x2 = Hud.Window.Size.Width * 0.001667f * b; var x3 = Hud.Window.Size.Width * 0.02f; var monsters = Hud.Game.AliveMonsters; foreach (var monster in monsters) { bool illusionist = false; if (monster.SummonerAcdDynamicId == 0) { illusionist = false; } else { illusionist = true; } if (monster.Rarity == ActorRarity.Champion) { if (illusionist == false) { var hptext = (monster.CurHealth * 100 / monster.MaxHealth).ToString("f0") + "%"; var layout = TextFont.GetTextLayout(hptext); var h = Hud.Window.Size.Height * 0.00034f * 35; var w = monster.CurHealth * w1 / monster.MaxHealth; var monsterX = monster.FloorCoordinate.ToScreenCoordinate().X; // - w1 / 2; var monsterY = monster.FloorCoordinate.ToScreenCoordinate().Y; // + py * 14; var locustX = monsterX + x3 * 0.1f; var hauntX = monsterX - x3; var buffY = monsterY - h2 * 2f; var hpX = monsterX - 1.5f; if (monster.Invulnerable) { BorderBrush.DrawRectangle(monsterX - x2, monsterY + h2, w1, h); } BackgroundBrush.DrawRectangle(monsterX - x2, monsterY + h2, w1, h); if (monster.Rarity == ActorRarity.Champion) { ChampionBrush.DrawRectangle(monsterX - x2, monsterY + h2, (float)w, h); } if (monster.Locust) { TextFontLocust.DrawText(layoutLocust, locustX, buffY); } if (monster.Haunted) { TextFontHaunt.DrawText(layoutHaunt, hauntX, buffY); } TextFont.DrawText(layout, hpX, monsterY + h2 / 1.2f); } } if (monster.Rarity == ActorRarity.Rare) { if (illusionist == false) { var hptext = (monster.CurHealth * 100 / monster.MaxHealth).ToString("f0") + "%"; var layout = TextFont.GetTextLayout(hptext); var h = Hud.Window.Size.Height * 0.00034f * 35; var w = monster.CurHealth * w1 / monster.MaxHealth; var monsterX = monster.FloorCoordinate.ToScreenCoordinate().X; // - w1 / 2; var monsterY = monster.FloorCoordinate.ToScreenCoordinate().Y; // + py * 14; var locustX = monsterX + x3 * 0.1f; var hauntX = monsterX - x3; var buffY = monsterY - h2 * 2f; var hpX = monsterX - 1.5f; if (monster.Invulnerable) { BorderBrush.DrawRectangle(monsterX - x2, monsterY + h2, w1, h); } BackgroundBrush.DrawRectangle(monsterX - x2, monsterY + h2, w1, h); if (monster.Rarity == ActorRarity.Rare) { RareBrush.DrawRectangle(monsterX - x2, monsterY + h2, (float)w, h); } if (monster.Locust) { TextFontLocust.DrawText(layoutLocust, locustX, buffY); } if (monster.Haunted) { TextFontHaunt.DrawText(layoutHaunt, hauntX, buffY); } TextFont.DrawText(layout, hpX, monsterY + h2 / 1.2f); } } } }
void FontColor_Closed(object sender, object e) { ForeFont = fs.getSelectFont(); //throw new NotImplementedException(); }