Advertisement
zjqyf

GLQ_GRiftProgressBarRuler.cs

Apr 4th, 2018
566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. using Turbo.Plugins.Default;
  2.  
  3. namespace Turbo.Plugins.glq
  4. {
  5. public class GLQ_GRiftProgressBarRuler : BasePlugin, IInGameTopPainter
  6. {
  7. public IBrush ProgressionLineBrush { get; set; }
  8. public GLQ_GRiftProgressBarRuler()
  9. {
  10. Enabled = true;
  11. }
  12.  
  13. public override void Load(IController hud)
  14. {
  15. base.Load(hud);
  16.  
  17. ProgressionLineBrush = Hud.Render.CreateBrush(255, 125, 175, 240, 1f);
  18.  
  19. }
  20. public void PaintTopInGame(ClipState clipState)
  21. {
  22. if (clipState != ClipState.BeforeClip) return;
  23. if ((Hud.Game.SpecialArea != SpecialArea.Rift) && (Hud.Game.SpecialArea != SpecialArea.GreaterRift)) return;
  24. var percent = Hud.Game.RiftPercentage;
  25.  
  26. var ui = Hud.Render.GreaterRiftBarUiElement;
  27. var uiRect = ui.Rectangle;
  28. if (ui.Visible)
  29. {
  30.  
  31. var x = (float)(uiRect.Width / 5);
  32. var y1 = uiRect.Top;
  33. var y2 = uiRect.Top + uiRect.Height ;
  34. ProgressionLineBrush.DrawLine(uiRect.Left + x, y1, uiRect.Left + x, y2, 0);
  35. ProgressionLineBrush.DrawLine(uiRect.Left + x * 2, y1, uiRect.Left + x * 2, y2, 0);
  36. ProgressionLineBrush.DrawLine(uiRect.Left + x * 3, y1, uiRect.Left + x * 3, y2, 0);
  37. ProgressionLineBrush.DrawLine(uiRect.Left + x * 4, y1, uiRect.Left + x * 4, y2, 0);
  38. }
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement