Create Frame at the Cursor
Hello,
I'm working atm. on an AddOn and I want to create Frames at the cursor. Does someone know, how could I do it? I already tried: Code:
function ns.round(float) |
How doesn't it work?
I would think just setting the frame at the coordinates returned by GetCursorPosition() would be sufficient. What exactly are you trying to accomplish? /edit: wait a second, you're only checking the cursor location once. |
You need your RelPoint to the be "BOTTOMLEFT" of nil, which is the screen itself, otherwise your buttons are likely to draw offscreen. Also, the offsets seem to be multiplied by 100 which would throw the buttons offscreen too.
Here's a snip of a cursor-target feature of a HUD addon I was working on that managed the position of the targeting reticule. Code:
local scale,x,y=frame:GetEffectiveScale(),GetCursorPosition(); |
Quote:
Thank you very much SDPhantom. :) |
All times are GMT -6. The time now is 09:34 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI