Guest User

Untitled

a guest
Mar 16th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1.  
  2. event.onexit(function()
  3.     gui.clearGraphics()  --> not working without a frame advance, why?
  4.     gui.cleartext()
  5. end)
  6.  
  7. --gui.DrawNew("native")  --> useless here
  8.  
  9. while true do
  10.     gui.DrawNew("native")
  11.     -- possible arguments:
  12.     -- "native" -> all the area that gui.text can reach, including the black gaps
  13.     -- "emu" -> the game area, the scale is always the same, no matter the size of the windows of whether the AR is correct
  14.     -- keep in mind that client.SetGameExtraPadding(...) and client.SetClientExtraPadding(...) should be considered
  15.    
  16.     local xmouse = input.getmouse().X
  17.     local ymouse = input.getmouse().Y
  18.    
  19.     gui.text(0, 32, string.format("GUI.TEXT: %d, %d", xmouse, ymouse))
  20.     gui.drawText(0, 48, string.format("DRAWTEXT: %d, %d", xmouse, ymouse), "red")
  21.     gui.drawBox(0, 0, xmouse, ymouse)
  22.    
  23.     if client.ispaused() then
  24.         emu.yield()
  25.         --gui.clearGraphics()  --> not necessary, it is actually bad here
  26.         gui.cleartext() --> only affects gui.text, that would draw upon itself
  27.     else
  28.         emu.frameadvance()
  29.     end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment