List of commits:
Subject Hash Author Date (UTC)
fix(choir): Raid frame and spoiler overlap e1a8da43270859a3c36b67f81357a935f0b6f2ef Vladyslav Bondarenko 2022-01-08 02:00:26
fix(choir): Update only existing units when necessary 82b7e0cfd4354263f27ea206f555e9771f2e8f8c Vladyslav Bondarenko 2021-12-31 07:45:00
feat(choir): Render unit threat situation dee7167e3a7e453425248a1062560f9bfd8b3bb4 Vladyslav Bondarenko 2021-12-28 01:39:09
fix(choir): Render dungeon role correctly for Cata 590a4abfd82659624688c4c1658de87693d3cd30 Vladyslav Bondarenko 2021-12-28 00:31:52
fix(choir): Show raid frame at player login 21a86d3840fb810c4ff4c67490aae7d5251c1bae Vladyslav Bondarenko 2021-11-24 06:07:10
feat(choir)!: Add interface options for raid frame ce677d3d0e7cfe05d1da5b159f52a0808db9ce9a Vladyslav Bondarenko 2021-11-24 06:05:37
feat(choir): Add conf spell shortcut default button c8e2c3493896f5ae589c516f742bbafd528140db Vladyslav Bondarenko 2021-11-24 02:28:19
feat(choir)!: Add configuration menu 12319ce873aecea4bfc0addec7c5ac5c1f225237 Vladyslav Bondarenko 2021-11-21 09:26:05
feat(choir): Add unit game tooltip 3ec490e489bb105f5096d5bb3e56814873deec3f Vladyslav Bondarenko 2021-11-20 09:34:12
fix(choir): Raid group frame arrange correctly b592f3f018ee521a821447ccf837aded703ad447 Vladyslav Bondarenko 2021-11-18 22:02:52
feat(choir): Render group role indicator for units 5f3a7c24d3f79035b8faa156355a2d017688134e Vladyslav Bondarenko 2021-11-18 22:02:27
feat(choir): Adjust raid group frame position f99a54133a1761034baca93bfa8814c614191818 Vladyslav Bondarenko 2021-11-18 00:35:35
feat(choir): Add debuff buttons for raid fe66339420a9eb5e4823cc4fe45e0d97b2983073 Vladyslav Bondarenko 2021-11-17 00:55:54
feat(choir): Add texture to health bars ddaeb29d7ecfd95a98bcc85b3f4f7676c7ccd4d7 Vladyslav Bondarenko 2021-11-14 21:40:26
fix(choir)!: Obscure critical error 0f203b4d69f57240e97c66f1ab4510c6ac3e9276 Vladyslav Bondarenko 2021-11-11 12:52:02
feat(choir): Toggle button visibility given roster d193e7b5eb38cb3ac69d74eec1f96e00d90b6098 Vladyslav Bondarenko 2021-11-10 23:46:24
feat(choir)!: Add permanent raid frame 1839c35af4212c09038e972547d6b5893a9ce219 Vladyslav Bondarenko 2021-11-10 16:04:25
feat(choir)!: Employ Clearcasting subset feat 733c81538c3c965f07993fd7ddc482e724121b75 Vladyslav Bondarenko 2021-11-04 22:40:48
fix(choir): Improve shortcut binding keys eb636de6e3f7bada9f0064ffe4db1db3f6433f6c Vladyslav Bondarenko 2021-10-31 18:55:10
fix(choir): Improve choirBindingKey attribute handling 6c5c2214cc1809e5e5e59cd3672da3cca3f2701f Vladyslav Bondarenko 2021-10-31 13:23:24
Commit e1a8da43270859a3c36b67f81357a935f0b6f2ef - fix(choir): Raid frame and spoiler overlap
Raid frame and unit selection spoiler are mutually exclusive visually.
When one is shown the other is hidden always. However sometimes the raid
frame will appear and overlap with the spoiler. This is now fixed.
Author: Vladyslav Bondarenko
Author date (UTC): 2022-01-08 02:00
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2022-01-08 02:00
Parent(s): e2de3d1e5844006a4d4dbc5e1449c4ba7fcf999f
Signer:
Signing key:
Signing status: N
Tree: 4b13e86e2ebfa31c2b005b7dd4f22b697e9155f0
File Lines added Lines deleted
choir.lua 75 25
File choir.lua changed (mode: 100644) (index 1adb44c..29eea44)
... ... local function createRoleWidget(unitButton)
151 151 roleWidget.artwork = artwork roleWidget.artwork = artwork
152 152
153 153 roleWidget:RegisterEvent('LFG_ROLE_UPDATE') roleWidget:RegisterEvent('LFG_ROLE_UPDATE')
154 roleWidget:RegisterEvent('PARTY_MEMBERS_CHANGED')
154 155 roleWidget:RegisterEvent('PLAYER_ENTERING_BATTLEGROUND') roleWidget:RegisterEvent('PLAYER_ENTERING_BATTLEGROUND')
155 156 roleWidget:RegisterEvent('PLAYER_ENTERING_WORLD') roleWidget:RegisterEvent('PLAYER_ENTERING_WORLD')
156 157 roleWidget:RegisterEvent('PLAYER_ROLES_ASSIGNED') roleWidget:RegisterEvent('PLAYER_ROLES_ASSIGNED')
157 158 roleWidget:RegisterEvent('PLAYER_TALENT_UPDATE') roleWidget:RegisterEvent('PLAYER_TALENT_UPDATE')
159 roleWidget:RegisterEvent('RAID_ROSTER_UPDATE')
158 160 roleWidget:RegisterEvent('ZONE_CHANGED_NEW_AREA') roleWidget:RegisterEvent('ZONE_CHANGED_NEW_AREA')
159 161
160 162 roleWidget:SetScript('OnEvent', roleWidgetEventProcessor) roleWidget:SetScript('OnEvent', roleWidgetEventProcessor)
 
... ... local function arrangeEveryRaidGroupFrame(raidFrame)
863 865 assert (raidFrame ~= nil) assert (raidFrame ~= nil)
864 866
865 867 local activeRaidGroupQuantity = 0 local activeRaidGroupQuantity = 0
866 local marginLeft = 12 * 6
867 868 local maxRowQuantity = 4 local maxRowQuantity = 4
868 869 local padding = 0 local padding = 0
869 870 local row = 0 local row = 0
871 local column = 0
870 872
871 873 local i = 0 local i = 0
872 874 local t = {raidFrame:GetChildren()} local t = {raidFrame:GetChildren()}
873 local x = 0
874 local y = 0
875 local x
876 local y
875 877 while (i < #t) do while (i < #t) do
876 878 i = i + 1 i = i + 1
877 879 local raidGroupFrame = t[i] local raidGroupFrame = t[i]
878 880 if raidGroupFrame and raidGroupFrame:IsShown() then if raidGroupFrame and raidGroupFrame:IsShown() then
881 x = column * (raidGroupFrame:GetWidth() + padding)
882 y = row * (raidGroupFrame:GetHeight() + padding)
879 883 raidGroupFrame:SetPoint('BOTTOMLEFT', raidFrame, 'BOTTOMLEFT', x, y) raidGroupFrame:SetPoint('BOTTOMLEFT', raidFrame, 'BOTTOMLEFT', x, y)
880 x = math.floor(activeRaidGroupQuantity / maxRowQuantity) * (marginLeft + raidGroupFrame:GetWidth() + padding)
881 y = y + raidGroupFrame:GetHeight() + padding
882 884 row = row + 1 row = row + 1
883 if row > maxRowQuantity then
885 if row >= maxRowQuantity then
884 886 row = 0 row = 0
885 y = 0
887 column = column + 1
886 888 end end
887 889 activeRaidGroupQuantity = activeRaidGroupQuantity + 1 activeRaidGroupQuantity = activeRaidGroupQuantity + 1
888 890 end end
 
... ... local function createRaidGroupFrame(raidFrame, groupNumber, unitSetOverride)
1008 1010 local n = groupFrame:GetName() .. 'RaidUnitButton' .. tostring(i) local n = groupFrame:GetName() .. 'RaidUnitButton' .. tostring(i)
1009 1011 local b = createUnitButton(groupFrame, n, unitDesignation, local b = createUnitButton(groupFrame, n, unitDesignation,
1010 1012 'PLAYER HELPFUL', 'HARMFUL', buttonWidth, buttonHeight) 'PLAYER HELPFUL', 'HARMFUL', buttonWidth, buttonHeight)
1013 buttonWidth = math.max(buttonWidth, b:GetWidth())
1014 buttonHeight = math.max(buttonHeight, b:GetHeight())
1011 1015 b:SetPoint('BOTTOMLEFT', labelWidth + (i - 1) * (padding + b:GetWidth()), 0) b:SetPoint('BOTTOMLEFT', labelWidth + (i - 1) * (padding + b:GetWidth()), 0)
1012 1016 end end
1017 groupFrame:SetSize(labelWidth + maxPartySize * (buttonWidth + padding),
1018 buttonHeight + padding)
1013 1019
1014 1020 groupFrame:RegisterEvent('PARTY_CONVERTED_TO_RAID') groupFrame:RegisterEvent('PARTY_CONVERTED_TO_RAID')
1015 1021 groupFrame:RegisterEvent('PARTY_MEMBERS_CHANGED') groupFrame:RegisterEvent('PARTY_MEMBERS_CHANGED')
 
... ... local function createRaidGroupFrame(raidFrame, groupNumber, unitSetOverride)
1024 1030 end end
1025 1031
1026 1032 local function raidFrameEventProcessor(raidFrame) local function raidFrameEventProcessor(raidFrame)
1033 assert (raidFrame ~= nil)
1034
1035 arrangeEveryRaidGroupFrame(raidFrame)
1036 end
1037
1038 local function raidFrameDisable(raidFrame)
1039 assert (raidFrame ~= nil)
1040
1041 raidFrame:UnregisterAllEvents()
1042 raidFrame:SetScript('OnEvent', nil)
1043 raidFrame:Hide()
1044 end
1045
1046 local function raidFrameEnable(raidFrame)
1047 assert (raidFrame ~= nil)
1048
1049 local x = ChoirConfRaidX or 0
1050 x = math.min(math.max(0, x), UIParent:GetWidth())
1051
1052 local y = ChoirConfRaidY or 0
1053 y = math.min(math.max(0, y), UIParent:GetHeight())
1054
1055 raidFrame:SetPoint('BOTTOMLEFT', x, y)
1056
1057 raidFrame:RegisterEvent('PARTY_CONVERTED_TO_RAID')
1058 raidFrame:RegisterEvent('PARTY_MEMBERS_CHANGED')
1059 raidFrame:RegisterEvent('RAID_ROSTER_UPDATE')
1060 raidFrame:SetScript('OnEvent', raidFrameEventProcessor)
1061 raidFrame:Show()
1062
1063 arrangeEveryRaidGroupFrame(raidFrame)
1064 end
1065
1066 local function raidFrameToggle(raidFrame)
1067 assert (raidFrame ~= nil)
1068
1027 1069 if ChoirConfRaidFlag then if ChoirConfRaidFlag then
1028 raidFrame:Show()
1029 arrangeEveryRaidGroupFrame(raidFrame)
1070 raidFrameEnable(raidFrame)
1030 1071 else else
1031 raidFrame:Hide()
1072 raidFrameDisable(raidFrame)
1032 1073 end end
1033 1074 end end
1034 1075
 
... ... local function createRaidFrame(rootFrame, spoilerHolder)
1036 1077 assert (rootFrame ~= nil) assert (rootFrame ~= nil)
1037 1078 assert (spoilerHolder ~= nil) assert (spoilerHolder ~= nil)
1038 1079
1039 local maxPartySize = 5
1080 --[[local maxPartySize = 5]]--
1040 1081 local maxSubgroupQuantity = 8 local maxSubgroupQuantity = 8
1041 1082
1042 local buttonWidth = 72
1043 local buttonHeight = 12 * 6
1044 local padding = 2
1083 local groupWidth = 0
1084 local groupHeight = 0
1045 1085
1046 local labelWidth = 60
1047 1086 local raidFrame = CreateFrame('FRAME', 'ChoirRaidFrame', rootFrame) local raidFrame = CreateFrame('FRAME', 'ChoirRaidFrame', rootFrame)
1048 raidFrame:SetSize(labelWidth + (padding + buttonWidth) * maxPartySize,
1049 (padding + buttonHeight) * (maxSubgroupQuantity / 2))
1050 1087
1051 1088 local j = 0 local j = 0
1052 1089 while (j < maxSubgroupQuantity) do while (j < maxSubgroupQuantity) do
1053 1090 j = j + 1 j = j + 1
1054 createRaidGroupFrame(raidFrame, j)
1091 local g = createRaidGroupFrame(raidFrame, j)
1092 groupWidth = math.max(groupWidth, g:GetWidth())
1093 groupHeight = math.max(groupHeight, g:GetHeight())
1055 1094 end end
1056 1095
1057 1096 --[[ NOTE Appearance of the party frame is conditional, only shown outside of raid. --[[ NOTE Appearance of the party frame is conditional, only shown outside of raid.
 
... ... local function createRaidFrame(rootFrame, spoilerHolder)
1060 1099 local playerPartyFrame = createRaidGroupFrame(raidFrame, maxSubgroupQuantity + 1, partyUnitSet) local playerPartyFrame = createRaidGroupFrame(raidFrame, maxSubgroupQuantity + 1, partyUnitSet)
1061 1100 playerPartyFrame:SetScript('OnEvent', partyFrameEventProcessor) playerPartyFrame:SetScript('OnEvent', partyFrameEventProcessor)
1062 1101 partyFrameEventProcessor(playerPartyFrame) partyFrameEventProcessor(playerPartyFrame)
1102 groupWidth = math.max(groupWidth, playerPartyFrame:GetWidth())
1103 groupHeight = math.max(groupHeight, playerPartyFrame:GetHeight())
1104
1105 local maxColumnQuantity = 2
1106 local maxRowQuantity = 4
1107 assert (maxColumnQuantity * maxRowQuantity == maxSubgroupQuantity)
1108 raidFrame:SetSize(groupWidth * maxColumnQuantity,
1109 groupHeight * maxRowQuantity)
1063 1110
1064 1111 raidFrame:RegisterEvent('PARTY_CONVERTED_TO_RAID') raidFrame:RegisterEvent('PARTY_CONVERTED_TO_RAID')
1065 1112 raidFrame:RegisterEvent('PARTY_MEMBERS_CHANGED') raidFrame:RegisterEvent('PARTY_MEMBERS_CHANGED')
1066 1113 raidFrame:RegisterEvent('RAID_ROSTER_UPDATE') raidFrame:RegisterEvent('RAID_ROSTER_UPDATE')
1067 1114 raidFrame:SetScript('OnEvent', raidFrameEventProcessor) raidFrame:SetScript('OnEvent', raidFrameEventProcessor)
1068 arrangeEveryRaidGroupFrame(raidFrame)
1115 raidFrame:SetScript('OnShow', function(self)
1116 --[[ NOTE Ensure that raid frame will always be hidden
1117 -- given appropriate add-on configuration setting. ]]--
1118 if not ChoirConfRaidFlag then
1119 self:Hide()
1120 end
1121 end)
1122 raidFrameToggle(raidFrame)
1069 1123
1070 1124 --[[ WARNING For some bizzare reason, possibly related to concurrency, --[[ WARNING For some bizzare reason, possibly related to concurrency,
1071 1125 -- the raid toggling initialization __must__ be called here, -- the raid toggling initialization __must__ be called here,
 
... ... local function applyConfRaidFrameFactory(raidFrame, confRaidCheckButton, confRai
1522 1576 ChoirConfRaidY = y ChoirConfRaidY = y
1523 1577
1524 1578 raidFrame:SetPoint('BOTTOMLEFT', x, y) raidFrame:SetPoint('BOTTOMLEFT', x, y)
1525 if flag then
1526 raidFrame:Show()
1527 else
1528 raidFrame:Hide()
1529 end
1530 arrangeEveryRaidGroupFrame(raidFrame)
1579 raidFrameToggle(raidFrame)
1531 1580 end end
1532 1581 end end
1533 1582
 
... ... local function initConfRaidFrame(confFrame, raidFrame)
1611 1660 ChoirConfRaidFlag = true ChoirConfRaidFlag = true
1612 1661 ChoirConfRaidX = 256 ChoirConfRaidX = 256
1613 1662 ChoirConfRaidY = 768 - 48 * 8 / 2 ChoirConfRaidY = 768 - 48 * 8 / 2
1663
1614 1664 --[[ NOTE Refresh callback is executed implicitly here. ]]-- --[[ NOTE Refresh callback is executed implicitly here. ]]--
1615 1665 end end
1616 1666 confFrame.default = default confFrame.default = default
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/choir

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

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

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