File src/ChorusFrame.lua changed (mode: 100644) (index f3340f6..14b2a65) |
... |
... |
local function applyLayout(self) |
41 |
41 |
|
|
42 |
42 |
--[[ FIXME Range indicator shows false information. ]]-- |
--[[ FIXME Range indicator shows false information. ]]-- |
43 |
43 |
|
|
44 |
|
ChorusPlayerButtonHealthFrame.strategy = 'UnitClass' |
|
45 |
|
ChorusPlayerButton.menu = function() |
|
46 |
|
local offsetX = ChorusPlayerButton:GetWidth() / 2 |
|
47 |
|
local offsetY = ChorusPlayerButton:GetHeight() |
|
48 |
|
ToggleDropDownMenu(1, nil, PlayerFrameDropDown, 'ChorusPlayerButton', offsetX, offsetY) |
|
|
44 |
|
ChorusPlayerFrameHealthFrame.strategy = 'UnitClass' |
|
45 |
|
ChorusPlayerFrameSecureUnitButton.menu = function() |
|
46 |
|
local offsetX = ChorusPlayerFrame:GetWidth() / 2 |
|
47 |
|
local offsetY = ChorusPlayerFrame:GetHeight() |
|
48 |
|
ToggleDropDownMenu(1, nil, PlayerFrameDropDown, 'ChorusPlayerFrame', offsetX, offsetY) |
49 |
49 |
end |
end |
50 |
50 |
|
|
51 |
51 |
local focuscastModifier = GetModifiedClick('FOCUSCAST') |
local focuscastModifier = GetModifiedClick('FOCUSCAST') |
52 |
52 |
if focuscastModifier and 'NONE' ~= focuscastModifier then |
if focuscastModifier and 'NONE' ~= focuscastModifier then |
53 |
53 |
local key = string.lower(focuscastModifier) .. '-type1' |
local key = string.lower(focuscastModifier) .. '-type1' |
54 |
|
ChorusPlayerButton:SetAttribute(key, 'focus') |
|
55 |
|
ChorusTargetButton:SetAttribute(key, 'focus') |
|
|
54 |
|
ChorusPlayerFrameSecureUnitButton:SetAttribute(key, 'focus') |
|
55 |
|
ChorusTargetFrameSecureUnitButton:SetAttribute(key, 'focus') |
56 |
56 |
end |
end |
57 |
57 |
|
|
58 |
|
ChorusFocusButtonHealthFrame.strategy = 'UnitIsFriend' |
|
59 |
|
ChorusFocusButtonUnitNameFrame.strategy = 'UnitClass' |
|
|
58 |
|
ChorusFocusFrameHealthFrame.strategy = 'UnitIsFriend' |
|
59 |
|
ChorusFocusFrameUnitNameFrame.strategy = 'UnitClass' |
60 |
60 |
|
|
61 |
|
ChorusTargetButtonHealthFrame.strategy = 'UnitIsFriend' |
|
62 |
|
ChorusTargetButtonUnitNameFrame.strategy = 'UnitClass' |
|
|
61 |
|
ChorusTargetFrameHealthFrame.strategy = 'UnitIsFriend' |
|
62 |
|
ChorusTargetFrameUnitNameFrame.strategy = 'UnitClass' |
63 |
63 |
|
|
64 |
64 |
--[[ FIXME Selecting "Set focus" option in the context menu for Chorus |
--[[ FIXME Selecting "Set focus" option in the context menu for Chorus |
65 |
65 |
unit button results in permission violation exception (restricted |
unit button results in permission violation exception (restricted |
66 |
66 |
execution environment issue). ]]-- |
execution environment issue). ]]-- |
67 |
67 |
|
|
68 |
|
ChorusTargetButton.menu = function() |
|
69 |
|
local offsetX = ChorusTargetButton:GetWidth() / 2 |
|
70 |
|
local offsetY = ChorusTargetButton:GetHeight() |
|
71 |
|
ToggleDropDownMenu(1, nil, TargetFrameDropDown, 'ChorusTargetButton', offsetX, offsetY) |
|
|
68 |
|
ChorusTargetFrameSecureUnitButton.menu = function() |
|
69 |
|
local offsetX = ChorusTargetFrame:GetWidth() / 2 |
|
70 |
|
local offsetY = ChorusTargetFrame:GetHeight() |
|
71 |
|
ToggleDropDownMenu(1, nil, TargetFrameDropDown, 'ChorusTargetFrame', offsetX, offsetY) |
72 |
72 |
end |
end |
73 |
73 |
|
|
74 |
|
ChorusFocusButton.menu = function() |
|
75 |
|
local offsetX = ChorusFocusButton:GetWidth() / 2 |
|
76 |
|
local offsetY = ChorusFocusButton:GetHeight() |
|
77 |
|
ToggleDropDownMenu(1, nil, FocusFrameDropDown, 'ChorusFocusButton', offsetX, offsetY) |
|
|
74 |
|
ChorusFocusFrameSecureUnitButton.menu = function() |
|
75 |
|
local offsetX = ChorusFocusFrame:GetWidth() / 2 |
|
76 |
|
local offsetY = ChorusFocusFrame:GetHeight() |
|
77 |
|
ToggleDropDownMenu(1, nil, FocusFrameDropDown, 'ChorusFocusFrame', offsetX, offsetY) |
78 |
78 |
end |
end |
79 |
79 |
|
|
80 |
80 |
--[[ NOTE The menu functions are equivalent of PlayerFrame.menu and |
--[[ NOTE The menu functions are equivalent of PlayerFrame.menu and |
File src/ChorusFrame.xml changed (mode: 100644) (index 91d2f28..810ba27) |
2 |
2 |
<Ui xmlns="http://www.blizzard.com/wow/ui/"> |
<Ui xmlns="http://www.blizzard.com/wow/ui/"> |
3 |
3 |
<Script file="ChorusFrame.lua"/> |
<Script file="ChorusFrame.lua"/> |
4 |
4 |
<Frame name="ChorusFrame"> |
<Frame name="ChorusFrame"> |
5 |
|
<!-- TODO Add back disabling of native frames. |
|
6 |
5 |
<Scripts> |
<Scripts> |
7 |
6 |
<OnLoad>Chorus.chorusFrameMain(self);</OnLoad> |
<OnLoad>Chorus.chorusFrameMain(self);</OnLoad> |
8 |
7 |
</Scripts> |
</Scripts> |
9 |
|
--> |
|
10 |
8 |
</Frame> |
</Frame> |
11 |
9 |
<!-- TODO Toggle unit frame visibility when units update. --> |
<!-- TODO Toggle unit frame visibility when units update. --> |
12 |
|
<Frame name="ChorusHugePlayerFrame" inherits="ChorusHugeUnitFrameTemplate"> |
|
|
10 |
|
<Frame name="ChorusPlayerFrame" inherits="ChorusHugeUnitFrameTemplate"> |
13 |
11 |
<Anchors> |
<Anchors> |
14 |
12 |
<Anchor point="TOP"> |
<Anchor point="TOP"> |
15 |
|
<Offset x="-288" y="-100"/> |
|
|
13 |
|
<Offset x="-288" y="-64"/> |
16 |
14 |
</Anchor> |
</Anchor> |
17 |
15 |
<Anchor point="CENTER"> |
<Anchor point="CENTER"> |
18 |
16 |
<Offset x="0" y="0"/> |
<Offset x="0" y="0"/> |
|
23 |
21 |
<Attribute name="unit" type="string" value="player"/> |
<Attribute name="unit" type="string" value="player"/> |
24 |
22 |
</Attributes> |
</Attributes> |
25 |
23 |
</Frame> |
</Frame> |
26 |
|
<Frame name="ChorusHugeTargetFrame" inherits="ChorusHugeUnitFrameTemplate"> |
|
|
24 |
|
<Frame name="ChorusTargetFrame" inherits="ChorusHugeUnitFrameTemplate"> |
27 |
25 |
<Anchors> |
<Anchors> |
28 |
26 |
<Anchor point="TOP"> |
<Anchor point="TOP"> |
29 |
|
<Offset x="-288" y="-300"/> |
|
|
27 |
|
<Offset x="-288" y="-256"/> |
30 |
28 |
</Anchor> |
</Anchor> |
31 |
29 |
<Anchor point="CENTER"> |
<Anchor point="CENTER"> |
32 |
30 |
<Offset x="0" y="0"/> |
<Offset x="0" y="0"/> |
|
37 |
35 |
<Attribute name="unit" type="string" value="target"/> |
<Attribute name="unit" type="string" value="target"/> |
38 |
36 |
</Attributes> |
</Attributes> |
39 |
37 |
</Frame> |
</Frame> |
40 |
|
<Frame name="ChorusHugeFocusFrame" inherits="ChorusHugeUnitFrameTemplate"> |
|
|
38 |
|
<Frame name="ChorusFocusFrame" inherits="ChorusHugeUnitFrameTemplate"> |
41 |
39 |
<Anchors> |
<Anchors> |
42 |
40 |
<Anchor point="TOP"> |
<Anchor point="TOP"> |
43 |
|
<Offset x="288" y="-100"/> |
|
|
41 |
|
<Offset x="288" y="-64"/> |
44 |
42 |
</Anchor> |
</Anchor> |
45 |
43 |
<Anchor point="CENTER"> |
<Anchor point="CENTER"> |
46 |
44 |
<Offset x="0" y="0"/> |
<Offset x="0" y="0"/> |
|
51 |
49 |
<Attribute name="unit" type="string" value="focus"/> |
<Attribute name="unit" type="string" value="focus"/> |
52 |
50 |
</Attributes> |
</Attributes> |
53 |
51 |
</Frame> |
</Frame> |
54 |
|
<Button name="ChorusHugePlayerPetButton" inherits="ChorusSmallUnitButtonTemplate"> |
|
|
52 |
|
<Button name="ChorusPlayerPetButton" inherits="ChorusSmallUnitButtonTemplate"> |
55 |
53 |
<Anchors> |
<Anchors> |
56 |
|
<Anchor point="TOPRIGHT" relativeTo="ChorusHugePlayerFrame" relativePoint="TOPLEFT"> |
|
|
54 |
|
<Anchor point="TOPRIGHT" relativeTo="ChorusPlayerFrame" relativePoint="TOPLEFT"> |
57 |
55 |
<Offset x="-6" y="-6"/> |
<Offset x="-6" y="-6"/> |
58 |
56 |
</Anchor> |
</Anchor> |
59 |
57 |
</Anchors> |
</Anchors> |
|
61 |
59 |
<Attribute name="unit" type="string" value="pet"/> |
<Attribute name="unit" type="string" value="pet"/> |
62 |
60 |
</Attributes> |
</Attributes> |
63 |
61 |
</Button> |
</Button> |
64 |
|
<Button name="ChorusHugeTargetTargetButton" inherits="ChorusSmallUnitButtonTemplate"> |
|
|
62 |
|
<Button name="ChorusTargetTargetButton" inherits="ChorusSmallUnitButtonTemplate"> |
65 |
63 |
<Anchors> |
<Anchors> |
66 |
|
<Anchor point="TOPRIGHT" relativeTo="ChorusHugeTargetFrame" relativePoint="TOPLEFT"> |
|
|
64 |
|
<Anchor point="TOPRIGHT" relativeTo="ChorusTargetFrame" relativePoint="TOPLEFT"> |
67 |
65 |
<Offset x="-6" y="-6"/> |
<Offset x="-6" y="-6"/> |
68 |
66 |
</Anchor> |
</Anchor> |
69 |
67 |
</Anchors> |
</Anchors> |
|
71 |
69 |
<Attribute name="unit" type="string" value="targettarget"/> |
<Attribute name="unit" type="string" value="targettarget"/> |
72 |
70 |
</Attributes> |
</Attributes> |
73 |
71 |
</Button> |
</Button> |
74 |
|
<Button name="ChorusHugeFocusTargetButton" inherits="ChorusSmallUnitButtonTemplate"> |
|
|
72 |
|
<Button name="ChorusFocusTargetButton" inherits="ChorusSmallUnitButtonTemplate"> |
75 |
73 |
<Anchors> |
<Anchors> |
76 |
|
<Anchor point="TOPLEFT" relativeTo="ChorusHugeFocusFrame" relativePoint="TOPRIGHT"> |
|
|
74 |
|
<Anchor point="TOPLEFT" relativeTo="ChorusFocusFrame" relativePoint="TOPRIGHT"> |
77 |
75 |
<Offset x="6" y="-6"/> |
<Offset x="6" y="-6"/> |
78 |
76 |
</Anchor> |
</Anchor> |
79 |
77 |
</Anchors> |
</Anchors> |