public void DrawPawnGUIOverlay() { if (this.pawn.Spawned && !this.pawn.Map.fogGrid.IsFogged(this.pawn.Position)) { if (!this.pawn.RaceProps.Humanlike) { AnimalNameDisplayMode animalNameMode = Prefs.AnimalNameMode; if (animalNameMode == AnimalNameDisplayMode.None) { return; } if (animalNameMode != AnimalNameDisplayMode.TameAll) { if (animalNameMode == AnimalNameDisplayMode.TameNamed) { if (this.pawn.Name == null || this.pawn.Name.Numerical) { return; } } } else if (this.pawn.Name == null) { return; } } Vector2 pos = GenMapUI.LabelDrawPosFor(this.pawn, -0.6f); GenMapUI.DrawPawnLabel(this.pawn, pos, 1f, 9999f, null, GameFont.Tiny, true, true); if (this.pawn.CanTradeNow) { this.pawn.Map.overlayDrawer.DrawOverlay(this.pawn, OverlayTypes.QuestionMark); } } }
public void DrawPawnGUIOverlay() { if (pawn.Spawned && !pawn.Map.fogGrid.IsFogged(pawn.Position)) { if (!pawn.RaceProps.Humanlike) { switch (Prefs.AnimalNameMode) { case AnimalNameDisplayMode.None: return; case AnimalNameDisplayMode.TameAll: if (pawn.Name == null) { return; } break; case AnimalNameDisplayMode.TameNamed: if (pawn.Name == null || pawn.Name.Numerical) { return; } break; } } Vector2 pos = GenMapUI.LabelDrawPosFor(pawn, -0.6f); GenMapUI.DrawPawnLabel(pawn, pos); if (pawn.CanTradeNow) { pawn.Map.overlayDrawer.DrawOverlay(pawn, OverlayTypes.QuestionMark); } } }
public static void DrawBeautyAroundMouse() { BeautyUtility.FillBeautyRelevantCells(UI.MouseCell(), Find.VisibleMap); for (int i = 0; i < BeautyUtility.beautyRelevantCells.Count; i++) { IntVec3 intVec = BeautyUtility.beautyRelevantCells[i]; float num = BeautyUtility.CellBeauty(intVec, Find.VisibleMap, BeautyDrawer.beautyCountedThings); if (num != 0f) { Vector3 v = GenMapUI.LabelDrawPosFor(intVec); GenMapUI.DrawThingLabel(v, Mathf.RoundToInt(num).ToStringCached(), BeautyDrawer.BeautyColor(num, 8f)); } } BeautyDrawer.beautyCountedThings.Clear(); }
private static void DrawBeautyAroundMouse() { if (!Find.PlaySettings.showBeauty) { return; } BeautyUtility.FillBeautyRelevantCells(UI.MouseCell(), Find.CurrentMap); for (int i = 0; i < BeautyUtility.beautyRelevantCells.Count; i++) { IntVec3 intVec = BeautyUtility.beautyRelevantCells[i]; float num = BeautyUtility.CellBeauty(intVec, Find.CurrentMap, beautyCountedThings); if (num != 0f) { GenMapUI.DrawThingLabel((Vector3)GenMapUI.LabelDrawPosFor(intVec), Mathf.RoundToInt(num).ToStringCached(), BeautyColor(num, 8f)); } } beautyCountedThings.Clear(); }
public static void DrawThingLabel(Thing thing, string text, Color textColor) { GenMapUI.DrawThingLabel(GenMapUI.LabelDrawPosFor(thing, -0.4f), text, textColor); }