public override void Draw2D(GameObjectTag DrawTag) { if (SizeBonus == 0) { return; } Render.DrawSolidRect(InterpolatedPositionL, InterpolatedPositionR, new Color(0, 0, 0, 0.5f)); int i; for (i = 0; i < CurrentCards.Count; i++) { CurrentCards[i].Draw(InterpolatedPositionL + new Vector2(InterpolatedDifference.X * ((0.1f + (float)i) / CurrentCards.Count), InterpolatedDifference.Y * 0.1f), InterpolatedPositionL + new Vector2(InterpolatedDifference.X * ((0.9f + (float)i) / CurrentCards.Count), InterpolatedDifference.Y * 0.9f), i == SelectedSlot ? 1 : OtherAlpha); } if (SinglePlayer || WaveManager.CurrentWave < PickEnemyState.RandomRounds + 1) { Render.DrawSprite(WaveCard.UnitPicker, InterpolatedPositionL + new Vector2((SingleSelectedNode + 0.5f) * InterpolatedDifference.X / CurrentCards.Count, InterpolatedDifference.Y + i * 15), new Vector2(InterpolatedDifference.X / CurrentCards.Count * 1.5f, 90), 0, new Color(1, 0.5f, 0.5f)); } else { i = 0; foreach (int key in TeamFloatingSelection.Keys) { Render.DrawSprite(WaveCard.UnitPicker, InterpolatedPositionL + new Vector2((TeamFloatingSelection[key] + 0.5f) * InterpolatedDifference.X / CurrentCards.Count, InterpolatedDifference.Y + i * 15) , new Vector2(InterpolatedDifference.X / CurrentCards.Count * 1.5f, 90), 0, TeamInfo.GetColor(key)); } } base.Draw2D(DrawTag); }
public void DrawXButton(bool DrawGlow, float BarMult, float XMult) { Vector3 Position3 = Game1.graphicsDevice.Viewport.Project( new Vector3(this.Position.X(), Y, this.Position.Y()), StarshipScene.CurrentCamera.ProjectionMatrix, StarshipScene.CurrentCamera.ViewMatrix, Matrix.Identity); Vector3 Size3 = Game1.graphicsDevice.Viewport.Project( new Vector3(this.Position.X() + this.Size.X(), Y, this.Position.Y()), StarshipScene.CurrentCamera.ProjectionMatrix, StarshipScene.CurrentCamera.ViewMatrix, Matrix.Identity); Vector2 Position = new Vector2(Position3.X, Position3.Y) - Render.CurrentView.Position; float Size = Vector2.Distance(Position, new Vector2(Size3.X, Size3.Y) - Render.CurrentView.Position) / 1.6f; Position.Y -= Size; Render.DrawSprite(DrawGlow ? ControllerLoader.XButtonGlow : ControllerLoader.XButton, Position, new Vector2(Size), 0); if (BarMult > 0) { Render.DrawBar(Position - new Vector2(Size / 2, 10), Position + new Vector2(Size / 2, 0), BarMult, Color.Black, Color.White); } if (XMult > 0) { Render.DrawSprite(PlayerProfile.XTexture, Position, new Vector2(Size) * 2, 0, Color.White * XMult); } }
public override void Draw2D(GameObjectTag DrawTag) { #if EDITOR && WINDOWS if (ParentLevel.LevelForEditing) { Render.DrawSprite(PlaceholderRockTexture, Position, Size, Rotation); } else #endif if (miningPlatform == null) { Vector3 Position3 = Game1.graphicsDevice.Viewport.Project( new Vector3(this.Position.X(), Y, this.Position.Y()), StarshipScene.CurrentCamera.ProjectionMatrix, StarshipScene.CurrentCamera.ViewMatrix, Matrix.Identity); Vector3 Size3 = Game1.graphicsDevice.Viewport.Project( new Vector3(this.Position.X() + this.Size.X(), Y, this.Position.Y()), StarshipScene.CurrentCamera.ProjectionMatrix, StarshipScene.CurrentCamera.ViewMatrix, Matrix.Identity); Vector2 Position = new Vector2(Position3.X, Position3.Y) - Render.CurrentView.Position; float Size = Vector2.Distance(Position, new Vector2(Size3.X, Size3.Y) - Render.CurrentView.Position) / 1.6f; Position.Y -= Size; Render.DrawSprite(MiningPlatform.MRockPointer, Position, new Vector2(Size), 0, TeamInfo.GetColor(GetTeam())); base.Draw2D(DrawTag); } }
public override void DrawAsForm(Vector2 Position, Vector2 Size) { Render.DrawSprite(HudItem.GlowTexture, Position, Size * 32, 0, Color.Black * (Alpha - 0.5f) * 2); Arrow1.Draw(Position, Size); Arrow2.Draw(Position, Size); Render.DrawShadowedText(Font.get(), Text.get(), Position + new Vector2(0, -Size.Y) - Font.get().MeasureString(Text.get()) / 2, Vector2.Zero, MyColor.getAsColor() * Alpha, Color.Black * Alpha); float MinX = Position.X - Size.X / 2 + Size.Y / 2; float MaxX = Position.X + Size.X / 2 - Size.Y / 2; float InterpolatedX = MinX; if (SliderValue != null) { InterpolatedX += (MaxX - MinX) * (SliderValue.get() - MinValue.get()) / (MaxValue.get() - MinValue.get()); } Render.DrawSprite(SliderCircleTexture, Position, new Vector2(Size.Y / 2), 0, Color.Red * Alpha); Render.DrawSprite(SliderCircleTexture, new Vector2(InterpolatedX, Position.Y), new Vector2(Size.Y * 0.75f), 0, Color.White * Alpha); Render.DrawSprite(SliderBarTexture, Position, Size, 0, Color.White * Alpha); base.DrawAsForm(Position, Size); }
public override void Draw(Vector2 Position, Vector2 Size) { Render.DrawSprite(MyTexture, Position, Size, 0, TeamInfo.HudColors[ParentBox.ParentShip.GetTeam()] * IconAlpha); Render.DrawSprite(GlowTexture, Position, Size * 3, 0, TeamInfo.HudColors[ParentBox.ParentShip.GetTeam()] * GlowAlpha); base.Draw(Position, Size); }
protected override void DrawHealthBar(float HealthMult, Vector2 Position, float Size) { if (WaveManager.ActiveTeam != GetTeam()) { return; } if (StarshipScene.DrawingShip == null || StarshipScene.DrawingShip.GetTeam() != GetTeam()) { base.DrawHealthBar(HealthMult, Position, Size); } else { Position.Y -= Size; float SizeMult2 = (1f + SizeMult) * (1.75f - HealthMult); if (Vector2.Distance(Render.CurrentView.Size / 2, Position) > Render.CurrentView.Size.Y * 0.4f) { Vector2 NewPosition = Vector2.Normalize(Position - Render.CurrentView.Size / 2) * (Render.CurrentView.Size.Y * 0.4f) + Render.CurrentView.Size / 2; Render.DrawSprite(MRockPointer, NewPosition, new Vector2(Size) * SizeMult2, DrawRotation, TeamInfo.GetColor(GetTeam())); base.DrawHealthBar(HealthMult, NewPosition, Size); TargetDrawRotation = -Logic.ToAngle((Position - NewPosition)); } else { TargetDrawRotation = 0; Render.DrawSprite(MRockPointer, Position, new Vector2(Size) * SizeMult2, DrawRotation, TeamInfo.GetColor(GetTeam())); base.DrawHealthBar(HealthMult, Position, Size); } } }
public virtual void DrawTechTree(Vector2 Position, float Alpha, PlayerShip Ship) { if (!GetUnitImagePath().Equals("")) { if (!SortedTextures.ContainsKey(GetImagePath())) { SortedTextures.Add(GetImagePath(), AssetManager.Load <Texture2D>("Textures/ShipGame/TurretPictures/" + GetImagePath())); } } else { if (!SortedTextures.ContainsKey(GetUnitImagePath())) { SortedTextures.Add(GetUnitImagePath(), AssetManager.Load <Texture2D>("Textures/ShipGame/UnitPictures/" + GetUnitImagePath())); } } Color col = new Color(((Color.White * (1 - RedFlashAlpha)).ToVector3() + (Color.Red * RedFlashAlpha).ToVector3())) * (Alpha) * Alpha; Rectangle r = new Rectangle((int)Position.X, (int)Position.Y, (int)TechTreeGroup.CellSize.X, (int)TechTreeGroup.CellSize.Y); Render.DrawSolidRect(r, Color.Black * Alpha); Render.DrawSprite(SortedTextures[GetImagePath()], Position + TechTreeGroup.CellSize / 2, TechTreeGroup.CellSize, 0, col); Render.DrawOutlineRect(r, 3, col); Render.DrawShadowedText(Name, Position, col); }
public void Draw(Vector2 Position) { if (EventTexture != null) { Render.DrawSprite(EventTexture, Position + PositionOffset + new Vector2(0, -64), new Vector2(64), 0, Color.White * Alpha); } Render.DrawShadowedText(FeedFont, EventString, Position + PositionOffset - FeedFont.MeasureString(EventString) / 2, Vector2.Zero, EventColor * Alpha, Color.Black * Alpha); }
public override void Draw2D(GameObjectTag DrawTag) { if (ParentLevel.LevelForEditing) { Render.DrawSprite(CameraIcon, Position, Size, Rotation); } base.Draw2D(DrawTag); }
public virtual void DrawAsForm(Vector2 Position, Vector2 Size) { Color col = (SpecialColor ? MyColor : GameFormsManager.PlayerColors[MyPlayer.PlayerNumber]); Render.DrawSprite(FormBoxTexture, Position, Size * 1.2f, 0, col * (0.5f * Alpha)); Render.DrawOutlineRect(Position - Size / 2, Position + Size / 2, 2, col * (1.5f * Alpha)); }
public override void Draw(Vector2 Position, Vector2 Size) { if (LTAlpha > 0) { Render.DrawSprite(MyTexture, Position, Size, 0, TeamInfo.HudColors[ParentBox.ParentShip.GetTeam()] * LTAlpha); } base.Draw(Position, Size); }
public void Draw(Vector2 Position, Vector2 Size) { Position += new Vector2((Size.X + Size.Y) / 2 * OffsetDirection, 0); Render.DrawSprite(ArrowTexture, Position, new Vector2(Size.Y), Rotation, Color.White * Parent.Alpha); if (FlashAlpha > 0) { Render.DrawSprite(HudItem.GlowTexture, Position, new Vector2(Size.Y) * 8, Rotation, Color.White * (Parent.Alpha * FlashAlpha / 2)); } }
public override void Draw(Vector2 Position, Vector2 Size) { Render.DrawSprite(MyTexture, Position, Size, 0, TeamInfo.HudColors[ParentShip.GetTeam()]); Vector2 SliceSize = TargetSliceSize * Size; Game1.spriteBatch.Draw(SliceTexture, Position - SliceSize / 2, new Rectangle(0, 0, (int)( SliceTexture.Width * Math.Floor(ParentShip.HealthMult() * 50) / 50f), SliceTexture.Height), TeamInfo.HudColors[ParentShip.GetTeam()], 0, Vector2.Zero, SliceSize / new Vector2(SliceTexture.Width, SliceTexture.Height), SpriteEffects.None, 0); base.Draw(Position, Size); }
protected override void DrawHealthBar(float HealthMult, Vector2 Position, float Size) { if (!Dead) { base.DrawHealthBar(HealthMult, Position, Size); } else { Render.DrawSprite(DeadIcon, Position, new Vector2(Size), 0); } }
public void DrawControls() { if (ParentScene.DrawCamera != null && ParentScene.SelectedGameObjects.Count > 0) { Vector2 Avg = Basic2DObject.GetAveragePosition(ParentScene.SelectedGameObjects); Texture2D tex = controlMode == ControlMode.Move ? MoveControl : controlMode == ControlMode.Rotate ? RotateControl : ScaleControl; Render.DrawSprite(tex, Avg, new Vector2(128) / ParentScene.DrawCamera.getZoom(), 0); } base.Draw(); }
protected override void DrawHealthBar(float HealthMult, Vector2 Position, float Size) { if (!Dead) { if (IsUpdgraded) { Render.DrawSprite(LevelUpIcon, Position - new Vector2(0, Size), new Vector2(Size), 0); } } base.DrawHealthBar(HealthMult, Position, Size); }
public virtual void DrawFromMiniMap(Vector2 Position, float Size, Vector2 Min, Vector2 Max) { if (this.Position.X() > Max.X || this.Position.Y() > Max.Y || this.Position.X() < Min.X || this.Position.Y() < Min.Y) { return; } Vector2 MapPosition = (this.Position.get() - Min) / (Max - Min) * Size + Position; Render.DrawSprite(Render.BlankTexture, MapPosition - new Vector2(1), new Vector2(2), 0, TeamInfo.GetColor(GetTeam())); }
public override void Draw(Vector2 Position, Vector2 Size) { if (ProgressAlpha > 0) { Render.DrawSprite(OuterTexture, Position, Size * ProgressAlpha, 0, TeamInfo.HudColors[ParentShip.GetTeam()] * ProgressAlpha); Render.DrawSprite(InnerTexture, Position, Size * ProgressAlpha, ParentShip.GetOffenseProgress() * (float)Math.PI, TeamInfo.HudColors[ParentShip.GetTeam()] * ProgressAlpha); } if (EliminatedAlpha > 0) { Render.DrawSprite(EliminatedTexture, Position, Size * EliminatedAlpha, 0, TeamInfo.HudColors[WaveFSM.PlayerEliminatedState.LastEliminatedTeam] * EliminatedAlpha); } base.Draw(Position, Size); }
public override void DrawFromMiniMap(Vector2 Position, float Size, Vector2 Min, Vector2 Max) { if (miningPlatform == null) { if (this.Position.X() > Max.X || this.Position.Y() > Max.Y || this.Position.X() < Min.X || this.Position.Y() > Min.X) { return; } Vector2 MapPosition = (this.Position.get() + Min) / (Max - Min) * Size + new Vector2(Size) + Position; Render.DrawSprite(Render.BlankTexture, MapPosition - Vector2.One, new Vector2(2), 0, Color.Gray); } }
public override void Draw2D(GameObjectTag DrawTag) { #if EDITOR && WINDOWS if (ParentLevel.LevelForEditing) { if (Render.AdditiveBlending) { return; } Render.DrawSprite(PlaceholderRockTexture, Position.get(), Size.get() * 1.25f, Rotation.get()); } #endif base.Draw2D(DrawTag); }
public override void DrawFromMiniMap(Vector2 Position, float Size, Vector2 Min, Vector2 Max) { if (this.Position.X() > Max.X || this.Position.Y() > Max.Y || this.Position.X() < Min.X || this.Position.Y() < Min.Y) { return; } Vector2 MapPosition = (this.Position.get() - Min) / (Max - Min) * Size + Position; if (SizeMult > 0) { Render.DrawOutlineRect(MapPosition - new Vector2(SizeMult * 4) - new Vector2(3), MapPosition + new Vector2(SizeMult * 4) - new Vector2(3), 2, TeamInfo.GetColor(GetTeam())); } Render.DrawSprite(Render.BlankTexture, MapPosition - new Vector2(2), new Vector2(4), 0, TeamInfo.GetColor(GetTeam())); }
public override void Draw2D(GameObjectTag DrawTag) { LinkedListNode <GameObject> Node = Nodes.Value.First; while (Node != null) { WallNode n = (WallNode)Node.Value; Render.DrawSprite(NodeTexture, n.Position, n.Size, n.Rotation); if (Node.Next != null) { WallNode n2 = (WallNode)Node.Next.Value; Render.DrawSquare(n.Position.get(), n2.Position.get(), (int)(n.Size.X() / 2), ConnectorTexture, Color.White); } Node = Node.Next; } base.Draw2D(DrawTag); }
public override void DrawAsForm(Vector2 Position, Vector2 Size) { Render.DrawSprite(HudItem.GlowTexture, Position, Size * 3, 0, Color.Black * (Alpha - 0.5f)); Render.DrawShadowedText(Font.get(), Text.get(), Position - Font.get().MeasureString(Text.get()) / 2, Vector2.Zero, MyColor.getAsColor() * Alpha, Color.Black * Alpha); Render.DrawOutlineRect(Position - Size / 2, Position + Size / 2, 2, Color.White * Alpha); if (FlashAlpha > 0) { Render.DrawSolidRect(Position - Size / 2, Position + Size / 2, Color.White * FlashAlpha * Alpha); } if (ErrorAlpha > 0) { Render.DrawSolidRect(Position - Size / 2, Position + Size / 2, Color.Red * ErrorAlpha * Alpha); } base.DrawAsForm(Position, Size); }
public override void Draw(Vector2 Position, Vector2 Size) { if (!FactionManager.Factions[ParentBox.ParentShip.FactionNumber].PickingCards) { if (IconAlpha > 0) { Render.DrawSprite(MyTexture, Position, Size, 0, TeamInfo.HudColors[ParentBox.ParentShip.GetTeam()] * IconAlpha); } if (GlowAlpha > 0) { Render.DrawSprite(GlowTexture, Position, Size * 3, 0, TeamInfo.HudColors[ParentBox.ParentShip.GetTeam()] * GlowAlpha); } if (OffenseIconAlpha > 0) { Render.DrawSprite(OffenseTexture, Position, Size, 0, TeamInfo.HudColors[ParentBox.ParentShip.GetTeam()] * OffenseIconAlpha); } } base.Draw(Position, Size); }
public override void Draw(Vector2 Position, Vector2 Size) { if (FullAlpha == 1) { Render.DrawSprite(SolidSphere, Position, Size, 0, TeamInfo.HudColors[ParentBox.ParentShip.GetTeam()]); } else { Render.DrawSprite(OutlineSphere, Position, Size, 0, TeamInfo.HudColors[ParentBox.ParentShip.GetTeam()]); if (FullAlpha != 0) { Render.DrawSprite(SolidSphere, Position, Size * FullAlpha, 0, TeamInfo.HudColors[ParentBox.ParentShip.GetTeam()]); } } if (GlowAlpha > 0) { Render.DrawSprite(GlowTexture, Position, Size * 6, 0, TeamInfo.HudColors[ParentBox.ParentShip.GetTeam()] * (GlowAlpha + ExtraGlowAlpha) * (0.45f + Rand.F() * 0.1f)); } base.Draw(Position, Size); }
public override void DrawTechTree(Vector2 Position, float Alpha, PlayerShip Ship) { if (!SortedTextures.ContainsKey(GetImagePath())) { SortedTextures.Add(GetImagePath(), AssetManager.Load <Texture2D>("Textures/ShipGame/TurretPictures/" + GetImagePath())); } int CardCost = CardCellsCost; if (FactionCostIncreases.ContainsKey(Ship.FactionNumber)) { CardCost += CardCellsCostIncrease * FactionCostIncreases[Ship.FactionNumber]; } Color col = new Color(((Color.White * (1 - RedFlashAlpha)).ToVector3() + (Color.Red * RedFlashAlpha).ToVector3())) * (Alpha) * Alpha; Rectangle r = new Rectangle((int)Position.X, (int)Position.Y, (int)TechTreeGroup.CellSize.X, (int)TechTreeGroup.CellSize.Y); Render.DrawSolidRect(r, Color.Black * Alpha * 0.4f); Render.DrawSprite(SortedTextures[GetImagePath()], Position + TechTreeGroup.CellSize / 2, TechTreeGroup.CellSize, 0, col); Render.DrawOutlineRect(r, 3, col); Render.DrawShadowedText(Name + "\n$ " + CardCost.ToString(), Position, col); }
public override void Draw(int Completed, int Max, float Alpha) { if (Alpha > 0) { Load(); Game1.spriteBatch.Begin(); Vector2 Position = new Vector2(Game1.ResolutionX, Game1.ResolutionY) / 2; Vector2 Size = new Vector2(Position.Length() * Alpha); Alpha *= 0.75f + Rand.F() * 0.25f; Render.DrawSprite(Gear, Position, Size, Level.Time / 10f, Color.White * Alpha); Size *= 0.8f; Render.DrawSprite(Gear2, Position, Size, Level.Time / 5f, Color.White * (Alpha / 2)); Size *= 0.8f; Render.DrawSprite(Gear3, Position, Size, Level.Time / 2.5f, Color.White * (Alpha / 2)); Size *= 0.8f; Render.DrawSprite(Gear4, Position, Size, Level.Time, Color.White * (Alpha / 4)); Size *= 0.9f; Render.DrawSprite(GearShip, Position, Size, 0, Color.White * (Alpha / 4)); Size *= 0.5f; Position.Y += Size.Y; Render.DrawSolidRect(Position - Size * new Vector2(1, 0.2f), Position + Size * new Vector2(1, 0.2f), Color.Black * Alpha); Size *= 0.85f; Render.DrawSolidRect(Position - Size * new Vector2(1, 0.2f), Position + new Vector2(-Size.X + 2 * Size.X * (float)Completed / Max, Size.Y * 0.2f), Color.White * Alpha); Game1.spriteBatch.End(); } }
public override void Draw2D(GameObjectTag DrawTag) { if (Alpha == 0) { return; } float Size = InterpolatedDifference.X * SizeMult; Vector2 Position = (InterpolatedPositionL + InterpolatedPositionR) / 2 - new Vector2(Size / 2); if (CurrentIcon == null) { if (NeutralManager.MyPattern.CurrentCard.MyIconTexture == null) { switch (NeutralManager.MyPattern.CurrentCard.Type) { case "Light": CurrentIcon = WaveCard.LightIcon; break; case "Medium": CurrentIcon = WaveCard.MediumIcon; break; case "Heavy": CurrentIcon = WaveCard.HeavyIcon; break; } } else { CurrentIcon = NeutralManager.MyPattern.CurrentCard.MyIconTexture; } } Render.DrawSprite(CurrentIcon, Position + new Vector2(Size) / 2, new Vector2(Size * Alpha), 0, Color.White * 0.5f * Alpha); Render.DrawShadowedText(WaveFont, CurrentString, Position + new Vector2(Size / 4, Size), Vector2.One, CurrentColor * SizeMult * Alpha, Color.Black * SizeMult * Alpha); return; Render.DrawSprite(Render.BlankTexture, Position + new Vector2(Size) / 2, new Vector2(Size), 0, Color.Black * 0.3f); foreach (WallChain n in GameManager.GetLevel().getCurrentScene().Enumerate(typeof(WallChain))) { n.DrawFromMiniMap(Position, Size, Min, Max); } foreach (BasicShipGameObject u in AllUnits) { u.DrawFromMiniMap(Position, Size, Min, Max); } Render.DrawOutlineRect(Position, Position + new Vector2(Size), 1, Color.White); //Render.DrawSprite(HudWaveText, Position + new Vector2(Size / 3, Size * 1.1f), new Vector2(Size * 0.6f, Size * 0.2f), 0); //DigitRenderer.DrawDigits(WaveManager.CurrentWave, 2, Position + new Vector2(Size / 1.5f, Size * 1.1f), new Vector2(Size * 0.25f, Size * 0.15f), Color.White); base.Draw2D(DrawTag); }
public override void Draw2D(GameObjectTag DrawTag) { Render.DrawSprite(Sprite.get(), Position, Size, Rotation); base.Draw2D(DrawTag); }
public override void DrawAsForm(Vector2 Position, Vector2 Size) { Vector2 FormSize = Size * Alpha * 1.5f; float FormAlpha = Alpha * DistanceAlpha; Render.DrawSprite(WaveCard.UnitPicker, Position, Size * new Vector2((Rand.F() + 6) / 7 * 4, 2.5f), Rotation.get(), MyColor * FormAlpha * 2); Render.DrawSprite(WaveCard.UnitBox, Position, FormSize * 1.25f, Rotation.get(), MyColor * (FormAlpha * FormAlpha * 0.3f * (4 + Rand.F()))); Render.DrawSprite(WaveCard.UnitPicker, Position, FormSize * new Vector2((Rand.F() + 6) / 7, 1), Rotation.get(), MyColor * (FormAlpha * FormAlpha * 0.3f * (4 + Rand.F()))); Render.DrawSprite(MyTexture, Position, FormSize, Rotation.get(), Color.White * FormAlpha); if (FlashAlpha > 0) { Render.DrawSprite(HudItem.GlowTexture, Position, FormSize * 2, Rotation.get(), MyColor * 1.5f * FlashAlpha * FormAlpha); } if (ErrorAlpha > 0) { Render.DrawSprite(HudItem.GlowTexture, Position, FormSize * 2, Rotation.get(), Color.Red * 1.5f * ErrorAlpha * FormAlpha); Render.DrawSprite(FactionEvent.LossTexture, Position, FormSize, Rotation.get(), Color.Red * 1.5f * ErrorAlpha * FormAlpha); } if (SelectedAlpha > 0) { Render.DrawSprite(FactionEvent.ReadyTexture, Position, FormSize * SelectedAlpha, Rotation.get(), MyColor * SelectedAlpha * 2 * FormAlpha); Render.DrawSprite(HudItem.GlowTexture, Position, FormSize, Rotation.get(), MyColor * SelectedAlpha * FormAlpha * 1.5f); } if (FormAlpha > 0.5 && Font.get() != null) { float DrawHeight = Position.Y - Size.Y / 2; float FontHeight = Font.get().MeasureString(Name.get()).Y; DrawHeight -= FontHeight * 2; string CostString = ""; if (MyCard.FactionCostIncreases.ContainsKey(ParentShip.FactionNumber)) { CostString = "$" + (MyCard.CardCellsCost + MyCard.CardCellsCostIncrease * MyCard.FactionCostIncreases[ParentShip.FactionNumber]).ToString(); } else { CostString = "$" + (MyCard.CardCellsCost).ToString(); } Render.DrawShadowedText(Font.get(), Text.get(), new Vector2(Position.X - Font.get().MeasureString(Text.get()).X / 2, DrawHeight), Vector2.One * 2, Color.White * (FormAlpha - 0.5f) * 2, Color.Black * (FormAlpha - 0.5f) * 2); DrawHeight -= FontHeight; Render.DrawShadowedText(Font.get(), CostString, new Vector2(Position.X - Font.get().MeasureString(CostString).X / 2, DrawHeight), Vector2.One * 2, Color.White * (FormAlpha - 0.5f) * 2, Color.Black * (FormAlpha - 0.5f) * 2); if (FactionManager.GetFaction(ParentShip.FactionNumber).PickingCards) { Vector2 s = Font.get().MeasureString(MyCard.Caption); DrawHeight -= s.Y + 20; //DrawHeight += 2 * FontHeight; Render.DrawSprite(HudItem.GlowTexture, new Vector2(Position.X, DrawHeight + s.Y / 2), s * 6, 0, Color.Black * (FormAlpha - 0.5f) * 2); Render.DrawShadowedText(Font.get(), MyCard.Caption, new Vector2(Position.X - Font.get().MeasureString(MyCard.Caption).X / 2, DrawHeight), Vector2.One * 2, Color.White * (FormAlpha - 0.5f) * 2, Color.Black * (FormAlpha - 0.5f) * 2); } if (!MyCard.StrongVs.Equals("")) { Render.DrawSprite(MyCard.GetStrongTexture(), Position - Size * 3 / 8 * new Vector2(1, -1), Size / 2, 0, Color.White * (FormAlpha * FormAlpha)); Render.DrawShadowedText(Font.get(), MyCard.StrongVs, new Vector2(Position.X - Size.X * 1 / 8, Position.Y - Font.get().MeasureString(MyCard.StrongVs).Y * 3 / 4 + Size.Y / 2), Vector2.One * 2, Color.White * (FormAlpha - 0.5f) * 2, Color.Black * (FormAlpha - 0.5f) * 2); } } Render.DrawOutlineRect(Position - FormSize * (FormAlpha - 0.5f), Position + FormSize * (FormAlpha - 0.5f), 2 * FormAlpha, Color.White * (FormAlpha * FormAlpha * FormAlpha)); base.DrawAsForm(Position, FormSize); }