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)
feat!: drag chorus frames and save their positions e84a0e1d4a43760bbb177de901575ff10b388ccc Vladyslav Bondarenko 2025-01-29 09:37:39
fix: only drag frames out of combat 03ca7d9431c849e824699089dd82739f1c28870e Vladyslav Bondarenko 2025-01-28 07:43:06
feat: bump nightly version 05ac3fad466d01d2591439c6a39e5ae47d38803b Vladyslav Bondarenko 2025-01-27 21:37:11
feat!: add configuration menu 254bab612dbdadb0db925eab00cec81256b032ff Vladyslav Bondarenko 2025-01-27 21:30:05
fix: aura buttons do not violate borders 452ee7ff2e66a63e1c86f1cc1d9056b4ebe5cec4 Vladyslav Bondarenko 2025-01-27 18:02:08
fix: do not overlap tiny aura buttons 6f894b23eb90d2e88f57285ef7d5779550386ab9 Vladyslav Bondarenko 2025-01-27 17:58:48
fix: unify aura button logic 52c88f27f978e6ae528e4d04507f8c73184f904c Vladyslav Bondarenko 2025-01-27 17:50:00
feat!: extend huge unit with more aura buttons 36bba5e5bb7170758410ca3d7e3b619a68591937 Vladyslav Bondarenko 2025-01-17 14:58:43
feat!: extend huge unit with more aura buttons 368dd673050bd53efde56a17055100dc1f24c1ed Vladyslav Bondarenko 2025-01-17 14:58:43
fix: update TOT aura more frequently 29751221b920518b14a51c9bf1b486f5a177ad4f Vladyslav Bondarenko 2024-12-23 16:59:12
feat: rearrange solo and raid frames a7139f7359fe357808e97c4518369b49fd4cbd29 Vladyslav Bondarenko 2024-12-23 19:44:06
feat: arrange party frame vertically 55d13ff2eabd4d444c77cf6cdc664c83529f9c7d Vladyslav Bondarenko 2024-12-23 18:19:11
feat: change aura collapse button graphics 7085558a5afbcd942f3a9e368fdb617083304c5d Vladyslav Bondarenko 2024-12-20 22:45:32
fix: bump version 24da29749a723ae0a9025d23974d4ba5edfae720 Vladyslav Bondarenko 2024-12-04 03:43:51
fix: role widget toggle visibility correctly c8393fa228fc07c892993228f4a0b91b06cab319 Vladyslav Bondarenko 2024-12-03 08:00:46
fix: prepare release 0.11.0 c60fa1b56310a13399d60992f8334b0f88490fd1 Vladyslav Bondarenko 2024-12-03 03:56:40
fix: typo in aura frame initializator be11f220fc2d2e009a0be0258c23855993b71f2b Vladyslav Bondarenko 2024-12-02 12:12:55
fix: remove redundant initialization 611d5ec779272d3fcceefdc18852ee0de320e19d Vladyslav Bondarenko 2024-12-02 11:49:28
fix: adjust frames for all resolutions d378a6b25a5e8c87af367e199f57dc4b7781b26f Vladyslav Bondarenko 2024-12-02 11:13:10
fix: adjust buff priorities bfa198b18dfdfaab3db2d0f31e3b794eb52c9b9b Vladyslav Bondarenko 2024-12-02 10:32:14
Commit e84a0e1d4a43760bbb177de901575ff10b388ccc - feat!: drag chorus frames and save their positions
All unit and group frames may be moved and dragged, given the player is
out of combat and the corresponding settings checkbox is toggled. The
position is saved between game sessions.
Author: Vladyslav Bondarenko
Author date (UTC): 2025-01-29 09:37
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2025-01-29 09:37
Parent(s): 03ca7d9431c849e824699089dd82739f1c28870e
Signer:
Signing key: EFF9624877D25D02
Signing status: E
Tree: a5ed1cd88bfa0801b4b1467342f2da2e68967a6d
File Lines added Lines deleted
chorus.toc 1 1
src/ChorusConfFrame.lua 165 12
src/ChorusConfFrame.xml 104 6
src/ChorusPartyFrame.xml 7 0
src/ChorusSoloFrame.xml 1 1
File chorus.toc changed (mode: 100644) (index 7db358b..d52a0b0)
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.11.0-21-g254bab6 ##Version: 0.11.0-21-g254bab6
5 ##SavedVariables: ChorusUnitGroupRoleMap, ChorusLuacheckrcDump
5 ##SavedVariables: ChorusUnitGroupRoleMap, ChorusConf, ChorusConfProfileName, ChorusLuacheckrcDump
6 6 src\Chorus.xml src\Chorus.xml
File src/ChorusConfFrame.lua changed (mode: 100644) (index f40d192..1255367)
1 local movableFrameList = {
2 ChorusSoloFrame,
3 ChorusPartyFrame,
4 ChorusTinyRaidFrame,
5 ChorusSmallRaidFrame,
6 ChorusLargeRaidFrame,
7 }
8
1 9 local function movableEnable(frame) local function movableEnable(frame)
2 10 assert(frame ~= nil) assert(frame ~= nil)
3 11
 
... ... local function movableDisable(frame)
46 54 end end
47 55 end end
48 56
57 local function savePoints(conf, profileName, frame)
58 assert(conf ~= nil)
59 assert('table' == type(conf))
60
61 assert(profileName ~= nil)
62 assert('string' == type(profileName))
63 profileName = strtrim(profileName)
64 assert(string.len(profileName) >= 1)
65 assert(string.len(profileName) <= 256)
66
67 assert(frame ~= nil)
68
69 local n = frame:GetName()
70 assert(n ~= nil)
71 assert('string' == type(n))
72 n = strtrim(n)
73 assert(string.len(n) >= 1)
74 assert(string.len(n) <= 256)
75
76 if InCombatLockdown() then
77 return
78 end
79
80 local confProfile = conf[profileName]
81 assert(confProfile ~= nil)
82 assert('table' == type(confProfile))
83
84 local frameSettings = confProfile[n]
85 if not frameSettings then
86 frameSettings = {}
87 end
88 assert(frameSettings ~= nil)
89 assert('table' == type(frameSettigns))
90
91 local record = {}
92 local i = 0
93 while (i < 8) do
94 i = i + 1
95 local point = {frame:GetPoint(i)}
96 record[i] = point
97 end
98
99 frameSettings.points = record
100
101 confProfile[n] = frameSettings
102 end
103
104 local function loadPoints(conf, profileName, frame)
105 assert(conf ~= nil)
106 assert('table' == type(conf))
107
108 assert(profileName ~= nil)
109 assert('string' == type(profileName))
110 profileName = strtrim(profileName)
111 assert(string.len(profileName) >= 1)
112 assert(string.len(profileName) <= 256)
113
114 assert(frame ~= nil)
115
116 local n = frame:GetName()
117 assert(n ~= nil)
118 assert('string' == type(n))
119 n = strtrim(n)
120 assert(string.len(n) >= 1)
121 assert(string.len(n) <= 256)
122
123 if InCombatLockdown() then
124 return
125 end
126
127 local confProfile = conf[profileName]
128 assert(confProfile ~= nil,
129 'profile "' .. profileName .. '" does not exist')
130
131 local frameSettings = confProfile[n]
132 if not frameSettings then
133 print('ChorusConfFrame.lua: empty settings for frame "' .. n .. '"')
134 return
135 end
136
137 local points = frameSettings.points
138 assert(points ~= nil, 'no frame position saved')
139 assert('table' == type(points))
140 local i = 0
141 while (i < 8) do
142 i = i + 1
143 local point = points[i]
144 assert(point ~= nil)
145 assert('table' == type(point))
146 if point[3] and point[4] and point[5] then
147 frame:SetPoint(point[3], point[4], point[5])
148 end
149 end
150 end
151
49 152 local function confApply(confFrame) local function confApply(confFrame)
50 153 assert(confFrame ~= nil) assert(confFrame ~= nil)
51 154
52 155 local flag = ChorusConfMovableCheckBox:GetChecked() local flag = ChorusConfMovableCheckBox:GetChecked()
53 156
54 157 if flag then if flag then
55 movableEnable(ChorusSoloFrame)
158 local i = 0
159 while (i < #movableFrameList) do
160 i = i + 1
161 local f = movableFrameList[i]
162 assert(f ~= nil)
163 movableEnable(f)
164 end
56 165 else else
57 movableDisable(ChorusSoloFrame)
166 local i = 0
167 while (i < #movableFrameList) do
168 i = i + 1
169 local f = movableFrameList[i]
170 assert(f ~= nil)
171 movableDisable(f)
172 savePoints(ChorusConf, ChorusConfProfileName, f)
173 end
174 end
175 end
176
177 local function confCancel(confFrame)
178 ChorusConfMovableCheckBox:SetChecked(false)
179
180 confApply(confFrame)
181 end
182
183 local function confDefault(confFrame)
184 ChorusConfMovableCheckBox:SetChecked(false)
185
186 local i = 0
187 while (i < #movableFrameList) do
188 i = i + 1
189 local f = movableFrameList[i]
190 assert(f ~= nil)
191 f:ClearAllPoints()
192 end
193
194 --[[ Bypass as much of the saving mechanism on purpose, to provide
195 sane defaults even when saving breaks. ]]--
196
197 ChorusSoloFrame:SetPoint('CENTER', 0, 0)
198 ChorusPartyFrame:SetPoint('TOPLEFT', 0, 0)
199 ChorusTinyRaidFrame:SetPoint('TOPLEFT', 0, 0)
200 ChorusSmallRaidFrame:SetPoint('TOPLEFT', 0, 0)
201 ChorusLargeRaidFrame:SetPoint('TOPLEFT', 0, 0)
202
203 confApply(confFrame)
204 end
205
206 local function confFrameEventProcessor(confFrame)
207 ChorusConf = ChorusConf or {['main'] = {}}
208 ChorusConfProfileName = ChorusConfProfileName or 'main'
209
210 local i = 0
211 while (i < #movableFrameList) do
212 i = i + 1
213 local f = movableFrameList[i]
214 assert(f ~= nil)
215 loadPoints(ChorusConf, ChorusConfProfileName, f)
58 216 end end
59 217 end end
60 218
 
... ... function Chorus.confFrameMain(confFrame)
70 228
71 229 confFrame.okay = confApply confFrame.okay = confApply
72 230
73 confFrame.cancel = function(self)
74 ChorusConfMovableCheckBox:SetChecked(false)
75 confApply(self)
76 end
231 confFrame.cancel = confCancel
77 232
78 confFrame.default = function(self)
79 ChorusConfMovableCheckBox:SetChecked(false)
80 ChorusSoloFrame:ClearAllPoints()
81 ChorusSoloFrame:SetPoint('CENTER', 0, 0)
82 confApply(self)
83 end
233 confFrame.default = confDefault
84 234
85 235 confFrame.refresh = confApply confFrame.refresh = confApply
86 236
87 237 InterfaceOptions_AddCategory(confFrame) InterfaceOptions_AddCategory(confFrame)
238
239 confFrame:RegisterEvent('VARIABLES_LOADED')
240 confFrame:SetScript('OnEvent', confFrameEventProcessor)
88 241 end end
File src/ChorusConfFrame.xml changed (mode: 100644) (index aa64ae3..f864461)
37 37 </Layers> </Layers>
38 38 <Frames> <Frames>
39 39 <!-- See FrameXML/InterfaceOptionsPanels.xml --> <!-- See FrameXML/InterfaceOptionsPanels.xml -->
40 <!-- Movable toggle. -->
40 41 <CheckButton name="ChorusConfMovableCheckBox" inherits="InterfaceOptionsCheckButtonTemplate"> <CheckButton name="ChorusConfMovableCheckBox" inherits="InterfaceOptionsCheckButtonTemplate">
41 42 <Anchors> <Anchors>
42 43 <Anchor point="TOPLEFT" relativeTo="$parentSubText" relativePoint="BOTTOMLEFT"> <Anchor point="TOPLEFT" relativeTo="$parentSubText" relativePoint="BOTTOMLEFT">
 
51 52 </OnLoad> </OnLoad>
52 53 </Scripts> </Scripts>
53 54 </CheckButton> </CheckButton>
54 <!--
55 <Button name="ChorusConfDragEnableButton" inherits="UIPanelButtonTemplate" text="Drag Enable">
55 <!-- Visibility toggle buttons. -->
56 <Button name="ChorusConfSoloToggleButton" inherits="UIPanelButtonTemplate" text="Toggle Solo">
56 57 <Size> <Size>
57 <AbsDimension x="96" y="22"/>
58 <AbsDimension x="128" y="22"/>
58 59 </Size> </Size>
59 60 <Anchors> <Anchors>
60 <Anchor point="TOPLEFT">
61 <Anchor point="BOTTOMLEFT">
61 62 <Offset> <Offset>
62 <AbsDimension x="12" y="-36"/>
63 <AbsDimension x="48" y="30"/>
63 64 </Offset> </Offset>
64 65 </Anchor> </Anchor>
65 66 </Anchors> </Anchors>
67 <Scripts>
68 <OnClick>
69 local owner = ChorusSoloFrame
70 if owner:IsShown() then
71 owner:Hide()
72 else
73 owner:Show()
74 end
75 </OnClick>
76 </Scripts>
77 </Button>
78 <Button name="ChorusConfPartyToggleButton" inherits="UIPanelButtonTemplate" text="Toggle Party">
79 <Size>
80 <AbsDimension x="128" y="22"/>
81 </Size>
82 <Anchors>
83 <Anchor point="BOTTOMLEFT">
84 <Offset>
85 <AbsDimension x="48" y="60"/>
86 </Offset>
87 </Anchor>
88 </Anchors>
89 <Scripts>
90 <OnClick>
91 local owner = ChorusPartyFrame
92 if owner:IsShown() then
93 owner:Hide()
94 else
95 owner:Show()
96 end
97 </OnClick>
98 </Scripts>
99 </Button>
100 <Button name="ChorusConfTinyRaidToggleButton" inherits="UIPanelButtonTemplate" text="Toggle Tiny Raid">
101 <Size>
102 <AbsDimension x="128" y="22"/>
103 </Size>
104 <Anchors>
105 <Anchor point="BOTTOMLEFT">
106 <Offset>
107 <AbsDimension x="48" y="90"/>
108 </Offset>
109 </Anchor>
110 </Anchors>
111 <Scripts>
112 <OnClick>
113 local owner = ChorusTinyRaidFrame
114 if owner:IsShown() then
115 owner:Hide()
116 else
117 owner:Show()
118 end
119 </OnClick>
120 </Scripts>
121 </Button>
122 <Button name="ChorusConfSmallRaidToggleButton" inherits="UIPanelButtonTemplate" text="Toggle Small Raid">
123 <Size>
124 <AbsDimension x="128" y="22"/>
125 </Size>
126 <Anchors>
127 <Anchor point="BOTTOMLEFT">
128 <Offset>
129 <AbsDimension x="48" y="120"/>
130 </Offset>
131 </Anchor>
132 </Anchors>
133 <Scripts>
134 <OnClick>
135 local owner = ChorusSmallRaidFrame
136 if owner:IsShown() then
137 owner:Hide()
138 else
139 owner:Show()
140 end
141 </OnClick>
142 </Scripts>
143 </Button>
144 <Button name="ChorusConfLargeRaidToggleButton" inherits="UIPanelButtonTemplate" text="Toggle Large Raid">
145 <Size>
146 <AbsDimension x="128" y="22"/>
147 </Size>
148 <Anchors>
149 <Anchor point="BOTTOMLEFT">
150 <Offset>
151 <AbsDimension x="48" y="150"/>
152 </Offset>
153 </Anchor>
154 </Anchors>
155 <Scripts>
156 <OnClick>
157 local owner = ChorusLargeRaidFrame
158 if owner:IsShown() then
159 owner:Hide()
160 else
161 owner:Show()
162 end
163 </OnClick>
164 </Scripts>
66 165 </Button> </Button>
67 -->
68 166 </Frames> </Frames>
69 167 <Scripts> <Scripts>
70 168 <OnLoad>Chorus.confFrameMain(self);</OnLoad> <OnLoad>Chorus.confFrameMain(self);</OnLoad>
File src/ChorusPartyFrame.xml changed (mode: 100644) (index cfa6ebf..4737b8e)
47 47 <Offset x="0" y="0"/> <Offset x="0" y="0"/>
48 48 </Anchor> </Anchor>
49 49 </Anchors> </Anchors>
50 <Layers>
51 <Layer level="BACKGROUND">
52 <Texture name="$parentBackground" setAllPoints="true" hidden="true">
53 <Color r="0.87" g="0.67" b="0.08" a="0.34"/>
54 </Texture>
55 </Layer>
56 </Layers>
50 57 <Frames> <Frames>
51 58 <Frame name="ChorusPartyMemberFrame1" inherits="ChorusPartyMemberFrameTemplate" id="1"> <Frame name="ChorusPartyMemberFrame1" inherits="ChorusPartyMemberFrameTemplate" id="1">
52 59 <Anchors> <Anchors>
File src/ChorusSoloFrame.xml changed (mode: 100644) (index 9dd9051..23a22b1)
8 8 <Layers> <Layers>
9 9 <Layer level="BACKGROUND"> <Layer level="BACKGROUND">
10 10 <Texture name="$parentBackground" setAllPoints="true" hidden="true"> <Texture name="$parentBackground" setAllPoints="true" hidden="true">
11 <Color r="0" g="0" b="0" a="0.34"/>
11 <Color r="0.87" g="0.67" b="0.08" a="0.34"/>
12 12 </Texture> </Texture>
13 13 </Layer> </Layer>
14 14 </Layers> </Layers>
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