vrtc / chorus (public) (License: CC0) (since 2023-08-12) (hash sha1)
World of Warcraft add-on stub. The overall goal is to create a specialized raid frame.
List of commits:
Subject Hash Author Date (UTC)
fix!: toggle group frames correctly when in combat d206255d8aa9c6fd1fa6cbbc591192269a2ffd47 Vladyslav Bondarenko 2024-01-24 22:36:19
feat: add unit frame borders that are color coded fb8e310e827c1cbdafa6ff2bc7760ef8fc617a16 Vladyslav Bondarenko 2024-01-24 20:23:43
fix: typo in src/ChorusUnitFrameTemplate.lua 62ccfd2a62ce4ec8d9be7658663d06c9d39f743a Vladyslav Bondarenko 2024-01-24 18:57:02
fix: single frame toggles every group frame 44d20820afb80aa381c2cfb1272123ba9a8e6156 Vladyslav Bondarenko 2024-01-24 18:47:12
build: migrate to make and adoc 1e410bff214b6a32cd13343d3b7e521afa0cf93f Vladyslav Bondarenko 2024-01-23 14:42:21
doc: note the need to backport GetSpellName 8dac49bb037de94b2980a45b91152691d9c5b98b Vladyslav Bondarenko 2024-01-23 14:24:44
feat: show remaining aura charges beedf659895a3ecdd0df97e14e63d87f534d0bbc Vladyslav Bondarenko 2024-01-23 14:24:01
fix: remove aura button overlay and artwork gap d0785edceabe16095e6e56aa42d88fb25bca3eb7 Vladyslav Bondarenko 2024-01-21 22:35:02
Release 0.6 d76ca463e13d1a47b68541f33faa9c44ec745347 Vladyslav Bondarenko 2023-09-12 02:02:46
fix!: Show arena as party 1c7d9c4c80948486eacd0c0eaa8f785a1efaa5ae Vladyslav Bondarenko 2023-09-11 23:51:47
fix: Filter out aura events 193d8864ae6ca3a2f6bf3e6ed2260e06722e47fc Vladyslav Bondarenko 2023-09-11 21:14:26
feat: Arrange all solo frames in one column 5d1f55b456efee534b970ed3ec80c5aeb334baa8 Vladyslav Bondarenko 2023-09-11 19:31:46
fix!: Show arena as party 6b1ac51958c213e1e06ef4c43b2e01a7ef0d1e01 Vladyslav Bondarenko 2023-09-11 17:06:51
feat: Add arrow graphics to aura tooltip button 16b016797a6bc7bb65d5cab8caa7dc8beeb4b48d Vladyslav Bondarenko 2023-09-11 16:35:40
feat: Add arrow graphics to aura tooltip button 12129625fc1277c77974cc9a2b63b3cfc592cdf6 Vladyslav Bondarenko 2023-09-11 16:35:40
fix: Improve small raid layout a4e48cb4e4b198d141abd4ce3914e71f5155f502 Vladyslav Bondarenko 2023-09-07 06:55:19
fix!: Simplify aura sorting algorithm a2a294f60cee50ab51d044139f50d784bb8f3455 Vladyslav Bondarenko 2023-09-07 01:49:15
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
Commit d206255d8aa9c6fd1fa6cbbc591192269a2ffd47 - fix!: toggle group frames correctly when in combat
Use restricted environment features only to toggle player group frames.
Otherwise, the frames will not update correctly when in combat.

Additionally, the player frame will be hidden when in any player group.
The idea is to prevent duplication, since player is always shown in
every group.

Some group frame profiles are still missing, in particular larger raid
group frames and arena frame. After those are implemented, minimal
modification will be required to this code.
Author: Vladyslav Bondarenko
Author date (UTC): 2024-01-24 22:36
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2024-01-24 22:45
Parent(s): fb8e310e827c1cbdafa6ff2bc7760ef8fc617a16
Signer:
Signing key: EFF9624877D25D02
Signing status: E
Tree: a84c39f8bfb2f088e4928cc40bce74c6f69ea0f0
File Lines added Lines deleted
src/Chorus.xml 5 1
src/ChorusGroupFrame.lua 52 40
src/ChorusGroupFrame.xml 3 0
File src/Chorus.xml changed (mode: 100644) (index 3acb861..5b13834)
31 31 <!-- Frames (concrete classes, interface implementations, object instances). --> <!-- Frames (concrete classes, interface implementations, object instances). -->
32 32 <Include file="ChorusPartyFrame.xml"/> <Include file="ChorusPartyFrame.xml"/>
33 33 <Include file="ChorusRaidFrame.xml"/> <Include file="ChorusRaidFrame.xml"/>
34 <Include file="ChorusGroupFrame.xml"/>
35 34 <Include file="ChorusPlayerFrame.xml"/> <Include file="ChorusPlayerFrame.xml"/>
36 35 <Include file="ChorusTargetFrame.xml"/> <Include file="ChorusTargetFrame.xml"/>
37 36 <Include file="ChorusFocusFrame.xml"/> <Include file="ChorusFocusFrame.xml"/>
37 <!--
38 The load order is critically important, especially for
39 `ChorusGroupFrame`. Critical runtime errors may occurr.
40 -->
41 <Include file="ChorusGroupFrame.xml"/>
38 42 <Include file="ChorusFrame.xml"/> <Include file="ChorusFrame.xml"/>
39 43 </Ui> </Ui>
File src/ChorusGroupFrame.lua changed (mode: 100644) (index 1eec3bd..df0621a)
1 local GetNumPartyMembers = Chorus.test.GetNumPartyMembers or GetNumPartyMembers
2 local UnitInParty = Chorus.test.UnitInParty or UnitInParty
3 local UnitInRaid = Chorus.test.UnitInRaid or UnitInRaid
4
5 1 local Chorus = Chorus local Chorus = Chorus
6 2 local ChorusPartyFrame = ChorusPartyFrame local ChorusPartyFrame = ChorusPartyFrame
7 3 local ChorusRaidFrame = ChorusRaidFrame local ChorusRaidFrame = ChorusRaidFrame
8 4
9 local function groupFrameEventProcessor(self)
5 function Chorus.groupFrameMain(self)
10 6 assert(self ~= nil) assert(self ~= nil)
11 7
12 if IsActiveBattlefieldArena() then
13 --[[ TODO Implement separate or additional arena unit group frame. ]]--
14 self:Show()
15 ChorusPartyFrame:Show()
16 ChorusRaidFrame:Hide()
17 elseif UnitInRaid('player') then
18 self:Show()
19 ChorusPartyFrame:Hide()
20 --[[ TODO Implement separate raid profiles for 10, 25 and 40 men raids. ]]--
21 ChorusRaidFrame:Show()
22 elseif UnitInParty('player') and GetNumPartyMembers() >= 1 then
23 self:Show()
24 ChorusPartyFrame:Show()
25 ChorusRaidFrame:Hide()
26 else
27 self:Hide()
28 ChorusPartyFrame:Hide()
29 ChorusRaidFrame:Hide()
30 end
31 end
8 local secureHandler = ChorusGroupSecureHandler
9 assert(secureHandler ~= nil)
32 10
33 function Chorus.groupFrameMain(self)
34 assert(self ~= nil)
11 assert(ChorusPartyFrame ~= nil)
12 assert(ChorusPlayerFrame ~= nil)
13 assert(ChorusRaidFrame ~= nil)
14
15 secureHandler:SetFrameRef('ChorusPartyFrame', ChorusPartyFrame)
16 secureHandler:SetFrameRef('ChorusPlayerFrame', ChorusPlayerFrame)
17 secureHandler:SetFrameRef('ChorusRaidFrame', ChorusRaidFrame)
18
19 --[[ TODO Add line `[@raid11,exists] ChorusRaid25Frame;` for 25 men raid, etc. ]]--
20 --[[ TODO Replace the arena conditional with actual arena frame, when implemented. ]]--
21 RegisterStateDriver(secureHandler, 'group', [[
22 [@arena1,exists] ChorusPartyFrame;
23 [@raid1,exists] ChorusRaidFrame;
24 [@party1,exists] ChorusPartyFrame;
25 ChorusPlayerFrame;
26 ]])
27
28 --[[ TODO Implement separate or additional arena unit group frame. ]]--
29 --[[ TODO Implement separate raid profiles for 10, 25 and 40 men raids. ]]--
30 secureHandler:WrapScript(secureHandler, 'OnAttributeChanged', [[
31 if name ~= 'state-group' then
32 return
33 end
34 value = strtrim(value)
35
36 local currentGroupFrame = self:GetFrameRef(value)
37
38 if currentGroupFrame then
39 currentGroupFrame:Show()
40 end
41
42 local t = newtable()
43 table.insert(t, 'ChorusArenaFrame')
44 table.insert(t, 'ChorusPartyFrame')
45 table.insert(t, 'ChorusPlayerFrame')
46 table.insert(t, 'ChorusRaidFrame')
47 table.insert(t, 'ChorusRaid10Frame')
48 table.insert(t, 'ChorusRaid25Frame')
49 table.insert(t, 'ChorusRaid40Frame')
50
51 local i = 0
52 while(i < #t) do
53 i = i + 1
35 54
36 self:SetScript('OnEvent', groupFrameEventProcessor)
37
38 self:RegisterEvent('BATTLEFIELDS_CLOSED');
39 self:RegisterEvent('BATTLEFIELDS_SHOW');
40 self:RegisterEvent('PARTY_CONVERTED_TO_RAID')
41 self:RegisterEvent('PARTY_LEADER_CHANGED');
42 self:RegisterEvent('PARTY_MEMBERS_CHANGED')
43 self:RegisterEvent('PARTY_MEMBER_DISABLE')
44 self:RegisterEvent('PARTY_MEMBER_ENABLE')
45 self:RegisterEvent('PLAYER_ALIVE');
46 self:RegisterEvent('PLAYER_LOGIN')
47 self:RegisterEvent('RAID_ROSTER_UPDATE')
48 self:RegisterEvent('UPDATE_BATTLEFIELD_STATUS');
55 local f = self:GetFrameRef(t[i])
56 if f and f ~= currentGroupFrame then
57 f:Hide()
58 end
59 end
60 ]])
49 61 end end
File src/ChorusGroupFrame.xml changed (mode: 100644) (index 79fdabd..834bb04)
15 15 <Scripts> <Scripts>
16 16 <OnLoad>Chorus.groupFrameMain(self);</OnLoad> <OnLoad>Chorus.groupFrameMain(self);</OnLoad>
17 17 </Scripts> </Scripts>
18 <Frames>
19 <Frame name="ChorusGroupSecureHandler" inherits="SecureHandlerStateTemplate"/>
20 </Frames>
18 21 </Frame> </Frame>
19 22 </Ui> </Ui>
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/vrtc/chorus

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/vrtc/chorus

Clone this repository using git:
git clone git://git.rocketgit.com/user/vrtc/chorus

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main