public void DrawTexture(ITexture t, float x, float z, float rotation) { float tx = (x - Position.X) / _width * Constants.terrainPieceTextureWidth * Constants.terrainHeightsPerChunk; float tz = (z - Position.Z) / _height * Constants.terrainPieceTextureWidth * Constants.terrainHeightsPerChunk; _texture.Draw(t, tx, tz, rotation, 1); }
private void DrawTexture(uint tid, RectangleF r) { ITexture t = Hud.Texture.GetTexture(tid); if (t == null) { return; } t.Draw(r, 1.0f); }
/// <summary> /// Set element style and position as for value. /// </summary> public void Draw() { try { texture.Draw(0, CurrentPoint, rotateAngle, rotateOrigin, VerticalMirror); } catch (Exception ex) { xPFT.Exceptions.ExceptionHandler.LogError(ex); } }
private float DrawItemBar(ISnoItem[] itemsToDisplay, float barY) { var uiInv = Hud.Inventory.InventoryMainUiElement; var rect = new SharpDX.RectangleF(uiInv.Rectangle.Left - 1, barY, uiInv.Rectangle.Width + 2, _materialBackgroundImage.Height * uiInv.Rectangle.Width / _materialBackgroundImage.Width); _materialBackgroundImage.Draw(rect.X, rect.Y, rect.Width, rect.Height); var itemCountList = new int[itemsToDisplay.Length]; foreach (var item in Hud.Inventory.GetItemsInStash()) { for (int j = 0; j < itemsToDisplay.Length; j++) { if (item.SnoItem == itemsToDisplay[j]) { itemCountList[j] += (int)item.Quantity; } } } foreach (var item in Hud.Inventory.GetItemsInInventory()) { for (int j = 0; j < itemsToDisplay.Length; j++) { if (item.SnoItem == itemsToDisplay[j]) { itemCountList[j] += (int)item.Quantity; } } } var w = rect.Width / (itemsToDisplay.Length + 1); var h = rect.Height * 0.85f; var y = rect.Top + (rect.Height - h) / 2; for (int i = 0; i < itemsToDisplay.Length; i++) { var snoItem = itemsToDisplay[i]; var texture = Hud.Texture.GetItemTexture(snoItem); if (texture != null) { var x = w / 2 + rect.Left + i * w; texture.Draw(x + w - h, y, h, h, 1); var layout = MaterialCountFont.GetTextLayout(ValueToString(itemCountList[i], ValueFormat.NormalNumberNoDecimal)); MaterialCountFont.DrawText(layout, x + w - h * 1.2f - layout.Metrics.Width, y + (h - layout.Metrics.Height) / 2); } } return(rect.Height); }
private void DrawCell(ITexture texture, int x, int y, string text) { GemBackgroundTexture.Draw(GemBackgroundRect.Left + ((GemInvRect.Width + GemSpacing) * x) - GemSpacing * 0.5f, GemBackgroundRect.Top + ((GemInvRect.Height + GemSpacing) * y) - GemSpacing * 0.5f, GemInvRect.Width + GemSpacing, GemInvRect.Height + GemSpacing); texture.Draw(GemBackgroundRect.Left + ((GemInvRect.Width + GemSpacing) * x), GemBackgroundRect.Top + ((GemInvRect.Height + GemSpacing) * y), GemInvRect.Width, GemInvRect.Height); var layout = GemQuantityFont.GetTextLayout(text); GemQuantityFont.DrawText(layout, GemBackgroundRect.Left + ((GemInvRect.Width + GemSpacing) * x) + (GemInvRect.Width - layout.Metrics.Width) * 0.5f, GemBackgroundRect.Top + ((GemInvRect.Height + GemSpacing) * y) + layout.Metrics.Height * 0.5f); }
/// <summary>Render the current state of the game. /// </summary> /// <param name="gameTime"></param> private void Draw(GameTime gameTime) { // Clear the screen on each iteration so that we don't get stale renders renderer.ClearScreen(); // Draw the Git logo at (0,0) and -45 degree angle rotated around the center (calculated Vector) textureGitLogo.Draw(0, 0, -45, new Vector(textureGitLogo.Width / 2, textureGitLogo.Height / 2)); // Draw the Git logo at (300,300) and 45 degree angle rotated around the center (calculated Vector) textureGitLogo.Draw(300, 300, 45, new Vector(textureGitLogo.Width / 2, textureGitLogo.Height / 2)); // Draw the Visual Studio logo at (700, 400) with no rotation textureVisualStudioLogo.Draw(700, 400); // Draw the YBOC logo at (900, 900) cropped to a 50x50 rectangle with (0,0) being the starting point textureYboc.Draw(800, 600, new Rectangle(0, 0, 50, 50)); // Draw text at 400,100 ttf.Texture.Draw(400, 100); // Update the rendered state of the screen renderer.RenderPresent(); }
private float DrawItemBar(ISnoItem[] itemsToDisplay, float barY) { var uiInv = Hud.Inventory.InventoryMainUiElement; var rect = new SharpDX.RectangleF(uiInv.Rectangle.Left - 1, barY, uiInv.Rectangle.Width + 2, _materialBackgroundImage.Height * uiInv.Rectangle.Width / _materialBackgroundImage.Width); _materialBackgroundImage.Draw(rect.X, rect.Y, rect.Width, rect.Height); var itemCountList = new long[itemsToDisplay.Length]; for (int j = 0; j < itemsToDisplay.Length; j++) { itemCountList[j] = GetItemCount(itemsToDisplay[j]); } var w = rect.Width / (itemsToDisplay.Length + 1); var h = rect.Height * 0.85f; var y = rect.Top + (rect.Height - h) / 2; for (int i = 0; i < itemsToDisplay.Length; i++) { var snoItem = itemsToDisplay[i]; var texture = Hud.Texture.GetItemTexture(snoItem); if (texture != null) { var x = w / 2 + rect.Left + i * w; texture.Draw(x + w - h, y, h, h, 1); var layout = MaterialCountFont.GetTextLayout(ValueToString(itemCountList[i], ValueFormat.NormalNumberNoDecimal)); MaterialCountFont.DrawText(layout, x + w - h * 1.2f - layout.Metrics.Width, y + (h - layout.Metrics.Height) / 2); if (Hud.Window.CursorInsideRect(x + w - h * 1.2f - layout.Metrics.Width, y, h * 1.2f + layout.Metrics.Width, h)) { Hud.Render.SetHint(snoItem.NameLocalized); } } } return(rect.Height); }
public void PaintTopInGame(ClipState clipState) { deathsBreathCount = Hud.Game.Me.Materials.DeathsBreath; reusablePartsCount = Hud.Game.Me.Materials.ReusableParts; arcaneDustCount = Hud.Game.Me.Materials.ArcaneDust; veiledCrystalCount = Hud.Game.Me.Materials.VeiledCrystal; forgottenSoulCount = Hud.Game.Me.Materials.ForgottenSoul; bloodShardCount = Hud.Game.Me.Materials.BloodShard; khanduranRuneCount = Hud.Game.Me.Materials.KhanduranRune; caldeumNightShadeCount = Hud.Game.Me.Materials.CaldeumNightShade; arreatWarTapestryCount = Hud.Game.Me.Materials.ArreatWarTapestry; corruptedAngelFleshCount = Hud.Game.Me.Materials.CorruptedAngelFlesh; westmarchHolyWaterCount = Hud.Game.Me.Materials.WestmarchHolyWater; leoricsRegretCount = Hud.Game.Me.Materials.LeoricsRegret; idolOfTerrorCount = Hud.Game.Me.Materials.IdolOfTerror; vialOfPutridnessCount = Hud.Game.Me.Materials.VialOfPutridness; heartOfFrightCount = Hud.Game.Me.Materials.HeartOfFright; grkCount = Hud.Game.Me.Materials.GreaterRiftKeystone; int TotalBounties = 0; int Completed = 0; var Bounties = Hud.Game.Bounties; if (Bounties != null) { foreach (var Bounty in Bounties) { TotalBounties++; if (Bounty.State == QuestState.completed) { Completed++; } } } BountiesCompletion = Completed; BountiesLeft = (int)(TotalBounties - BountiesCompletion); var puzzleRingLoopCount = 0; var bovineBardicheLoopCount = 0; foreach (var item in Hud.Inventory.ItemsInStash) { if (item.SnoItem.Sno == 2346057823) { bovineBardicheLoopCount += (int)item.Quantity; // Bovine Bardiche } if (item.SnoItem.Sno == 3106130529) { puzzleRingLoopCount += (int)item.Quantity; // Puzzle Ring } } foreach (var item in Hud.Inventory.ItemsInInventory) { if (item.SnoItem.Sno == 2346057823) { bovineBardicheLoopCount += (int)item.Quantity; // Bovine Bardiche } if (item.SnoItem.Sno == 3106130529) { puzzleRingLoopCount += (int)item.Quantity; // Puzzle Ring } } puzzleRingCount = Math.Abs(puzzleRingLoopCount); bovineBardicheCount = Math.Abs(bovineBardicheLoopCount); var craftCountX = (Hud.Window.Size.Width / 2) - (Hud.Window.Size.Width / 48); var craftCountY = (Hud.Window.Size.Height / 2) - (Hud.Window.Size.Height / 6); if (Hud.Tracker.Session.ElapsedMilliseconds < 10000) { prevDeathsBreathCount = deathsBreathCount; prevReusablePartsCount = reusablePartsCount; prevArcaneDustCount = arcaneDustCount; prevVeiledCrystalCount = veiledCrystalCount; prevForgottenSoulCount = forgottenSoulCount; prevBloodShardCount = bloodShardCount; prevGrkCount = grkCount; prevBovineBardicheCount = bovineBardicheCount; prevPuzzleRingCount = puzzleRingCount; prevKhanduranRuneCount = khanduranRuneCount; prevCaldeumNightShadeCount = caldeumNightShadeCount; prevArreatWarTapestryCount = arreatWarTapestryCount; prevCorruptedAngelFleshCount = corruptedAngelFleshCount; prevWestmarchHolyWaterCount = westmarchHolyWaterCount; prevLeoricsRegretCount = leoricsRegretCount; prevIdolOfTerrorCount = idolOfTerrorCount; prevVialOfPutridnessCount = vialOfPutridnessCount; prevHeartOfFrightCount = heartOfFrightCount; prevBountiesCompletion = BountiesCompletion; prevGrkCount = grkCount; } CraftCountDecorator.TextFont.Opacity = opacity; BountiesDecorator.TextFont.Opacity = opacity; RiftCompletionDecorator.TextFont.Opacity = opacity; if (deathsBreathCount > prevDeathsBreathCount || deathsBreathCount < prevDeathsBreathCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevDeathsBreathCount = deathsBreathCount; } itemSno = 2087837753; var DeathsBreath = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(DeathsBreath); craftCount = deathsBreathCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (reusablePartsCount > prevReusablePartsCount || reusablePartsCount < prevReusablePartsCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevReusablePartsCount = reusablePartsCount; } itemSno = 3931359676; var ReusableParts = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(ReusableParts); craftCount = reusablePartsCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (arcaneDustCount > prevArcaneDustCount || arcaneDustCount < prevArcaneDustCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevArcaneDustCount = arcaneDustCount; } itemSno = 2709165134; var ArcaneDust = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(ArcaneDust); craftCount = arcaneDustCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (veiledCrystalCount > prevVeiledCrystalCount || veiledCrystalCount < prevVeiledCrystalCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevVeiledCrystalCount = veiledCrystalCount; } itemSno = 3689019703; var VeiledCrystal = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(VeiledCrystal); craftCount = veiledCrystalCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (forgottenSoulCount > prevForgottenSoulCount || forgottenSoulCount < prevForgottenSoulCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevForgottenSoulCount = forgottenSoulCount; } itemSno = 2073430088; var ForgottenSoul = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(ForgottenSoul); craftCount = forgottenSoulCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (bloodShardCount > prevBloodShardCount || bloodShardCount < prevBloodShardCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevBloodShardCount = bloodShardCount; } itemSno = 2603730171; var BloodShard = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(BloodShard); craftCount = bloodShardCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (grkCount > prevGrkCount || grkCount < prevGrkCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevGrkCount = grkCount; } itemSno = 2835237830; var grk = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(grk); craftCount = grkCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (bovineBardicheCount > prevBovineBardicheCount || bovineBardicheCount < prevBovineBardicheCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevBovineBardicheCount = bovineBardicheCount; } itemSno = 2346057823; var bovineBardiche = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(bovineBardiche); craftCount = bovineBardicheCount; itemSizeX = 23f; itemSizeY = 46f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (puzzleRingCount > prevPuzzleRingCount || puzzleRingCount < prevPuzzleRingCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevPuzzleRingCount = puzzleRingCount; } itemSno = 3106130529; var puzzleRing = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(puzzleRing); craftCount = puzzleRingCount; itemSizeX = 33f; itemSizeY = 33f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (khanduranRuneCount > prevKhanduranRuneCount || khanduranRuneCount < prevKhanduranRuneCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevKhanduranRuneCount = khanduranRuneCount; } itemSno = 1948629088; var khanduranRune = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(khanduranRune); craftCount = khanduranRuneCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (caldeumNightShadeCount > prevCaldeumNightShadeCount || caldeumNightShadeCount < prevCaldeumNightShadeCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevCaldeumNightShadeCount = caldeumNightShadeCount; } itemSno = 1948629089; var caldeumNightShade = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(caldeumNightShade); craftCount = caldeumNightShadeCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (arreatWarTapestryCount > prevArreatWarTapestryCount || arreatWarTapestryCount < prevArreatWarTapestryCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevArreatWarTapestryCount = arreatWarTapestryCount; } itemSno = 1948629090; var arreatWarTapestry = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(arreatWarTapestry); craftCount = arreatWarTapestryCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (corruptedAngelFleshCount > prevCorruptedAngelFleshCount || corruptedAngelFleshCount < prevCorruptedAngelFleshCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevCorruptedAngelFleshCount = corruptedAngelFleshCount; } itemSno = 1948629091; var corruptedAngelFlesh = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(corruptedAngelFlesh); craftCount = corruptedAngelFleshCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (westmarchHolyWaterCount > prevWestmarchHolyWaterCount || westmarchHolyWaterCount < prevWestmarchHolyWaterCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevWestmarchHolyWaterCount = westmarchHolyWaterCount; } itemSno = 1948629092; var westmarchHolyWater = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(westmarchHolyWater); craftCount = westmarchHolyWaterCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (leoricsRegretCount > prevLeoricsRegretCount || leoricsRegretCount < prevLeoricsRegretCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevLeoricsRegretCount = leoricsRegretCount; } itemSno = 1102953247; var leoricsRegret = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(leoricsRegret); craftCount = leoricsRegretCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (idolOfTerrorCount > prevIdolOfTerrorCount || idolOfTerrorCount < prevIdolOfTerrorCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevIdolOfTerrorCount = idolOfTerrorCount; } itemSno = 2670343450; var idolOfTerror = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(idolOfTerror); craftCount = idolOfTerrorCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (vialOfPutridnessCount > prevVialOfPutridnessCount || vialOfPutridnessCount < prevVialOfPutridnessCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevVialOfPutridnessCount = vialOfPutridnessCount; } itemSno = 2029265596; var vialOfPutridness = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(vialOfPutridness); craftCount = vialOfPutridnessCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (heartOfFrightCount > prevHeartOfFrightCount || heartOfFrightCount < prevHeartOfFrightCount) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevHeartOfFrightCount = heartOfFrightCount; } itemSno = 3336787100; var heartOfFright = Hud.Inventory.GetSnoItem(itemSno); var texture = Hud.Texture.GetItemTexture(heartOfFright); craftCount = heartOfFrightCount; itemSizeX = 23f; itemSizeY = 23f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); CraftCountDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if (BountiesCompletion > prevBountiesCompletion || BountiesCompletion < prevBountiesCompletion) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevBountiesCompletion = BountiesCompletion; } itemSno = 0; var texture = Hud.Texture.GetTexture(2854193535); itemSizeX = 34f; itemSizeY = 34f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); BountiesDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else if ((Hud.Game.RiftPercentage >= 23 && Hud.Game.RiftPercentage <= 27 || Hud.Game.RiftPercentage >= 48 && Hud.Game.RiftPercentage <= 52 || Hud.Game.RiftPercentage >= 73 && Hud.Game.RiftPercentage <= 77 || Hud.Game.RiftPercentage >= 90 && Hud.Game.RiftPercentage < 100) && prevRiftPercentage != Hud.Game.RiftPercentage) { if (opacity < 1.0f) { opacity += 0.01f; itemOpacity += 0.01f; craftCountY = (int)(craftCountY - opacity * 100); } else { prevRiftPercentage = Hud.Game.RiftPercentage; } itemSno = uint.MaxValue; var texture = Hud.Texture.GetTexture(3153276977); itemSizeX = 40f; itemSizeY = 40f; texture.Draw(craftCountX - 24, craftCountY + 12, itemSizeX, itemSizeY, itemOpacity); RiftCompletionDecorator.Paint(craftCountX, craftCountY, 50f, 50f, HorizontalAlign.Left); } else { if (opacity >= 0f) { opacity -= 0.010f; itemOpacity -= 0.010f; ISnoItem Fadeout = null; ITexture texture = null; if (itemSno == 0) { texture = Hud.Texture.GetTexture(2854193535); } else if (itemSno == uint.MaxValue) { texture = Hud.Texture.GetTexture(3153276977); } else { Fadeout = Hud.Inventory.GetSnoItem(itemSno); texture = Hud.Texture.GetItemTexture(Fadeout); } texture.Draw(craftCountX - 24, craftCountY + 12 - 100, itemSizeX, itemSizeY, itemOpacity); if (itemSno == 0) { BountiesDecorator.Paint(craftCountX, craftCountY - 100, 50f, 50f, HorizontalAlign.Left); } else if (itemSno == uint.MaxValue) { RiftCompletionDecorator.Paint(craftCountX, craftCountY - 100, 50f, 50f, HorizontalAlign.Left); } else { CraftCountDecorator.Paint(craftCountX, craftCountY - 100, 50f, 50f, HorizontalAlign.Left); } } } }
public void Draw(GameTime gameTime, SpriteBatch spriteBatch) { texture.Draw(gameTime, spriteBatch); }