private void RenderMouseAttachments() { IntVec3 c = UI.MouseCell(); if (!c.InBounds(map)) { return; } ThingDef thingDef = map.deepResourceGrid.ThingDefAt(c); if (thingDef != null) { int num = map.deepResourceGrid.CountAt(c); if (num > 0) { Vector2 vector = c.ToVector3().MapToUIPosition(); GUI.color = Color.white; Text.Font = GameFont.Small; Text.Anchor = TextAnchor.MiddleLeft; float num2 = (UI.CurUICellSize() - 27f) / 2f; Rect rect = new Rect(vector.x + num2, vector.y - UI.CurUICellSize() + num2, 27f, 27f); Widgets.ThingIcon(rect, thingDef); Widgets.Label(new Rect(rect.xMax + 4f, rect.y, 999f, 29f), "DeepResourceRemaining".Translate(NamedArgumentUtility.Named(thingDef, "RESOURCE"), num.Named("COUNT"))); Text.Anchor = TextAnchor.UpperLeft; } } }
public void DrawSection(bool drawSunShadowsOnly) { int count = layers.Count; for (int i = 0; i < count; i++) { if (!drawSunShadowsOnly || layers[i] is SectionLayer_SunShadows) { layers[i].DrawLayer(); } } if (!drawSunShadowsOnly && DebugViewSettings.drawSectionEdges) { GenDraw.DrawLineBetween(botLeft.ToVector3(), botLeft.ToVector3() + new Vector3(0f, 0f, 17f)); GenDraw.DrawLineBetween(botLeft.ToVector3(), botLeft.ToVector3() + new Vector3(17f, 0f, 0f)); } }