Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.DAV
- {
- public class MouseCircle : BasePlugin, IInGameWorldPainter {
- public bool showCombat { get; set; }
- public float xPos { get; set; }
- public float yPos { get; set; }
- public IFont locFont { get; set; }
- public IBrush mouseBrush1 { get; set; }
- public IBrush mouseBrush2 { get; set; }
- private float screenW { get; set; }
- private float screenH { get; set; }
- public MouseCircle() {
- Enabled = true;
- }
- public override void Load(IController hud) {
- base.Load(hud);
- showCombat = false;
- xPos = 385 / 1920f;
- yPos = 10 / 1080f;
- mouseBrush1 = Hud.Render.CreateBrush(255, 255, 255, 255, 2);
- mouseBrush2 = Hud.Render.CreateBrush(255, 255, 153, 51, 2);
- locFont = Hud.Render.CreateFont("arial", 8, 200, 255, 255, 255, true, false, false);
- screenW = Hud.Window.Size.Width;
- screenH = Hud.Window.Size.Height;
- }
- public void PaintWorld(WorldLayer layer) {
- var x = Hud.Window.CursorX;
- var y = Hud.Window.CursorY;
- if (Hud.Game.IsInTown) {
- var location = "Absoulate\t" + x.ToString("F0") + "\t" + y.ToString("F0") + "\nPercent\t\t" + (x/screenW).ToString("F3") + "\t" + (y/screenH).ToString("F3");
- locFont.DrawText(location, screenW * xPos, screenH * yPos);
- }
- else if (showCombat) {
- mouseBrush1.DrawLine(x, y - 50, x, y - 30);
- mouseBrush1.DrawLine(x, y + 50, x, y + 30);
- mouseBrush1.DrawLine(x - 50, y, x - 30, y);
- mouseBrush1.DrawLine(x + 50, y, x + 30, y);
- mouseBrush2.DrawEllipse(x, y, 35, 35);
- mouseBrush2.DrawEllipse(x, y, 45, 45);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement