Subject | Hash | Author | Date (UTC) |
---|---|---|---|
feat!: Add raid frame with 25 small buttons | 5bdc57423adeb4137bc796932657cf64f22ef8ad | Vladyslav Bondarenko | 2023-09-01 01:12:15 |
feat!: Add UnitSetRole backport | 1eb6a3777cb6361f57386959cdec4066715bb0a6 | Vladyslav Bondarenko | 2023-08-31 18:07:35 |
feat(build): Add separation for Cata and Wrath API | c1ec823b22648324afb48852149296f6b0612830 | Vladyslav Bondarenko | 2023-08-31 18:05:42 |
feat!: Release 0.5 | ff0038bc36df311a01b038e192c3e6b495e5c509 | Vladyslav Bondarenko | 2023-08-30 23:45:43 |
fix!: Remove old flavour of unit frames | 58d82ae1ba66bfc0acf41b97df99746a57a7a7cd | Vladyslav Bondarenko | 2023-08-30 23:38:49 |
fix: Update solo tot frames | 4204e7a2649b970d28f4b0f38f4dc60e90cd40d0 | Vladyslav Bondarenko | 2023-08-30 23:37:37 |
fix!: Update party frame to unprotected strategy | 470935eb589f7ab2fa77ae1335a194420e597340 | Vladyslav Bondarenko | 2023-08-30 22:52:34 |
fix!: Render solo status bar textures correctly | 22d89fffabad69df1e7dcf078805e3ff341c5023 | Vladyslav Bondarenko | 2023-08-30 19:14:13 |
fix!: Restore solo frame context menu popup | 0cc446f33351c8998d2359a42000f84da19defcd | Vladyslav Bondarenko | 2023-08-29 22:43:22 |
feat!: Update unit frame layout framework | 1af4c0bd53a474483d60425f2a4e40250367ecf1 | Vladyslav Bondarenko | 2023-08-29 21:20:40 |
feat: Classify rare or elite units | dd2c1f490c08a75774be085b318ebcd1b2788a2b | Vladyslav Bondarenko | 2023-08-29 21:18:49 |
feat(build): Remove cgitrc | 1e6b59264abab70e1f2fa9ae494c74d2606c060f | Vladyslav Bondarenko | 2023-08-29 14:37:03 |
feat(build): Add cgitrc | 7288f0336e36010fb92bf60479fdca3a0082ecd1 | Vladyslav Bondarenko | 2023-08-29 14:14:24 |
feat(build): Add cgitrc | ea45afc0375774c2fe6bb0a3237cfd1817529ff0 | Vladyslav Bondarenko | 2023-08-29 14:14:24 |
feat(test)!: Toggle debug mode at runtime | 23c37e3ab2eaf924f41fe51adc1e54f525222a8b | Vladyslav Bondarenko | 2023-08-29 03:41:55 |
fix: Aura tooltip is always opaque | 1f7ba009c71796093b8cfa63cb38d918b9696c79 | Vladyslav Bondarenko | 2023-08-29 01:31:40 |
fix: Adjust aura tooltip toggle button layout | fc72d10b09f44ef9ba6f2f93413a20def40c2d4a | Vladyslav Bondarenko | 2023-08-29 01:30:27 |
feat!: Add role widget | 0ac8cda6522056c8adb527ba2f144229f251f69e | Vladyslav Bondarenko | 2023-08-29 00:59:14 |
fix: Only show power bar when appropriate | 5313d1bfbf676c88b5c2a0a56fbea88549633b7b | Vladyslav Bondarenko | 2023-08-28 22:46:36 |
feat!: Toggle detailed unit aura tooltip in combat | 460c622c04a8b0fa503c2a5d45313b667809b95c | Vladyslav Bondarenko | 2023-08-28 19:26:25 |
File | Lines added | Lines deleted |
---|---|---|
chorus.toc | 1 | 1 |
etc/luacheckrc.lua | 5 | 23 |
src/Chorus.lua | 20 | 0 |
src/Chorus.xml | 3 | 0 |
src/ChorusAuraFrameTemplate.lua | 0 | 3 |
src/ChorusAuraTooltipFrameTemplate.lua | 0 | 4 |
src/ChorusAuraTooltipFrameTemplate.xml | 1 | 0 |
src/ChorusFocusFrame.xml | 27 | 0 |
src/ChorusFrame.lua | 2 | 38 |
src/ChorusFrame.xml | 0 | 73 |
src/ChorusPlayerFrame.xml | 26 | 0 |
src/ChorusProgressFrameTemplate.lua | 11 | 5 |
src/ChorusRaidFrame.lua | 31 | 0 |
src/ChorusRaidFrame.xml | 283 | 100 |
src/ChorusRaidTargetIconFrameTemplate.lua | 0 | 3 |
src/ChorusRangeFrameTemplate.lua | 0 | 2 |
src/ChorusTargetFrame.xml | 27 | 0 |
src/ChorusThreatFrameTemplate.lua | 0 | 6 |
src/ChorusUnitButtonTemplate.lua | 67 | 1 |
src/ChorusUnitNameFrameTemplate.lua | 0 | 3 |
File chorus.toc changed (mode: 100644) (index 17c662f..42980f3) | |||
2 | 2 | ##Notes: Add group frames and replace native solo frames. This is a work in progress. | ##Notes: Add group frames and replace native solo frames. This is a work in progress. |
3 | 3 | ##Title: Chorus | ##Title: Chorus |
4 | 4 | ##Version: 0.5 | ##Version: 0.5 |
5 | ##SavedVariables: ChorusUnitGroupRoleMap | ||
5 | ##SavedVariables: ChorusUnitGroupRoleMap, ChorusLuacheckrcDump | ||
6 | 6 | src\Chorus.xml | src\Chorus.xml |
File etc/luacheckrc.lua changed (mode: 100644) (index 89ade3a..1262875) | |||
... | ... | stds.framexml = { | |
110 | 110 | 'NumberFontNormalSmall', | 'NumberFontNormalSmall', |
111 | 111 | 'PartyMemberBackground', | 'PartyMemberBackground', |
112 | 112 | 'PartyMemberFrame1', | 'PartyMemberFrame1', |
113 | 'PartyMemberFrame1DropDown', | ||
113 | 114 | 'PartyMemberFrame2', | 'PartyMemberFrame2', |
115 | 'PartyMemberFrame2DropDown', | ||
114 | 116 | 'PartyMemberFrame3', | 'PartyMemberFrame3', |
117 | 'PartyMemberFrame3DropDown', | ||
115 | 118 | 'PartyMemberFrame4', | 'PartyMemberFrame4', |
119 | 'PartyMemberFrame4DropDown', | ||
116 | 120 | 'PetCastingBarFrame', | 'PetCastingBarFrame', |
117 | 121 | 'PetFrame', | 'PetFrame', |
118 | 122 | 'PetFrameHealthBar', | 'PetFrameHealthBar', |
... | ... | stds.chorus = { | |
152 | 156 | --and saves the variables to a file, to make this name set | --and saves the variables to a file, to make this name set |
153 | 157 | --exact. ]]-- | --exact. ]]-- |
154 | 158 | 'Chorus', | 'Chorus', |
155 | 'ChorusFocusButton', | ||
156 | 'ChorusFocusButtonHealthFrame', | ||
157 | 'ChorusFocusButtonUnitNameFrame', | ||
158 | 'ChorusFocusFrame', | ||
159 | 'ChorusFocusFrameHealthFrame', | ||
160 | 'ChorusFocusFrameSecureUnitButton', | ||
161 | 'ChorusFocusFrameUnitNameFrame', | ||
162 | 'ChorusFrame', | ||
163 | 'ChorusPlayerButton', | ||
164 | 'ChorusPlayerButtonHealthFrame', | ||
165 | 'ChorusPlayerButtonUnitNameFrame', | ||
166 | 'ChorusPlayerFrame', | ||
167 | 'ChorusPlayerFrameHealthFrame', | ||
168 | 'ChorusPlayerFrameSecureUnitButton', | ||
169 | 'ChorusPlayerFrameUnitNameFrame', | ||
170 | 'ChorusRaidFrame', | ||
171 | 'ChorusTargetButton', | ||
172 | 'ChorusTargetButtonHealthFrame', | ||
173 | 'ChorusTargetButtonUnitNameFrame', | ||
174 | 'ChorusTargetFrame', | ||
175 | 'ChorusTargetFrameHealthFrame', | ||
176 | 'ChorusTargetFrameSecureUnitButton', | ||
177 | 'ChorusTargetFrameUnitNameFrame', | ||
159 | 'ChorusLuacheckrcDump', | ||
178 | 160 | 'ChorusUnitGroupRoleMap', | 'ChorusUnitGroupRoleMap', |
179 | 161 | }, | }, |
180 | 162 | } | } |
File src/Chorus.lua changed (mode: 100644) (index 01b2c33..4672684) | |||
1 | 1 | Chorus = {} | Chorus = {} |
2 | |||
3 | function Chorus.luacheckrcDump() | ||
4 | if not ChorusLuacheckrcDump then | ||
5 | ChorusLuacheckrcDump = {} | ||
6 | end | ||
7 | local dump = ChorusLuacheckrcDump | ||
8 | assert(dump ~= nil) | ||
9 | assert('table' == type(dump)) | ||
10 | local i = 0 | ||
11 | for name, e in pairs(_G) do | ||
12 | local y = type(e) | ||
13 | if string.match(name, 'Chorus') then | ||
14 | if ('function' == y or 'table' == y) then | ||
15 | i = i + 1 | ||
16 | dump[i] = name | ||
17 | end | ||
18 | end | ||
19 | end | ||
20 | table.sort(dump) | ||
21 | end |
File src/Chorus.xml changed (mode: 100644) (index 94fb0cf..f48f721) | |||
28 | 28 | <Include file="ChorusTinyUnitFrameTemplate.xml"/> | <Include file="ChorusTinyUnitFrameTemplate.xml"/> |
29 | 29 | <Include file="ChorusPartyFrame.xml"/> | <Include file="ChorusPartyFrame.xml"/> |
30 | 30 | <Include file="ChorusRaidFrame.xml"/> | <Include file="ChorusRaidFrame.xml"/> |
31 | <Include file="ChorusPlayerFrame.xml"/> | ||
32 | <Include file="ChorusTargetFrame.xml"/> | ||
33 | <Include file="ChorusFocusFrame.xml"/> | ||
31 | 34 | <Include file="ChorusFrame.xml"/> | <Include file="ChorusFrame.xml"/> |
32 | 35 | </Ui> | </Ui> |
File src/ChorusAuraFrameTemplate.lua changed (mode: 100644) (index 1fda74b..ee57294) | |||
... | ... | local UnitAura = Chorus.test.UnitAura or UnitAura | |
4 | 4 | local UnitExists = Chorus.test.UnitExists or UnitExists | local UnitExists = Chorus.test.UnitExists or UnitExists |
5 | 5 | local UnitIsConnected = Chorus.test.UnitIsConnected or UnitIsConnected | local UnitIsConnected = Chorus.test.UnitIsConnected or UnitIsConnected |
6 | 6 | ||
7 | local RegisterUnitWatch = Chorus.test.RegisterUnitWatch or RegisterUnitWatch | ||
8 | 7 | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit |
9 | 8 | ||
10 | 9 | --[[ See `FrameXML/BuffFrame.lua:BUFF_MAX_DISPLAY`. ]]-- | --[[ See `FrameXML/BuffFrame.lua:BUFF_MAX_DISPLAY`. ]]-- |
... | ... | function Chorus.auraFrameMain(self) | |
246 | 245 | self:RegisterEvent('UNIT_AURA') | self:RegisterEvent('UNIT_AURA') |
247 | 246 | ||
248 | 247 | self:SetScript('OnEvent', auraFrameEventProcessor) | self:SetScript('OnEvent', auraFrameEventProcessor) |
249 | |||
250 | RegisterUnitWatch(self) | ||
251 | 248 | end | end |
File src/ChorusAuraTooltipFrameTemplate.lua changed (mode: 100644) (index 48c13f6..bf93574) | |||
... | ... | local Chorus = Chorus | |
2 | 2 | ||
3 | 3 | local strtrim = strtrim | local strtrim = strtrim |
4 | 4 | ||
5 | local RegisterUnitWatch = Chorus.test.RegisterUnitWatch or RegisterUnitWatch | ||
6 | |||
7 | 5 | local function auraTooltipToggleButtonMain(self) | local function auraTooltipToggleButtonMain(self) |
8 | 6 | assert(self ~= nil) | assert(self ~= nil) |
9 | 7 | ||
... | ... | local function auraTooltipToggleButtonMain(self) | |
36 | 34 | return | return |
37 | 35 | end | end |
38 | 36 | ]=]); | ]=]); |
39 | |||
40 | RegisterUnitWatch(self) | ||
41 | 37 | end | end |
42 | 38 | ||
43 | 39 | local function auraTooltipFrameMain(self) | local function auraTooltipFrameMain(self) |
File src/ChorusAuraTooltipFrameTemplate.xml changed (mode: 100644) (index 8d6e954..c33f474) | |||
97 | 97 | <OnLoad>Chorus.auraTooltipToggleButtonMain(self);</OnLoad> | <OnLoad>Chorus.auraTooltipToggleButtonMain(self);</OnLoad> |
98 | 98 | </Scripts> | </Scripts> |
99 | 99 | <Attributes> | <Attributes> |
100 | <!-- FIXME Use keyType `global' for the frame reference to the tooltip. --> | ||
100 | 101 | <Attribute name="useparent-unit" type="boolean" value="true"/> | <Attribute name="useparent-unit" type="boolean" value="true"/> |
101 | 102 | </Attributes> | </Attributes> |
102 | 103 | </Button> | </Button> |
File src/ChorusFocusFrame.xml added (mode: 100644) (index 0000000..910a399) | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <Ui xmlns="http://www.blizzard.com/wow/ui/"> | ||
3 | <Frame name="ChorusFocusFrame" inherits="ChorusHugeUnitFrameTemplate"> | ||
4 | <Anchors> | ||
5 | <Anchor point="TOP"> | ||
6 | <Offset x="288" y="-64"/> | ||
7 | </Anchor> | ||
8 | <Anchor point="CENTER"> | ||
9 | <Offset x="0" y="0"/> | ||
10 | </Anchor> | ||
11 | </Anchors> | ||
12 | <Attributes> | ||
13 | <!-- TODO Add back context menu popup on right click. --> | ||
14 | <Attribute name="unit" type="string" value="focus"/> | ||
15 | </Attributes> | ||
16 | </Frame> | ||
17 | <Frame name="ChorusFocusTargetButton" inherits="ChorusSmallUnitFrameTemplate,ChorusTOTUnitFrameTemplate"> | ||
18 | <Anchors> | ||
19 | <Anchor point="TOPLEFT" relativeTo="ChorusFocusFrame" relativePoint="TOPRIGHT"> | ||
20 | <Offset x="6" y="-6"/> | ||
21 | </Anchor> | ||
22 | </Anchors> | ||
23 | <Attributes> | ||
24 | <Attribute name="unit" type="string" value="focustarget"/> | ||
25 | </Attributes> | ||
26 | </Frame> | ||
27 | </Ui> |
File src/ChorusFrame.lua changed (mode: 100644) (index 14b2a65..41613fb) | |||
... | ... | local function applyLayout(self) | |
39 | 39 | self:UnregisterAllEvents(); | self:UnregisterAllEvents(); |
40 | 40 | self:SetScript('OnEvent', nil) | self:SetScript('OnEvent', nil) |
41 | 41 | ||
42 | --[[ FIXME Range indicator shows false information. ]]-- | ||
43 | |||
44 | 42 | ChorusPlayerFrameHealthFrame.strategy = 'UnitClass' | 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 | end | ||
50 | |||
51 | local focuscastModifier = GetModifiedClick('FOCUSCAST') | ||
52 | if focuscastModifier and 'NONE' ~= focuscastModifier then | ||
53 | local key = string.lower(focuscastModifier) .. '-type1' | ||
54 | ChorusPlayerFrameSecureUnitButton:SetAttribute(key, 'focus') | ||
55 | ChorusTargetFrameSecureUnitButton:SetAttribute(key, 'focus') | ||
56 | end | ||
57 | |||
58 | 43 | ChorusFocusFrameHealthFrame.strategy = 'UnitIsFriend' | ChorusFocusFrameHealthFrame.strategy = 'UnitIsFriend' |
59 | 44 | ChorusFocusFrameUnitNameFrame.strategy = 'UnitClass' | ChorusFocusFrameUnitNameFrame.strategy = 'UnitClass' |
60 | 45 | ||
61 | 46 | ChorusTargetFrameHealthFrame.strategy = 'UnitIsFriend' | ChorusTargetFrameHealthFrame.strategy = 'UnitIsFriend' |
62 | 47 | ChorusTargetFrameUnitNameFrame.strategy = 'UnitClass' | ChorusTargetFrameUnitNameFrame.strategy = 'UnitClass' |
63 | 48 | ||
64 | --[[ FIXME Selecting "Set focus" option in the context menu for Chorus | ||
65 | unit button results in permission violation exception (restricted | ||
66 | execution environment issue). ]]-- | ||
67 | |||
68 | ChorusTargetFrameSecureUnitButton.menu = function() | ||
69 | local offsetX = ChorusTargetFrame:GetWidth() / 2 | ||
70 | local offsetY = ChorusTargetFrame:GetHeight() | ||
71 | ToggleDropDownMenu(1, nil, TargetFrameDropDown, 'ChorusTargetFrame', offsetX, offsetY) | ||
72 | end | ||
73 | |||
74 | ChorusFocusFrameSecureUnitButton.menu = function() | ||
75 | local offsetX = ChorusFocusFrame:GetWidth() / 2 | ||
76 | local offsetY = ChorusFocusFrame:GetHeight() | ||
77 | ToggleDropDownMenu(1, nil, FocusFrameDropDown, 'ChorusFocusFrame', offsetX, offsetY) | ||
78 | end | ||
79 | |||
80 | --[[ NOTE The menu functions are equivalent of PlayerFrame.menu and | ||
81 | TargetFrame.menu. It is possible to use them direcctly. THe only | ||
82 | quirk is that the context menu will be displayed at the display point | ||
83 | of the native unit frames. Hence, the need to define separate menu | ||
84 | functions. ]]-- | ||
85 | 49 | end | end |
86 | 50 | ||
87 | 51 | local function chorusFrameMain(self) | local function chorusFrameMain(self) |
88 | 52 | --[[ Wait for the game to finish loading completely, only then apply | --[[ Wait for the game to finish loading completely, only then apply |
89 | 53 | changes. ]]-- | changes. ]]-- |
90 | 54 | ||
91 | --[[ TODO Add pet buttons. ]]-- | ||
55 | self:SetScript('OnEvent', applyLayout) | ||
92 | 56 | ||
93 | self:RegisterEvent('PLAYER_LOGIN'); self:SetScript('OnEvent', applyLayout) | ||
57 | self:RegisterEvent('PLAYER_LOGIN'); | ||
94 | 58 | ||
95 | 59 | disableNativeFrames() | disableNativeFrames() |
96 | 60 | end | end |
File src/ChorusFrame.xml changed (mode: 100644) (index 53ce6ef..0638993) | |||
6 | 6 | <OnLoad>Chorus.chorusFrameMain(self);</OnLoad> | <OnLoad>Chorus.chorusFrameMain(self);</OnLoad> |
7 | 7 | </Scripts> | </Scripts> |
8 | 8 | </Frame> | </Frame> |
9 | <!-- TODO Toggle unit frame visibility when units update. --> | ||
10 | <Frame name="ChorusPlayerFrame" inherits="ChorusHugeUnitFrameTemplate"> | ||
11 | <Anchors> | ||
12 | <Anchor point="TOP"> | ||
13 | <Offset x="-288" y="-64"/> | ||
14 | </Anchor> | ||
15 | <Anchor point="CENTER"> | ||
16 | <Offset x="0" y="0"/> | ||
17 | </Anchor> | ||
18 | </Anchors> | ||
19 | <Attributes> | ||
20 | <!-- TODO Add back player context menu popup on right click. --> | ||
21 | <Attribute name="unit" type="string" value="player"/> | ||
22 | </Attributes> | ||
23 | </Frame> | ||
24 | <Frame name="ChorusTargetFrame" inherits="ChorusHugeUnitFrameTemplate"> | ||
25 | <Anchors> | ||
26 | <Anchor point="TOP"> | ||
27 | <Offset x="-288" y="-256"/> | ||
28 | </Anchor> | ||
29 | <Anchor point="CENTER"> | ||
30 | <Offset x="0" y="0"/> | ||
31 | </Anchor> | ||
32 | </Anchors> | ||
33 | <Attributes> | ||
34 | <!-- TODO Add back target context menu popup on right click. --> | ||
35 | <Attribute name="unit" type="string" value="target"/> | ||
36 | </Attributes> | ||
37 | </Frame> | ||
38 | <Frame name="ChorusFocusFrame" inherits="ChorusHugeUnitFrameTemplate"> | ||
39 | <Anchors> | ||
40 | <Anchor point="TOP"> | ||
41 | <Offset x="288" y="-64"/> | ||
42 | </Anchor> | ||
43 | <Anchor point="CENTER"> | ||
44 | <Offset x="0" y="0"/> | ||
45 | </Anchor> | ||
46 | </Anchors> | ||
47 | <Attributes> | ||
48 | <!-- TODO Add back context menu popup on right click. --> | ||
49 | <Attribute name="unit" type="string" value="focus"/> | ||
50 | </Attributes> | ||
51 | </Frame> | ||
52 | <Frame name="ChorusPlayerPetButton" inherits="ChorusSmallUnitFrameTemplate"> | ||
53 | <Anchors> | ||
54 | <Anchor point="TOPRIGHT" relativeTo="ChorusPlayerFrame" relativePoint="TOPLEFT"> | ||
55 | <Offset x="-6" y="-6"/> | ||
56 | </Anchor> | ||
57 | </Anchors> | ||
58 | <Attributes> | ||
59 | <Attribute name="unit" type="string" value="pet"/> | ||
60 | </Attributes> | ||
61 | </Frame> | ||
62 | <Frame name="ChorusTargetTargetButton" inherits="ChorusSmallUnitFrameTemplate,ChorusTOTUnitFrameTemplate"> | ||
63 | <Anchors> | ||
64 | <Anchor point="TOPRIGHT" relativeTo="ChorusTargetFrame" relativePoint="TOPLEFT"> | ||
65 | <Offset x="-6" y="-6"/> | ||
66 | </Anchor> | ||
67 | </Anchors> | ||
68 | <Attributes> | ||
69 | <Attribute name="unit" type="string" value="targettarget"/> | ||
70 | </Attributes> | ||
71 | </Frame> | ||
72 | <Frame name="ChorusFocusTargetButton" inherits="ChorusSmallUnitFrameTemplate,ChorusTOTUnitFrameTemplate"> | ||
73 | <Anchors> | ||
74 | <Anchor point="TOPLEFT" relativeTo="ChorusFocusFrame" relativePoint="TOPRIGHT"> | ||
75 | <Offset x="6" y="-6"/> | ||
76 | </Anchor> | ||
77 | </Anchors> | ||
78 | <Attributes> | ||
79 | <Attribute name="unit" type="string" value="focustarget"/> | ||
80 | </Attributes> | ||
81 | </Frame> | ||
82 | 9 | </Ui> | </Ui> |
File src/ChorusPlayerFrame.xml added (mode: 100644) (index 0000000..465b498) | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <Ui xmlns="http://www.blizzard.com/wow/ui/"> | ||
3 | <Frame name="ChorusPlayerFrame" inherits="ChorusHugeUnitFrameTemplate"> | ||
4 | <Anchors> | ||
5 | <Anchor point="TOP"> | ||
6 | <Offset x="-288" y="-64"/> | ||
7 | </Anchor> | ||
8 | <Anchor point="CENTER"> | ||
9 | <Offset x="0" y="0"/> | ||
10 | </Anchor> | ||
11 | </Anchors> | ||
12 | <Attributes> | ||
13 | <Attribute name="unit" type="string" value="player"/> | ||
14 | </Attributes> | ||
15 | </Frame> | ||
16 | <Frame name="ChorusPlayerPetButton" inherits="ChorusSmallUnitFrameTemplate"> | ||
17 | <Anchors> | ||
18 | <Anchor point="TOPRIGHT" relativeTo="ChorusPlayerFrame" relativePoint="TOPLEFT"> | ||
19 | <Offset x="-6" y="-6"/> | ||
20 | </Anchor> | ||
21 | </Anchors> | ||
22 | <Attributes> | ||
23 | <Attribute name="unit" type="string" value="pet"/> | ||
24 | </Attributes> | ||
25 | </Frame> | ||
26 | </Ui> |
File src/ChorusProgressFrameTemplate.lua changed (mode: 100644) (index 4ee1956..3af285f) | |||
... | ... | local UnitPowerType = Chorus.test.UnitPowerType or UnitPowerType | |
15 | 15 | ||
16 | 16 | local PowerBarColor = PowerBarColor | local PowerBarColor = PowerBarColor |
17 | 17 | local RAID_CLASS_COLORS = RAID_CLASS_COLORS | local RAID_CLASS_COLORS = RAID_CLASS_COLORS |
18 | local RegisterUnitWatch = Chorus.test.RegisterUnitWatch or RegisterUnitWatch | ||
19 | 18 | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit |
20 | 19 | ||
21 | 20 | local function validateProgressFrame(self) | local function validateProgressFrame(self) |
... | ... | local function validateProgressFrame(self) | |
40 | 39 | end | end |
41 | 40 | ||
42 | 41 | local function getRatio(a, b) | local function getRatio(a, b) |
42 | if not a or not b then | ||
43 | return 0 | ||
44 | end | ||
45 | |||
43 | 46 | assert(a ~= nil) | assert(a ~= nil) |
44 | 47 | assert('number' == type(a)) | assert('number' == type(a)) |
45 | 48 | assert(a >= 0) | assert(a >= 0) |
46 | 49 | ||
50 | if a <= 0 or b <= 0 then | ||
51 | return 0 | ||
52 | end | ||
53 | |||
47 | 54 | assert(b ~= nil) | assert(b ~= nil) |
48 | 55 | assert('number' == type(b)) | assert('number' == type(b)) |
49 | 56 | assert(b > 0) | assert(b > 0) |
... | ... | local function applyOverlay(self, a, b) | |
109 | 116 | b = math.max(b, 1) | b = math.max(b, 1) |
110 | 117 | assert(b > 0) | assert(b > 0) |
111 | 118 | ||
119 | if a > b then | ||
120 | return | ||
121 | end | ||
112 | 122 | assert(a <= b) | assert(a <= b) |
113 | 123 | ||
114 | 124 | local ratio = getRatio(a, b) | local ratio = getRatio(a, b) |
... | ... | function Chorus.healthFrameMain(self, ...) | |
502 | 512 | self:SetScript('OnEvent', healthFrameEventProcessor) | self:SetScript('OnEvent', healthFrameEventProcessor) |
503 | 513 | ||
504 | 514 | self:RegisterEvent('UNIT_HEALTH') | self:RegisterEvent('UNIT_HEALTH') |
505 | |||
506 | --[[ When the corresponding unit's state is changed, toggle this | ||
507 | frame's visibility with show or hide methods accordingly.]]-- | ||
508 | RegisterUnitWatch(self) | ||
509 | 515 | end | end |
510 | 516 | ||
511 | 517 | function Chorus.powerFrameMain(self, ...) | function Chorus.powerFrameMain(self, ...) |
File src/ChorusRaidFrame.lua added (mode: 100644) (index 0000000..10dfe51) | |||
1 | local Chorus = Chorus | ||
2 | |||
3 | local UnitInRaid = Chorus.test.UnitInRaid or UnitInRaid | ||
4 | |||
5 | local function raidFrameEventProcessor(self) | ||
6 | assert(self ~= nil) | ||
7 | |||
8 | if UnitInRaid('player') then | ||
9 | self:Show() | ||
10 | else | ||
11 | self:Hide() | ||
12 | end | ||
13 | end | ||
14 | |||
15 | local function raidFrameMain(self) | ||
16 | assert(self ~= nil) | ||
17 | |||
18 | self:SetScript('OnEvent', raidFrameEventProcessor) | ||
19 | |||
20 | self:RegisterEvent('PARTY_CONVERTED_TO_RAID') | ||
21 | self:RegisterEvent('PARTY_LEADER_CHANGED') | ||
22 | self:RegisterEvent('PARTY_MEMBERS_CHANGED') | ||
23 | self:RegisterEvent('PARTY_MEMBER_DISABLE') | ||
24 | self:RegisterEvent('PARTY_MEMBER_ENABLE') | ||
25 | self:RegisterEvent('PLAYER_LOGIN') | ||
26 | self:RegisterEvent('RAID_ROSTER_UPDATE') | ||
27 | end | ||
28 | |||
29 | Chorus.raidFrameMain = function(...) | ||
30 | return raidFrameMain(...) | ||
31 | end |
File src/ChorusRaidFrame.xml changed (mode: 100644) (index 885d1ee..4da69d3) | |||
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <Ui xmlns="http://www.blizzard.com/wow/ui/"> | <Ui xmlns="http://www.blizzard.com/wow/ui/"> |
3 | <Frame name="ChorusRaidFrameGroupFrameTemplate" inherits="SecureRaidGroupHeaderTemplate" virtual="true" hidden="false"> | ||
3 | <Script file="ChorusRaidFrame.lua"/> | ||
4 | <Frame name="ChorusSmallRaidUnitFrameTemplate" inherits="ChorusSmallUnitFrameTemplate,ChorusMemberUnitFrameTemplate" virtual="true"/> | ||
5 | <Frame name="ChorusRaidFrame" hidden="true"> | ||
4 | 6 | <Size> | <Size> |
5 | <AbsDimension x="1024" y="128"/> | ||
6 | </Size> | ||
7 | <Attributes> | ||
8 | <Attribute name="columnAnchorPoint" type="string" value="LEFT"/> | ||
9 | <Attribute name="groupBy" type="string" value="GROUP"/> | ||
10 | <Attribute name="groupFilter" type="number" value="1"/> | ||
11 | <Attribute name="groupingOrder" type="string" value="1,2,3,4,5,6,7,8"/> | ||
12 | <Attribute name="maxColumns" type="number" value="5"/> | ||
13 | <Attribute name="template" type="string" value="ChorusLargeUnitFrameTemplate,SecureFrameTemplate"/> | ||
14 | <Attribute name="unitsPerColumn" type="number" value="1"/> | ||
15 | <Attribute name="columnSpacing" type="number" value="12"/> | ||
16 | </Attributes> | ||
17 | </Frame> | ||
18 | <Frame name="ChorusRaidFrame"> | ||
19 | <Size> | ||
20 | <AbsDimension x="1024" y="512"/> | ||
7 | <AbsDimension x="500" y="400"/> | ||
21 | 8 | </Size> | </Size> |
22 | 9 | <Anchors> | <Anchors> |
23 | <Anchor point="TOPLEFT"> | ||
10 | <Anchor point="CENTER"> | ||
24 | 11 | <Offset> | <Offset> |
25 | <AbsDimension x="0" y="-360"/> | ||
12 | <AbsDimension x="0" y="0"/> | ||
26 | 13 | </Offset> | </Offset> |
27 | 14 | </Anchor> | </Anchor> |
28 | 15 | </Anchors> | </Anchors> |
16 | <Scripts> | ||
17 | <OnLoad>Chorus.raidFrameMain(self);</OnLoad> | ||
18 | </Scripts> | ||
29 | 19 | <Frames> | <Frames> |
30 | <Frame name="$parentGroupFrame1" inherits="ChorusRaidFrameGroupFrameTemplate" id="1"> | ||
20 | <!-- Row 1 --> | ||
21 | <Frame name="ChorusRaidFrame1" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
22 | <Anchors> | ||
23 | <Anchor point="BOTTOMLEFT"> | ||
24 | <Offset> | ||
25 | <AbsDimension x="0" y="0"/> | ||
26 | </Offset> | ||
27 | </Anchor> | ||
28 | </Anchors> | ||
29 | <Attributes> | ||
30 | <Attribute name="unit" type="string" value="raid1"/> | ||
31 | </Attributes> | ||
32 | </Frame> | ||
33 | <Frame name="ChorusRaidFrame2" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
34 | <Anchors> | ||
35 | <Anchor point="BOTTOMLEFT"> | ||
36 | <Offset> | ||
37 | <AbsDimension x="100" y="0"/> | ||
38 | </Offset> | ||
39 | </Anchor> | ||
40 | </Anchors> | ||
41 | <Attributes> | ||
42 | <Attribute name="unit" type="string" value="raid2"/> | ||
43 | </Attributes> | ||
44 | </Frame> | ||
45 | <Frame name="ChorusRaidFrame3" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
46 | <Anchors> | ||
47 | <Anchor point="BOTTOMLEFT"> | ||
48 | <Offset> | ||
49 | <AbsDimension x="200" y="0"/> | ||
50 | </Offset> | ||
51 | </Anchor> | ||
52 | </Anchors> | ||
53 | <Attributes> | ||
54 | <Attribute name="unit" type="string" value="raid3"/> | ||
55 | </Attributes> | ||
56 | </Frame> | ||
57 | <Frame name="ChorusRaidFrame4" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
58 | <Anchors> | ||
59 | <Anchor point="BOTTOMLEFT"> | ||
60 | <Offset> | ||
61 | <AbsDimension x="300" y="0"/> | ||
62 | </Offset> | ||
63 | </Anchor> | ||
64 | </Anchors> | ||
65 | <Attributes> | ||
66 | <Attribute name="unit" type="string" value="raid4"/> | ||
67 | </Attributes> | ||
68 | </Frame> | ||
69 | <Frame name="ChorusRaidFrame5" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
70 | <Anchors> | ||
71 | <Anchor point="BOTTOMLEFT"> | ||
72 | <Offset> | ||
73 | <AbsDimension x="400" y="0"/> | ||
74 | </Offset> | ||
75 | </Anchor> | ||
76 | </Anchors> | ||
77 | <Attributes> | ||
78 | <Attribute name="unit" type="string" value="raid5"/> | ||
79 | </Attributes> | ||
80 | </Frame> | ||
81 | <!-- Row 2 --> | ||
82 | <Frame name="ChorusRaidFrame6" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
83 | <Anchors> | ||
84 | <Anchor point="BOTTOMLEFT"> | ||
85 | <Offset> | ||
86 | <AbsDimension x="0" y="100"/> | ||
87 | </Offset> | ||
88 | </Anchor> | ||
89 | </Anchors> | ||
90 | <Attributes> | ||
91 | <Attribute name="unit" type="string" value="raid6"/> | ||
92 | </Attributes> | ||
93 | </Frame> | ||
94 | <Frame name="ChorusRaidFrame7" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
31 | 95 | <Anchors> | <Anchors> |
32 | <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="BOTTOMLEFT"> | ||
33 | <Offset> | ||
34 | <AbsDimension x="0" y="0"/> | ||
35 | </Offset> | ||
36 | </Anchor> | ||
37 | </Anchors> | ||
96 | <Anchor point="BOTTOMLEFT"> | ||
97 | <Offset> | ||
98 | <AbsDimension x="100" y="100"/> | ||
99 | </Offset> | ||
100 | </Anchor> | ||
101 | </Anchors> | ||
38 | 102 | <Attributes> | <Attributes> |
39 | <Attribute name="groupFilter" type="number" value="1"/> | ||
40 | <!-- Given raid show first raid group, given party show party. --> | ||
41 | <!-- Do not show party in raid. --> | ||
42 | <!-- Do not show player in party. --> | ||
43 | <Attribute name="showParty" type="boolean" value="false"/> | ||
44 | <Attribute name="showPlayer" type="boolean" value="false"/> | ||
45 | <Attribute name="showSolo" type="boolean" value="false"/> | ||
103 | <Attribute name="unit" type="string" value="raid7"/> | ||
46 | 104 | </Attributes> | </Attributes> |
47 | 105 | </Frame> | </Frame> |
48 | <Frame name="$parentGroupFrame2" inherits="ChorusRaidFrameGroupFrameTemplate" id="2"> | ||
106 | <Frame name="ChorusRaidFrame8" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
49 | 107 | <Anchors> | <Anchors> |
50 | <Anchor point="BOTTOMLEFT" relativeTo="$parentGroupFrame1" relativePoint="TOPLEFT"> | ||
51 | <Offset> | ||
52 | <AbsDimension x="0" y="0"/> | ||
53 | </Offset> | ||
54 | </Anchor> | ||
55 | </Anchors> | ||
108 | <Anchor point="BOTTOMLEFT"> | ||
109 | <Offset> | ||
110 | <AbsDimension x="200" y="100"/> | ||
111 | </Offset> | ||
112 | </Anchor> | ||
113 | </Anchors> | ||
56 | 114 | <Attributes> | <Attributes> |
57 | <Attribute name="groupFilter" type="number" value="2"/> | ||
115 | <Attribute name="unit" type="string" value="raid8"/> | ||
58 | 116 | </Attributes> | </Attributes> |
59 | 117 | </Frame> | </Frame> |
60 | <Frame name="$parentGroupFrame3" inherits="ChorusRaidFrameGroupFrameTemplate" id="3"> | ||
118 | <Frame name="ChorusRaidFrame9" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
61 | 119 | <Anchors> | <Anchors> |
62 | <Anchor point="BOTTOMLEFT" relativeTo="$parentGroupFrame2" relativePoint="TOPLEFT"> | ||
63 | <Offset> | ||
64 | <AbsDimension x="0" y="0"/> | ||
65 | </Offset> | ||
66 | </Anchor> | ||
67 | </Anchors> | ||
120 | <Anchor point="BOTTOMLEFT"> | ||
121 | <Offset> | ||
122 | <AbsDimension x="300" y="100"/> | ||
123 | </Offset> | ||
124 | </Anchor> | ||
125 | </Anchors> | ||
68 | 126 | <Attributes> | <Attributes> |
69 | <Attribute name="groupFilter" type="number" value="3"/> | ||
127 | <Attribute name="unit" type="string" value="raid9"/> | ||
70 | 128 | </Attributes> | </Attributes> |
71 | 129 | </Frame> | </Frame> |
72 | <Frame name="$parentGroupFrame4" inherits="ChorusRaidFrameGroupFrameTemplate" id="4"> | ||
130 | <Frame name="ChorusRaidFrame10" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
73 | 131 | <Anchors> | <Anchors> |
74 | <Anchor point="BOTTOMLEFT" relativeTo="$parentGroupFrame3" relativePoint="TOPLEFT"> | ||
75 | <Offset> | ||
76 | <AbsDimension x="0" y="0"/> | ||
77 | </Offset> | ||
78 | </Anchor> | ||
79 | </Anchors> | ||
132 | <Anchor point="BOTTOMLEFT"> | ||
133 | <Offset> | ||
134 | <AbsDimension x="400" y="100"/> | ||
135 | </Offset> | ||
136 | </Anchor> | ||
137 | </Anchors> | ||
80 | 138 | <Attributes> | <Attributes> |
81 | <Attribute name="groupFilter" type="number" value="4"/> | ||
139 | <Attribute name="unit" type="string" value="raid10"/> | ||
82 | 140 | </Attributes> | </Attributes> |
83 | 141 | </Frame> | </Frame> |
84 | <Frame name="$parentGroupFrame5" inherits="ChorusRaidFrameGroupFrameTemplate" id="5"> | ||
142 | <!-- Row 3 --> | ||
143 | <Frame name="ChorusRaidFrame11" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
85 | 144 | <Anchors> | <Anchors> |
86 | <Anchor point="BOTTOMLEFT" relativeTo="$parentGroupFrame4" relativePoint="TOPLEFT"> | ||
87 | <Offset> | ||
88 | <AbsDimension x="0" y="0"/> | ||
89 | </Offset> | ||
90 | </Anchor> | ||
91 | </Anchors> | ||
145 | <Anchor point="BOTTOMLEFT"> | ||
146 | <Offset> | ||
147 | <AbsDimension x="0" y="200"/> | ||
148 | </Offset> | ||
149 | </Anchor> | ||
150 | </Anchors> | ||
92 | 151 | <Attributes> | <Attributes> |
93 | <Attribute name="groupFilter" type="number" value="5"/> | ||
152 | <Attribute name="unit" type="string" value="raid11"/> | ||
94 | 153 | </Attributes> | </Attributes> |
95 | 154 | </Frame> | </Frame> |
96 | <Frame name="$parentGroupFrame6" inherits="ChorusRaidFrameGroupFrameTemplate" id="6"> | ||
155 | <Frame name="ChorusRaidFrame12" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
97 | 156 | <Anchors> | <Anchors> |
98 | <Anchor point="BOTTOMLEFT" relativeTo="$parentGroupFrame5" relativePoint="TOPLEFT"> | ||
99 | <Offset> | ||
100 | <AbsDimension x="0" y="0"/> | ||
101 | </Offset> | ||
102 | </Anchor> | ||
103 | </Anchors> | ||
157 | <Anchor point="BOTTOMLEFT"> | ||
158 | <Offset> | ||
159 | <AbsDimension x="100" y="200"/> | ||
160 | </Offset> | ||
161 | </Anchor> | ||
162 | </Anchors> | ||
104 | 163 | <Attributes> | <Attributes> |
105 | <Attribute name="groupFilter" type="number" value="6"/> | ||
164 | <Attribute name="unit" type="string" value="raid12"/> | ||
106 | 165 | </Attributes> | </Attributes> |
107 | 166 | </Frame> | </Frame> |
108 | <Frame name="$parentGroupFrame7" inherits="ChorusRaidFrameGroupFrameTemplate" id="7"> | ||
167 | <Frame name="ChorusRaidFrame13" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
109 | 168 | <Anchors> | <Anchors> |
110 | <Anchor point="BOTTOMLEFT" relativeTo="$parentGroupFrame6" relativePoint="TOPLEFT"> | ||
111 | <Offset> | ||
112 | <AbsDimension x="0" y="0"/> | ||
113 | </Offset> | ||
114 | </Anchor> | ||
115 | </Anchors> | ||
169 | <Anchor point="BOTTOMLEFT"> | ||
170 | <Offset> | ||
171 | <AbsDimension x="200" y="200"/> | ||
172 | </Offset> | ||
173 | </Anchor> | ||
174 | </Anchors> | ||
116 | 175 | <Attributes> | <Attributes> |
117 | <Attribute name="groupFilter" type="number" value="7"/> | ||
176 | <Attribute name="unit" type="string" value="raid13"/> | ||
118 | 177 | </Attributes> | </Attributes> |
119 | 178 | </Frame> | </Frame> |
120 | <Frame name="$parentGroupFrame8" inherits="ChorusRaidFrameGroupFrameTemplate" id="8"> | ||
179 | <Frame name="ChorusRaidFrame14" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
121 | 180 | <Anchors> | <Anchors> |
122 | <Anchor point="BOTTOMLEFT" relativeTo="$parentGroupFrame7" relativePoint="TOPLEFT"> | ||
123 | <Offset> | ||
124 | <AbsDimension x="0" y="0"/> | ||
125 | </Offset> | ||
126 | </Anchor> | ||
127 | </Anchors> | ||
181 | <Anchor point="BOTTOMLEFT"> | ||
182 | <Offset> | ||
183 | <AbsDimension x="300" y="200"/> | ||
184 | </Offset> | ||
185 | </Anchor> | ||
186 | </Anchors> | ||
128 | 187 | <Attributes> | <Attributes> |
129 | <Attribute name="groupFilter" type="number" value="8"/> | ||
188 | <Attribute name="unit" type="string" value="raid14"/> | ||
130 | 189 | </Attributes> | </Attributes> |
131 | 190 | </Frame> | </Frame> |
191 | <Frame name="ChorusRaidFrame15" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
192 | <Anchors> | ||
193 | <Anchor point="BOTTOMLEFT"> | ||
194 | <Offset> | ||
195 | <AbsDimension x="400" y="200"/> | ||
196 | </Offset> | ||
197 | </Anchor> | ||
198 | </Anchors> | ||
199 | <Attributes> | ||
200 | <Attribute name="unit" type="string" value="raid15"/> | ||
201 | </Attributes> | ||
202 | </Frame> | ||
203 | <!-- Row 4 --> | ||
204 | <Frame name="ChorusRaidFrame16" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
205 | <Anchors> | ||
206 | <Anchor point="BOTTOMLEFT"> | ||
207 | <Offset> | ||
208 | <AbsDimension x="0" y="300"/> | ||
209 | </Offset> | ||
210 | </Anchor> | ||
211 | </Anchors> | ||
212 | <Attributes> | ||
213 | <Attribute name="unit" type="string" value="raid16"/> | ||
214 | </Attributes> | ||
215 | </Frame> | ||
216 | <Frame name="ChorusRaidFrame17" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
217 | <Anchors> | ||
218 | <Anchor point="BOTTOMLEFT"> | ||
219 | <Offset> | ||
220 | <AbsDimension x="100" y="300"/> | ||
221 | </Offset> | ||
222 | </Anchor> | ||
223 | </Anchors> | ||
224 | <Attributes> | ||
225 | <Attribute name="unit" type="string" value="raid17"/> | ||
226 | </Attributes> | ||
227 | </Frame> | ||
228 | <Frame name="ChorusRaidFrame18" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
229 | <Anchors> | ||
230 | <Anchor point="BOTTOMLEFT"> | ||
231 | <Offset> | ||
232 | <AbsDimension x="200" y="300"/> | ||
233 | </Offset> | ||
234 | </Anchor> | ||
235 | </Anchors> | ||
236 | <Attributes> | ||
237 | <Attribute name="unit" type="string" value="raid18"/> | ||
238 | </Attributes> | ||
239 | </Frame> | ||
240 | <Frame name="ChorusRaidFrame19" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
241 | <Anchors> | ||
242 | <Anchor point="BOTTOMLEFT"> | ||
243 | <Offset> | ||
244 | <AbsDimension x="300" y="300"/> | ||
245 | </Offset> | ||
246 | </Anchor> | ||
247 | </Anchors> | ||
248 | <Attributes> | ||
249 | <Attribute name="unit" type="string" value="raid19"/> | ||
250 | </Attributes> | ||
251 | </Frame> | ||
252 | <Frame name="ChorusRaidFrame20" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
253 | <Anchors> | ||
254 | <Anchor point="BOTTOMLEFT"> | ||
255 | <Offset> | ||
256 | <AbsDimension x="400" y="300"/> | ||
257 | </Offset> | ||
258 | </Anchor> | ||
259 | </Anchors> | ||
260 | <Attributes> | ||
261 | <Attribute name="unit" type="string" value="raid20"/> | ||
262 | </Attributes> | ||
263 | </Frame> | ||
264 | <!-- Row 5 --> | ||
265 | <Frame name="ChorusRaidFrame21" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
266 | <Anchors> | ||
267 | <Anchor point="BOTTOMLEFT"> | ||
268 | <Offset> | ||
269 | <AbsDimension x="0" y="400"/> | ||
270 | </Offset> | ||
271 | </Anchor> | ||
272 | </Anchors> | ||
273 | <Attributes> | ||
274 | <Attribute name="unit" type="string" value="raid21"/> | ||
275 | </Attributes> | ||
276 | </Frame> | ||
277 | <Frame name="ChorusRaidFrame22" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
278 | <Anchors> | ||
279 | <Anchor point="BOTTOMLEFT"> | ||
280 | <Offset> | ||
281 | <AbsDimension x="100" y="400"/> | ||
282 | </Offset> | ||
283 | </Anchor> | ||
284 | </Anchors> | ||
285 | <Attributes> | ||
286 | <Attribute name="unit" type="string" value="raid22"/> | ||
287 | </Attributes> | ||
288 | </Frame> | ||
289 | <Frame name="ChorusRaidFrame23" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
290 | <Anchors> | ||
291 | <Anchor point="BOTTOMLEFT"> | ||
292 | <Offset> | ||
293 | <AbsDimension x="200" y="400"/> | ||
294 | </Offset> | ||
295 | </Anchor> | ||
296 | </Anchors> | ||
297 | <Attributes> | ||
298 | <Attribute name="unit" type="string" value="raid23"/> | ||
299 | </Attributes> | ||
300 | </Frame> | ||
301 | <Frame name="ChorusRaidFrame24" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
302 | <Anchors> | ||
303 | <Anchor point="BOTTOMLEFT"> | ||
304 | <Offset> | ||
305 | <AbsDimension x="300" y="400"/> | ||
306 | </Offset> | ||
307 | </Anchor> | ||
308 | </Anchors> | ||
309 | <Attributes> | ||
310 | <Attribute name="unit" type="string" value="raid24"/> | ||
311 | </Attributes> | ||
312 | </Frame> | ||
313 | <Frame name="ChorusRaidFrame25" inherits="ChorusSmallRaidUnitFrameTemplate"> | ||
314 | <Anchors> | ||
315 | <Anchor point="BOTTOMLEFT"> | ||
316 | <Offset> | ||
317 | <AbsDimension x="400" y="400"/> | ||
318 | </Offset> | ||
319 | </Anchor> | ||
320 | </Anchors> | ||
321 | <Attributes> | ||
322 | <Attribute name="unit" type="string" value="raid25"/> | ||
323 | </Attributes> | ||
324 | </Frame> | ||
325 | |||
132 | 326 | </Frames> | </Frames> |
133 | <Scripts> | ||
134 | <OnLoad> | ||
135 | self:RegisterEvent('PLAYER_LOGIN'); | ||
136 | self:SetScript('OnEvent', function(f) | ||
137 | f:UnregisterAllEvents() | ||
138 | local p = self:GetParent() or UIParent; | ||
139 | f:SetPoint('TOPLEFT', p, 'TOPLEFT', (p:GetWidth() - f:GetWidth()) / 2, p:GetHeight() / -3); | ||
140 | f:SetPoint('BOTTOMRIGHT', p, 'TOPLEFT', p:GetWidth() / 3, p:GetHeight() / -3 * 2); | ||
141 | end) | ||
142 | </OnLoad> | ||
143 | </Scripts> | ||
144 | 327 | </Frame> | </Frame> |
145 | 328 | </Ui> | </Ui> |
File src/ChorusRaidTargetIconFrameTemplate.lua changed (mode: 100644) (index 9ef0cdb..e52b616) | |||
... | ... | local UnitExists = Chorus.test.UnitExists or UnitExists | |
4 | 4 | local UnitIsConnected = Chorus.test.UnitIsConnected or UnitIsConnected | local UnitIsConnected = Chorus.test.UnitIsConnected or UnitIsConnected |
5 | 5 | local GetRaidTargetIndex = GetRaidTargetIndex | local GetRaidTargetIndex = GetRaidTargetIndex |
6 | 6 | ||
7 | local RegisterUnitWatch = Chorus.test.RegisterUnitWatch or RegisterUnitWatch | ||
8 | 7 | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit |
9 | 8 | --[[ See FrameXML/TargetFrame.lua:682 ]]-- | --[[ See FrameXML/TargetFrame.lua:682 ]]-- |
10 | 9 | local SetRaidTargetIconTexture = SetRaidTargetIconTexture | local SetRaidTargetIconTexture = SetRaidTargetIconTexture |
... | ... | function Chorus.raidTargetIconFrameMain(self) | |
54 | 53 | self:RegisterEvent('PLAYER_TARGET_CHANGED') | self:RegisterEvent('PLAYER_TARGET_CHANGED') |
55 | 54 | self:RegisterEvent('RAID_ROSTER_UPDATE') | self:RegisterEvent('RAID_ROSTER_UPDATE') |
56 | 55 | self:RegisterEvent('RAID_TARGET_UPDATE') | self:RegisterEvent('RAID_TARGET_UPDATE') |
57 | |||
58 | RegisterUnitWatch(self) | ||
59 | 56 | end | end |
File src/ChorusRangeFrameTemplate.lua changed (mode: 100644) (index 2bf35c3..c0b358e) | |||
... | ... | local function rangeSpellMapFrameMain(self) | |
162 | 162 | self:RegisterEvent('PLAYER_TALENT_UPDATE') | self:RegisterEvent('PLAYER_TALENT_UPDATE') |
163 | 163 | self:RegisterEvent('SPELLS_CHANGED') | self:RegisterEvent('SPELLS_CHANGED') |
164 | 164 | self:SetScript('OnEvent', spellRangeMapUpdate) | self:SetScript('OnEvent', spellRangeMapUpdate) |
165 | |||
166 | RegisterUnitWatch(self) | ||
167 | 165 | end | end |
168 | 166 | ||
169 | 167 | --[[ Hide reference to the internal function, for some reason. ]]-- | --[[ Hide reference to the internal function, for some reason. ]]-- |
File src/ChorusTargetFrame.xml added (mode: 100644) (index 0000000..402c449) | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <Ui xmlns="http://www.blizzard.com/wow/ui/"> | ||
3 | <Frame name="ChorusTargetFrame" inherits="ChorusHugeUnitFrameTemplate"> | ||
4 | <Anchors> | ||
5 | <Anchor point="TOP"> | ||
6 | <Offset x="-288" y="-256"/> | ||
7 | </Anchor> | ||
8 | <Anchor point="CENTER"> | ||
9 | <Offset x="0" y="0"/> | ||
10 | </Anchor> | ||
11 | </Anchors> | ||
12 | <Attributes> | ||
13 | <!-- TODO Add back target context menu popup on right click. --> | ||
14 | <Attribute name="unit" type="string" value="target"/> | ||
15 | </Attributes> | ||
16 | </Frame> | ||
17 | <Frame name="ChorusTargetTargetButton" inherits="ChorusSmallUnitFrameTemplate,ChorusTOTUnitFrameTemplate"> | ||
18 | <Anchors> | ||
19 | <Anchor point="TOPRIGHT" relativeTo="ChorusTargetFrame" relativePoint="TOPLEFT"> | ||
20 | <Offset x="-6" y="-6"/> | ||
21 | </Anchor> | ||
22 | </Anchors> | ||
23 | <Attributes> | ||
24 | <Attribute name="unit" type="string" value="targettarget"/> | ||
25 | </Attributes> | ||
26 | </Frame> | ||
27 | </Ui> |
File src/ChorusThreatFrameTemplate.lua changed (mode: 100644) (index 7c1db46..5a5fec7) | |||
... | ... | local UnitIsConnected = Chorus.test.UnitIsConnected or UnitIsConnected | |
6 | 6 | local UnitIsFriend = Chorus.test.UnitIsFriend or UnitIsFriend | local UnitIsFriend = Chorus.test.UnitIsFriend or UnitIsFriend |
7 | 7 | local UnitThreatSituation = UnitThreatSituation | local UnitThreatSituation = UnitThreatSituation |
8 | 8 | ||
9 | local RegisterUnitWatch = Chorus.test.RegisterUnitWatch or RegisterUnitWatch | ||
10 | 9 | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit |
11 | 10 | ||
12 | 11 | local function threatFrameEventProcessor(self) | local function threatFrameEventProcessor(self) |
... | ... | local function threatFrameEventProcessor(self) | |
55 | 54 | if label and threatPercentage then | if label and threatPercentage then |
56 | 55 | assert('number' == type(threatPercentage)) | assert('number' == type(threatPercentage)) |
57 | 56 | ||
58 | threatPercentage = math.min(math.max(0, math.abs(math.floor(threatPercentage)), 100)) | ||
59 | |||
60 | 57 | assert(threatPercentage >= 0) | assert(threatPercentage >= 0) |
61 | assert(threatPercentage <= 100) | ||
62 | 58 | ||
63 | 59 | label:SetText(string.format('%d%%', threatPercentage)) | label:SetText(string.format('%d%%', threatPercentage)) |
64 | 60 | elseif label then | elseif label then |
... | ... | local function threatFrameMain(self) | |
81 | 77 | self:RegisterEvent('RAID_ROSTER_UPDATE') | self:RegisterEvent('RAID_ROSTER_UPDATE') |
82 | 78 | self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE') | self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE') |
83 | 79 | self:SetScript('OnEvent', threatFrameEventProcessor) | self:SetScript('OnEvent', threatFrameEventProcessor) |
84 | |||
85 | RegisterUnitWatch(self) | ||
86 | 80 | end | end |
87 | 81 | ||
88 | 82 | Chorus.threatFrameMain = function(...) | Chorus.threatFrameMain = function(...) |
File src/ChorusUnitButtonTemplate.lua changed (mode: 100644) (index 92320df..69048da) | |||
... | ... | local Chorus = Chorus | |
3 | 3 | local GameTooltip = GameTooltip | local GameTooltip = GameTooltip |
4 | 4 | local GameTooltipTextLeft1 = GameTooltipTextLeft1 | local GameTooltipTextLeft1 = GameTooltipTextLeft1 |
5 | 5 | ||
6 | --[[ See `FrameXML/UnitPopup.lua:UnitPopupFrames`. ]]-- | ||
7 | local TargetFrameDropDown = TargetFrameDropDown | ||
8 | local PlayerFrameDropDown = PlayerFrameDropDown | ||
9 | local FocusFrameDropDown = FocusFrameDropDown | ||
10 | local PartyMemberFrame1DropDown = PartyMemberFrame1DropDown | ||
11 | local PartyMemberFrame2DropDown = PartyMemberFrame2DropDown | ||
12 | local PartyMemberFrame3DropDown = PartyMemberFrame3DropDown | ||
13 | local PartyMemberFrame4DropDown = PartyMemberFrame4DropDown | ||
14 | |||
15 | --[[ See `FrameXML/UIDropDownMenu.lua:function ToggleDropDownMenu`. ]]-- | ||
16 | local ToggleDropDownMenu = ToggleDropDownMenu | ||
17 | |||
6 | 18 | local GameTooltip_SetDefaultAnchor = GameTooltip_SetDefaultAnchor | local GameTooltip_SetDefaultAnchor = GameTooltip_SetDefaultAnchor |
7 | 19 | local GameTooltip_UnitColor = GameTooltip_UnitColor | local GameTooltip_UnitColor = GameTooltip_UnitColor |
8 | 20 | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit |
9 | 21 | ||
10 | 22 | --[[ TODO Add incoming healing bar. ]]-- | --[[ TODO Add incoming healing bar. ]]-- |
11 | 23 | --[[ TODO Add incoming resurrection indicator. ]]-- | --[[ TODO Add incoming resurrection indicator. ]]-- |
12 | --[[ TODO Add menu popup for all unit frames ]]-- | ||
24 | --[[ FIXME Unclickable areas on screen again. ]]-- | ||
13 | 25 | ||
14 | 26 | local function unitButtonLeaveProcessor() | local function unitButtonLeaveProcessor() |
15 | 27 | assert(GameTooltip ~= nil) | assert(GameTooltip ~= nil) |
... | ... | local function unitButtonEnterProcessor(unitButton) | |
29 | 41 | end | end |
30 | 42 | end | end |
31 | 43 | ||
44 | local function contextMenuToggle(self, unitDesignation, buttonDesignation, buttonType) | ||
45 | assert(self ~= nil) | ||
46 | assert(unitDesignation ~= nil) | ||
47 | assert(buttonDesignation ~= nil) | ||
48 | assert(buttonType ~= nil) | ||
49 | |||
50 | local offsetX = self:GetWidth() / 2 | ||
51 | local offsetY = self:GetHeight() | ||
52 | local contextMenu = nil | ||
53 | if UnitIsUnit('target', unitDesignation) then | ||
54 | contextMenu = TargetFrameDropDown | ||
55 | elseif UnitIsUnit('focus', unitDesignation) then | ||
56 | contextMenu = FocusFrameDropDown | ||
57 | elseif UnitIsUnit('player', unitDesignation) then | ||
58 | contextMenu = PlayerFrameDropDown | ||
59 | elseif UnitIsUnit('party1', unitDesignation) then | ||
60 | contextMenu = PartyMemberFrame1DropDown | ||
61 | elseif UnitIsUnit('party2', unitDesignation) then | ||
62 | contextMenu = PartyMemberFrame2DropDown | ||
63 | elseif UnitIsUnit('party3', unitDesignation) then | ||
64 | contextMenu = PartyMemberFrame3DropDown | ||
65 | elseif UnitIsUnit('party4', unitDesignation) then | ||
66 | contextMenu = PartyMemberFrame4DropDown | ||
67 | end | ||
68 | |||
69 | assert(contextMenu ~= nil, 'ChorusUnitButtonTemplate.lua: count not determine ' .. | ||
70 | 'appropriate context menu to show for ' .. self:GetName()) | ||
71 | |||
72 | --[[ Not sure what `level` is. Maybe menu nesting? ]]-- | ||
73 | local level = 1 | ||
74 | --[[ Don't know what `value` is. Usually it's nil. ]]-- | ||
75 | local value = nil | ||
76 | local anchorName = self:GetName() or 'ChorusFrame' | ||
77 | ToggleDropDownMenu(level, value, contextMenu, anchorName, offsetX, offsetY) | ||
78 | end | ||
79 | |||
32 | 80 | function Chorus.unitButtonMain(self) | function Chorus.unitButtonMain(self) |
33 | 81 | self:RegisterForClicks('AnyUp') | self:RegisterForClicks('AnyUp') |
34 | 82 | ||
83 | --[[ NOTE The menu functions are equivalent of PlayerFrame.menu and | ||
84 | TargetFrame.menu. It is possible to use them direcctly. THe only | ||
85 | quirk is that the context menu will be displayed at the display point | ||
86 | of the native unit frames. Hence, the need to define separate menu | ||
87 | functions. ]]-- | ||
88 | |||
89 | self.menu = contextMenuToggle | ||
90 | |||
91 | --[[ FIXME Selecting "Set focus" option in the context menu for Chorus | ||
92 | unit button results in permission violation exception (restricted | ||
93 | execution environment issue). ]]-- | ||
94 | |||
95 | local focuscastModifier = GetModifiedClick('FOCUSCAST') | ||
96 | if focuscastModifier and 'NONE' ~= focuscastModifier then | ||
97 | local key = string.lower(focuscastModifier) .. '-type1' | ||
98 | self:SetAttribute(key, 'focus') | ||
99 | end | ||
100 | |||
35 | 101 | --[[ Toggle game tooltip on mouseover. ]]-- | --[[ Toggle game tooltip on mouseover. ]]-- |
36 | 102 | self:SetScript('OnEnter', unitButtonEnterProcessor) | self:SetScript('OnEnter', unitButtonEnterProcessor) |
37 | 103 | self:SetScript('OnLeave', unitButtonLeaveProcessor) | self:SetScript('OnLeave', unitButtonLeaveProcessor) |
File src/ChorusUnitNameFrameTemplate.lua changed (mode: 100644) (index b6996c6..8e73dde) | |||
... | ... | local UnitIsPlayer = Chorus.test.UnitIsPlayer or UnitIsPlayer | |
7 | 7 | local UnitName = Chorus.test.UnitName or UnitName | local UnitName = Chorus.test.UnitName or UnitName |
8 | 8 | ||
9 | 9 | local RAID_CLASS_COLORS = RAID_CLASS_COLORS | local RAID_CLASS_COLORS = RAID_CLASS_COLORS |
10 | local RegisterUnitWatch = Chorus.test.RegisterUnitWatch or RegisterUnitWatch | ||
11 | 10 | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit | local SecureButton_GetUnit = Chorus.test.SecureButton_GetUnit or SecureButton_GetUnit |
12 | 11 | ||
13 | 12 | local function unitNameEventProcessor(self) | local function unitNameEventProcessor(self) |
... | ... | function Chorus.unitNameFrameMain(self) | |
85 | 84 | self:RegisterEvent('PLAYER_TARGET_CHANGED') | self:RegisterEvent('PLAYER_TARGET_CHANGED') |
86 | 85 | self:RegisterEvent('RAID_ROSTER_UPDATE') | self:RegisterEvent('RAID_ROSTER_UPDATE') |
87 | 86 | self:RegisterEvent('UNIT_NAME_UPDATE') | self:RegisterEvent('UNIT_NAME_UPDATE') |
88 | |||
89 | RegisterUnitWatch(self) | ||
90 | 87 | end | end |
Date/time (UTC) | Type | Misc | Labels |
---|---|---|---|
2024-06-10 09:12 | build | debian-11-amd64 | worker/r1 builder/color=fff worker_elap/40s wait_time/24479745s date/2023-09-01 time/01:14 |