SHARE
TWEET

Untitled

a guest May 16th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function DotaHelper.AutoMonitoringOnDrawPublic()
  2.     if not Menu.IsEnabled(DotaHelper.AutoMonitoring.Interface.Enabled) then return end
  3.     if not DotaHelper.User.Hero then return end
  4.  
  5.     local status
  6.     if Menu.IsEnabled(DotaHelper.AutoMonitoring.Enabled) then
  7.         Renderer.SetDrawColor(90, 255, 100)
  8.         status = "ON"
  9.     else
  10.         Renderer.SetDrawColor(255, 90, 100)
  11.         status = "OFF"
  12.     end
  13.  
  14.     local text_x = DotaHelper.AutoMonitoring.PosX
  15.     local text_y = DotaHelper.AutoMonitoring.PosY
  16.     Renderer.DrawText(DotaHelper.AutoMonitoring.FontMain, text_x, text_y, "[Auto Monitoring: ".. status .."]")
  17.  
  18.     if not Menu.IsEnabled(DotaHelper.AutoMonitoring.Interface.Move) then return end
  19.  
  20.     local move_x = text_x
  21.     local move_y = text_y
  22.  
  23.     local move_text = "MOVE HERE"
  24.  
  25.     Renderer.SetDrawColor(255, 115, 0)
  26.     Renderer.DrawText(DotaHelper.AutoMonitoring.FontMoved, move_x, move_y, move_text)
  27.  
  28.     local move_w, move_h = Renderer.GetTextSize(DotaHelper.AutoMonitoring.FontMoved, move_text)
  29.     if not Input.IsCursorInRect(move_x, move_y, move_w, move_h) then return end
  30.  
  31.     Renderer.SetDrawColor(255, 115, 0, 100)
  32.     Renderer.DrawFilledRect(move_x, move_y, move_w, move_h)
  33.  
  34.     if Input.IsKeyDown(Enum.ButtonCode.MOUSE_LEFT) and not ismoving then
  35.         ismoving = true
  36.         startX, startY = Input.GetCursorPos()
  37.     end
  38.  
  39.     if not Input.IsKeyDown(Enum.ButtonCode.MOUSE_LEFT) and ismoving then
  40.         ismoving = false
  41.     end
  42.  
  43.     if Input.IsKeyDown(Enum.ButtonCode.MOUSE_LEFT) and ismoving then
  44.         local w, h = Input.GetCursorPos()
  45.  
  46.         DotaHelper.AutoMonitoring.PosX = DotaHelper.AutoMonitoring.PosX - (startX - w)
  47.         DotaHelper.AutoMonitoring.PosY = DotaHelper.AutoMonitoring.PosY - (startY - h)
  48.  
  49.         Config.WriteFloat("DotaHelper", "autoMonitoring_x", DotaHelper.AutoMonitoring.PosX)
  50.         Config.WriteFloat("DotaHelper", "autoMonitoring_y", DotaHelper.AutoMonitoring.PosY)
  51.     end
  52. end
  53.  
  54. local startX, startY
  55. local ismoving = false
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top