public override void Render() { Patcher.Patcher.CallRealBase(); base.DrawSelection(this.Variant.Value ? VariantItem.ActiveSelection : VariantItem.NormalSelection); if (base.Selected) { bool perPlayer = this.Variant.PerPlayer; } if (this.Variant.Value && (base.Alpha >= 0.8f)) { if (!base.Selected) { Draw.HollowRect(base.X - 10f, base.Y - 10f, 20f, 20f, (Color)(VariantItem.ActiveSelection * base.Alpha)); } if (this.Variant.PerPlayer) { for (int i = 0; i < 4; i++) { if (TFGame.Players[i] && this.Variant[i]) { Draw.TextureCentered(TFGame.MenuAtlas["variants/playerBanner"], new Vector2((base.X - 8f) + (5 * i), base.Y + 9f), ArcherData.GetColorA(i, Allegiance.Neutral)); } } for (int i = 4; i < 8; i++) { if (TFGame.Players[i] && this.Variant[i]) { Draw.TextureCentered(TFGame.MenuAtlas["variants/playerBanner"], new Vector2((base.X - 8f) + (5 * (i - 4)), base.Y + 18f), ArcherData.GetColorA(i, Allegiance.Neutral)); } } } } if (this.taggedNew) { Draw.TextureCentered(TFGame.MenuAtlas["variants/newVariantsTagSmall"], new Vector2(base.X + 6f, base.Y - 6f), (Color)(Color.White * base.Alpha), Math.Max((float)1f, (float)(1f + (0.5f * this.newSine.Value))), 0f); } base.DrawBubble(); base.DrawExplain(); }
public override void Render() { Patcher.Patcher.CallRealBase(); MenuPanel.DrawPanel(base.X - 80f, base.Y - 23f, 160f, 46f); Draw.TextCentered(TFGame.Font, this.variant.Title, base.Position + ((Vector2)(Vector2.UnitY * -8f)), Color.White); for (int i = 0; i < 8; i++) { if (TFGame.Players[i]) { Color color = (this.selection == i) ? ArcherData.GetColorB(i, Allegiance.Neutral) : ArcherData.GetColorA(i, Allegiance.Neutral); float num2 = (this.variant[i] ? 2f : 1f) + (this.wigglers[i].Value * 0.3f); Draw.TextCentered(TFGame.Font, this.PlayerTitles2[i], (base.Position + this.PlayerPositions2[i]) + new Vector2(0f, 7f), color, (Vector2)(Vector2.One * num2), 0f); } } Vector2 position = (base.Position + this.cursor) + ((Vector2)(Vector2.UnitY * (30f - (4f * this.cursorSine.Value)))); Color colorB = ArcherData.GetColorB(this.selection, Allegiance.Neutral); Vector2 scale = new Vector2(1f, -1f + (0.2f * this.cursorSine.Value)); Draw.OutlineTextureJustify(TFGame.MenuAtlas["variantPerPlayerArrow"], position, colorB, scale, new Vector2(0.5f, 1f)); }