Originally Posted by Duugu
As far as I know that's impossible.
The rotate animation ignores clickable areas. To be honest ... I do believe the animation ignores the parent frame itself at all and the rotation is applied to ALL of its elements (like backdrops) and childs (like textures) only.
Whatever the reason is - I couldn't find a way to rotate a clickable area.
As I wrote ... the feature is more or less broken.
[e]
I was working on a workaround for this a while ago but never finished it.
The idea was to make the frame non-clickable and to (internaly) fill the rotated frame with the required number of non-rotated invisible clickable frames each having a clickable area and to map the events to the main frame.
See this post: http://www.wowinterface.com/forums/s...light=triangle
|
It's possible to create a polynom and find if a point inside the polynom or not via an update script, but it's not worth the hassle to use it, and goes strong on the resources with fps like update speed:
Lua Code:
local x, y = -0.5, 0.5
local p = {
[1] = {x = 0, y = 0},
[2] = {x = -1, y = 0},
[3] = {x = -1, y = 1},
[4] = {x = 0, y = 1}
}
function PointInPolynom(p, x, y)
local c = false
for i = 1, #p do
local j = i + 1
if j > #p then
j = 1
end
if ((p[i].y > y) ~= (p[j].y > y)) and (x < (p[j].x - p[i].x) * (y - p[i].y) / (p[j].y - p[i].y) + p[i].x) then
c = not c
end
end
return c
end