Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Globalization;
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.DAV
- {
- public class DAV_KeyShardPlugin : BasePlugin, IInGameTopPainter, ICustomizer {
- public float xPos { get; set; }
- public float yPos { get; set; }
- public IFont Font_Key { get; set; }
- public IFont Font_Shard { get; set; }
- public IFont Font_Space { get; set; }
- public ITexture Icon_Key { get; set; }
- public ITexture Icon_Shard { get; set; }
- public ITexture Icon_Space { get; set; }
- public DAV_KeyShardPlugin() {
- Enabled = true;
- }
- public override void Load(IController hud) {
- base.Load(hud);
- xPos = Hud.Window.Size.Width * 0.57f;
- yPos = Hud.Window.Size.Height * 0.985f;
- Font_Key = Hud.Render.CreateFont("arial", 8, 255, 102, 255, 102, true, false, true);
- Font_Shard = Hud.Render.CreateFont("arial", 8, 255, 255, 102, 102, true, false, true);
- Font_Space = Hud.Render.CreateFont("arial", 8, 255, 51, 255, 255, true, false, true);
- Icon_Key = Hud.Texture.GetTexture(1221854026);
- Icon_Shard = Hud.Texture.GetTexture(2742058);
- Icon_Space = Hud.Texture.GetTexture(4077504870);
- }
- public void PaintTopInGame(ClipState clipState) {
- if (clipState != ClipState.BeforeClip) return;
- if (Hud.Game.MapMode == MapMode.WaypointMap || Hud.Game.MapMode == MapMode.ActMap || Hud.Game.MapMode == MapMode.Map) return;
- var xref = xPos;
- var layout = Font_Key.GetTextLayout(Hud.Game.Me.Materials.GreaterRiftKeystone.ToString());
- var size = layout.Metrics.Height;
- Icon_Key.Draw(xref, yPos, size, size);
- xref += size * 1.1f;
- Font_Key.DrawText(layout, xref, yPos);
- xref += layout.Metrics.Width + 10f;
- layout = Font_Shard.GetTextLayout(Hud.Game.Me.Materials.BloodShard.ToString());
- size = layout.Metrics.Height;
- Icon_Shard.Draw(xref, yPos, size, size);
- xref += size * 1.1f;
- Font_Shard.DrawText(layout, xref, yPos);
- xref += layout.Metrics.Width + 10f;
- layout = Font_Space.GetTextLayout((Hud.Game.Me.InventorySpaceTotal - Hud.Game.InventorySpaceUsed).ToString());
- size = layout.Metrics.Height;
- Icon_Space.Draw(xref, yPos, size, size);
- xref += size * 1.1f;
- Font_Space.DrawText(layout, xref, yPos);
- }
- public void Customize() {
- Hud.TogglePlugin<BloodShardPlugin>(false);
- Hud.TogglePlugin<InventoryFreeSpacePlugin>(false);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement