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: make user configuration frame more robust f6423c6113559ed00f07a79584e6ef24f78e81d7 Vladyslav Bondarenko 2025-02-12 19:51:35
feat: prepare release 0.13.0 adc28078888e57f0f8f221d56ecc297044202b5f Vladyslav Bondarenko 2025-02-11 06:36:02
fix: remove invisible buttons obstructing clicks b4701b9c13fbdea44089eae83444e4a24a878a03 Vladyslav Bondarenko 2025-02-11 06:30:13
fix: position past party member correctly 91fad9b3decb82a8e289ca38b06a15c25dce19b0 Vladyslav Bondarenko 2025-02-10 20:24:23
fix: ensure pets party frame loads correctly 1dd2e348bd15aa642c36057c2f92484755a4cb57 Vladyslav Bondarenko 2025-02-09 23:14:40
feat!: integrate party pets frame f34c334ca838ca8c26106f89fa7e088bf74af36b Vladyslav Bondarenko 2025-02-09 22:59:14
fix: add robustness check to button factories b7e195cf9623c0e7280a2a76d34de2f078373852 Vladyslav Bondarenko 2025-02-09 20:48:36
feat: integrate pet frame with raid profiles 856c7021197a301ab04428bc0dfff4eaa77a0a43 Vladyslav Bondarenko 2025-02-09 20:47:03
fix!: update pet frame correctly 3d9a3ac39962ca2e39f7a330abe74a229b822e4e Vladyslav Bondarenko 2025-02-09 00:56:36
feat: add pet frame stub 4cbc49b6720943fb9929f3bce34887d425c36629 Vladyslav Bondarenko 2025-02-08 23:21:15
fix: trigger unit button on mouse down 730a9f8483b0ccf6d8bccae71c1ab83bbae08920 Vladyslav Bondarenko 2025-02-08 18:41:46
doc: fix minor documentation markup issues fc0a3ac65c9a4682025639d416083bbfc690023f Vladyslav Bondarenko 2025-02-05 11:40:51
fix: move role widget 2832bd50f728bb89412aff98d8d1776ce102fb92 Vladyslav Bondarenko 2025-02-04 20:02:58
feat: aura duration of less than one second 9d2be37d502e438ebb1c79bc9278fd7f189ec8d3 Vladyslav Bondarenko 2025-02-04 19:29:50
feat!: add ready check widget 54f77e083a30b5d2ea3d7c0facc4f04ae5a50524 Vladyslav Bondarenko 2025-02-04 18:56:01
fix: add numerical identifiers to raid frames 7805568e6500ba652f5489a84d78697dc81d1017 Vladyslav Bondarenko 2025-02-04 18:54:04
fix: remove generated XML from small raid 9ec89db68e9d2304df118b2500e8675a941e699c Vladyslav Bondarenko 2025-02-04 18:52:50
fix: unit backdrop dimensions d677e35bebff554b26c4240c1a2cb2b0327f1cf3 Vladyslav Bondarenko 2025-02-03 21:10:07
fix: remove XML generators 0430f8d2cc9c7cf5ee22ae518f42e2ce85d5d5e7 Vladyslav Bondarenko 2025-02-03 20:20:52
feat: change aura tooltip graphics bf7cb7b9b19ffb4850d8e72d8352af75a5bdccfa Vladyslav Bondarenko 2025-02-02 22:52:58
Commit f6423c6113559ed00f07a79584e6ef24f78e81d7 - fix: make user configuration frame more robust
Author: Vladyslav Bondarenko
Author date (UTC): 2025-02-12 19:51
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2025-02-12 19:51
Parent(s): d0a3f26c22df0484f0d681aaae7f707ce963a843
Signer:
Signing key: EFF9624877D25D02
Signing status: E
Tree: 99a1e295515ed41a90b02ec9ba78c1f90cb29921
File Lines added Lines deleted
chorus.toc 1 1
conf/lua-check/luacheckrc.lua 1 0
makefile 1 1
src/ChorusConfFrame.lua 406 54
src/ChorusConfFrame.xml 1 1
File chorus.toc changed (mode: 100644) (index 6c4dff2..4eb7ff0)
1 1 ##Interface: 30300 ##Interface: 30300
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 ##Version: 0.13.0
4 ##Version: 0.13.1
5 5 ##SavedVariables: ChorusUnitGroupRoleMap, ChorusConf, ChorusConfProfileName, ChorusLuacheckrcDump ##SavedVariables: ChorusUnitGroupRoleMap, ChorusConf, ChorusConfProfileName, ChorusLuacheckrcDump
6 6 src\Chorus.xml src\Chorus.xml
File conf/lua-check/luacheckrc.lua changed (mode: 100644) (index 886121f..961f350)
... ... stds.chorus = {
192 192 --[[ TODO Add script that populates created frames at runtime --[[ TODO Add script that populates created frames at runtime
193 193 --and saves the variables to a file, to make this name set --and saves the variables to a file, to make this name set
194 194 --exact. ]]-- --exact. ]]--
195 'CHORUS_CONF_FRAME_SUB_TEXT',
195 196 'Chorus', 'Chorus',
196 197 'ChorusAuraWeightMap', 'ChorusAuraWeightMap',
197 198 'ChorusConf', 'ChorusConf',
File makefile changed (mode: 100644) (index 2d7e8db..1593131)
6 6 # delimiters. Otherwise, the game client will quietly ignore the add-on and not # delimiters. Otherwise, the game client will quietly ignore the add-on and not
7 7 # load it. # load it.
8 8 NAME=chorus NAME=chorus
9 VERSION=0.13.0
9 VERSION=0.13.1
10 10 srcdir=./ srcdir=./
11 11
12 12 SHELL=/bin/sh SHELL=/bin/sh
File src/ChorusConfFrame.lua changed (mode: 100644) (index 334ce7a..dd83aaf)
2 2 @submodule chorus @submodule chorus
3 3 ]] ]]
4 4
5 local strtrim = strtrim
6
7 local InCombatLockdown = Chorus.test.InCombatLockdown or InCombatLockdown
8
9 local Chorus = Chorus
10
11 CHORUS_CONF_FRAME_SUB_TEXT = 'To drag and move Chorus frames with your mouse, ' ..
12 'check the box labeled `Movable`, then click the `Okay` button. Then, drag and ' ..
13 'move the frames as required. ' ..
14 "\n\nWARNING: Configuration can only be done out of combat."
15
16 local CHORUS_DEFAULT_PROFILE_NAME = 'main'
17
5 18 local movableFrameList = { local movableFrameList = {
6 19 ChorusSoloFrame, ChorusSoloFrame,
7 20 ChorusPartyFrame, ChorusPartyFrame,
 
... ... local movableFrameList = {
10 23 ChorusLargeRaidFrame, ChorusLargeRaidFrame,
11 24 } }
12 25
26 --[[--
27 Allow the position of the given frame to be set by the user clicking and
28 dragging their mouse on the frame.
29
30 @function movableEnable
31 @tparam frame frame the frame to enable dragging on
32 @return nothing, only produces side effects
33 ]]
13 34 local function movableEnable(frame) local function movableEnable(frame)
14 35 assert(frame ~= nil) assert(frame ~= nil)
15 36
 
... ... local function movableEnable(frame)
34 55 end end
35 56 end end
36 57
58 --[[--
59 Lock the position of the given frame. User will not be able to click and drag
60 it.
61
62 @function movableDisable
63 @tparam frame frame the frame to disable dragging on
64 @return nothing, only produces side effects
65 ]]
37 66 local function movableDisable(frame) local function movableDisable(frame)
38 67 assert(frame ~= nil) assert(frame ~= nil)
39 68
 
... ... local function movableDisable(frame)
58 87 end end
59 88 end end
60 89
61 local function savePoints(conf, profileName, frame)
90 --[[--
91 Check if given string is a valid token. A valid token starts with a lower case
92 letter, and contains only letters, numerals or underscores.
93
94 There should be a similar validator for record names and currently isn't.
95 Profile name does not allow for capital letters. Record names allow for capital
96 letters, to map exactly to frame names. Additionally, profile name is input by
97 user, and record names are programmed by developers. Therefore, there is less
98 need for validation for the record names.
99
100 @function isValidToken
101 @tparam string someToken a string to validate
102 @treturn boolean `true` if valid, `false` otherwise
103 @treturn string error message, useful for `function assert`
104 ]]
105 local function isValidToken(someToken)
106 return someToken == string.match(someToken, '[a-z]+[a-z0-9_]'),
107 'a token must begin with a lower case letter, and only contain lowercase letters, digits or underscores'
108 end
109
110 --[[--
111 Access a specific configuration profile from all existing profiles.
112
113 If requested profile does not exist, fail with an error.
114
115 This function is not explicitly aware of any persistency mechanisms.
116
117 @function getConfProfile
118 @tparam table conf a map of configuration profiles
119 @tparam string profileName token, that is a table key, that is the name of the required configuration profile
120 @treturn table the configuration profile, that is a map of frame records
121 ]]
122 local function getConfProfile(conf, profileName)
62 123 assert(conf ~= nil) assert(conf ~= nil)
63 124 assert('table' == type(conf)) assert('table' == type(conf))
64 125
126 profileName = profileName or CHORUS_DEFAULT_PROFILE_NAME
65 127 assert(profileName ~= nil) assert(profileName ~= nil)
66 128 assert('string' == type(profileName)) assert('string' == type(profileName))
67 profileName = strtrim(profileName)
68 assert(string.len(profileName) >= 1)
69 assert(string.len(profileName) <= 256)
129 assert(isValidToken(profileName))
70 130
131 local profile = conf[profileName]
132 assert(profile ~= nil,
133 'failed to find configuration profile "' .. tostring(profileName) .. '"')
134 assert('table' == type(profile))
135
136 return profile
137 end
138
139 --[[--
140 Access a configuration record with context specific values.
141
142 If requested record does not exist, create an empty record.
143
144 This function is not explicitly aware of any persistency mechanisms.
145
146 @function getConfRecord
147
148 @tparam table conf a map of configuration profiles
149
150 @tparam string profileName token, that is a table key, that is the name of the
151 required configuration profile
152
153 @tparam string recordName token, that is a table key, conventionally a valid
154 frame name, that is the name of a configuration record
155
156 @treturn table configuration record for the given name that is a key-value table
157 ]]
158 local function getConfRecord(conf, profileName, recordName)
159 local profile = getConfProfile(conf, profileName)
160 if not profile[recordName] then
161 profile[recordName] = {}
162 end
163
164 local record = profile[recordName]
165 assert(record ~= nil)
166 assert('table' == type(record))
167
168 return record
169 end
170
171 --[[--
172 Read the present position of the given frame and write it to the given
173 configuration profile.
174
175 @function savePoints
176
177 @tparam table conf a map of configuration profiles
178
179 @tparam string profileName token, that is a table key, that is the name of the
180 required configuration profile
181
182 @tparam frame frame given frame which position is to be saved
183
184 @treturn nothing, all changes are written to the tables provided as arguments
185 ]]
186 local function savePoints(conf, profileName, frame)
71 187 assert(frame ~= nil) assert(frame ~= nil)
72 188
73 189 local n = frame:GetName() local n = frame:GetName()
 
... ... local function savePoints(conf, profileName, frame)
81 197 return return
82 198 end end
83 199
84 local confProfile = conf[profileName]
85 assert(confProfile ~= nil)
86 assert('table' == type(confProfile))
87
88 local frameSettings = confProfile[n]
89 if not frameSettings then
90 frameSettings = {}
91 end
92 assert(frameSettings ~= nil)
93 assert('table' == type(frameSettings))
200 local frameSettings = getConfRecord(conf, profileName, n)
94 201
95 202 local record = {} local record = {}
96 203 local i = 0 local i = 0
97 while (i < 8) do
204 local j = math.min(math.max(0, math.floor(frame:GetNumPoints())), 8)
205 while (i < j) do
98 206 i = i + 1 i = i + 1
99 207 local point = {frame:GetPoint(i)} local point = {frame:GetPoint(i)}
100 208 if point[1] then if point[1] then
209 local relativeFrame = point[2]
210 if relativeFrame then
211 point[2] = relativeFrame:GetName()
212 end
101 213 record[i] = point record[i] = point
102 214 end end
103 215 end end
104 216
105 217 frameSettings.points = record frameSettings.points = record
218 end
219
220 --[[--
221 Set the position of the given frame.
222
223 Configuration records that saved variables mechanism persist require some
224 interpretation before they can be applied to the game state. Specifically, the
225 saved variables do not persist frame handles, only primitive values.
226
227 @function applyPoint
228 @tparam frame frame given frame which position to set
229 @tparam string anchor same as `FRAME:SetPoint`
230 @tparam string relativeFrameName frame name or `nil`, will be interpreted
231 @tparam string relativeAnchor same as `FRAME:SetPoint`
232 @tparam number x same as `FRAME:SetPoint`
233 @tparam number y same as `FRAME:SetPoint`
234 @treturn nothing, changes are applied to the frame provided as argument
235 ]]
236 local function applyPoint(frame, anchor, relativeFrameName, relativeAnchor, x, y)
237 assert(frame ~= nil)
238
239 assert(anchor ~= nil)
240 assert('string' == type(anchor))
241
242 local relativeFrame = nil
243 if relativeFrameName then
244 assert('string' == type(relativeFrameName))
245 relativeFrameName = strtrim(relativeFrameName)
246 relativeFrame = _G[relativeFrameName]
247 end
106 248
107 confProfile[n] = frameSettings
249 assert(x ~= nil)
250 assert('number' == type(x))
251
252 assert(y ~= nil)
253 assert('number' == type(y))
254
255 if nil == relativeFrameName and tostring(anchor) == tostring(relativeAnchor) then
256 frame:SetPoint(anchor, x, y)
257 elseif relativeFrame and relativeAnchor then
258 frame:SetPoint(anchor, relativeFrame, relativeAnchor, x, y)
259 else
260 error('unexpected point format')
261 end
108 262 end end
109 263
110 local function loadPoints(conf, profileName, frame)
111 assert(conf ~= nil)
112 assert('table' == type(conf))
264 --[[--
265 Read the given configuration profile and apply it's position settings to the
266 given frame.
113 267
114 assert(profileName ~= nil)
115 assert('string' == type(profileName))
116 profileName = strtrim(profileName)
117 assert(string.len(profileName) >= 1)
118 assert(string.len(profileName) <= 256)
268 @function loadPoints
269
270 @tparam table conf a map of configuration profiles
271
272 @tparam string profileName token, that is a table key, that is the name of the
273 required configuration profile
119 274
275 @tparam frame frame given frame which position is to be set
276
277 @treturn nothing, given frame current position will change
278 ]]
279 local function loadPoints(conf, profileName, frame)
120 280 assert(frame ~= nil) assert(frame ~= nil)
121 281
122 282 local n = frame:GetName() local n = frame:GetName()
 
... ... local function loadPoints(conf, profileName, frame)
130 290 return return
131 291 end end
132 292
133 local confProfile = conf[profileName]
134 assert(confProfile ~= nil,
135 'profile "' .. profileName .. '" does not exist')
136
137 local frameSettings = confProfile[n]
138 if not frameSettings then
139 return
140 end
293 local frameSettings = getConfRecord(conf, profileName, n)
141 294
142 295 local points = frameSettings.points local points = frameSettings.points
143 296 assert(points ~= nil, 'no frame position saved') assert(points ~= nil, 'no frame position saved')
144 297 assert('table' == type(points)) assert('table' == type(points))
298 frame:ClearAllPoints()
145 299 local i = 0 local i = 0
146 300 while (i < math.min(#points, 8)) do while (i < math.min(#points, 8)) do
147 301 i = i + 1 i = i + 1
148 302 local point = points[i] local point = points[i]
149 303 assert(point ~= nil) assert(point ~= nil)
150 304 assert('table' == type(point)) assert('table' == type(point))
151 if point[1] then
152 frame:SetPoint(unpack(point))
153 end
305 applyPoint(frame, unpack(point))
154 306 end end
155 307 end end
156 308
157 local function confApply(confFrame)
158 assert(confFrame ~= nil)
309 --[[--
310 Read the given configuration profile, then set the state of widgets and other
311 frames accordingly.
312
313 Note, this function does not deal with movable frame positions.
314
315 @function confRead
316
317 @tparam table conf a map of configuration profiles
318
319 @tparam string profileName token, that is a table key, that is the name of the
320 required configuration profile
321 ]]
322 local function confRead(conf, profileName)
323 local movableCheckbox = ChorusConfMovableCheckBox
324 assert(movableCheckbox ~= nil)
325
326 local n = movableCheckbox:GetName()
327 assert(n ~= nil)
328
329 local checkboxRecord = getConfRecord(conf, profileName, n)
330
331 checkboxRecord.checkedFlag = 1 == movableCheckbox:GetChecked()
332 end
333
334 --[[--
335 Read the current state of relevant widgets and frames, and write to the given
336 configuration profile.
159 337
160 local flag = 1 == ChorusConfMovableCheckBox:GetChecked()
338 Note, this function does not deal with movable frame positions.
339
340 @function confWrite
341
342 @tparam table conf a map of configuration profiles
343
344 @tparam string profileName token, that is a table key, that is the name of the
345 required configuration profile
346 ]]
347 local function confWrite(conf, profileName)
348 local movableCheckbox = ChorusConfMovableCheckBox
349 assert(movableCheckbox ~= nil)
350
351 local n = movableCheckbox:GetName()
352 assert(n ~= nil)
353
354 local checkboxRecord = getConfRecord(conf, profileName, n)
355 movableCheckbox:SetChecked(checkboxRecord.checkedFlag)
356 end
357
358 --[[--
359 Read the current position of all movable frames, and write values to the
360 configuration profile.
361
362 @function movableRead
363
364 @tparam table conf a map of configuration profiles
365
366 @tparam string profileName token, that is a table key, that is the name of the
367 required configuration profile
368 ]]
369 local function movableRead(conf, profileName)
370 local i = 0
371 while (i < #movableFrameList) do
372 i = i + 1
373 local f = movableFrameList[i]
374 assert(f ~= nil)
375 savePoints(conf, profileName, f)
376 end
377 end
378
379 --[[--
380 Read the given configuraiton profile, and set all movable frame positions
381 accordingly.
382
383 @function movableWrite
384
385 @tparam table conf a map of configuration profiles
386
387 @tparam string profileName token, that is a table key, that is the name of the
388 required configuration profile
389 ]]
390 local function movableWrite(conf, profileName)
391 local i = 0
392 while (i < #movableFrameList) do
393 i = i + 1
394 local f = movableFrameList[i]
395 assert(f ~= nil)
396 loadPoints(conf, profileName, f)
397 end
398 end
399
400 --[[--
401 Lock or unlock movable frames for user to drag accordingly with current
402 configuration profile.
403
404 @function movableToggle
405
406 @tparam table conf a map of configuration profiles
407
408 @tparam string profileName token, that is a table key, that is the name of the
409 required configuration profile
410 ]]
411 local function movableToggle(conf, profileName)
412 local checkboxRecord = getConfRecord(conf, profileName, 'ChorusConfMovableCheckBox')
413 local flag = checkboxRecord.checkedFlag
161 414
162 415 local i = 0 local i = 0
163 416 while (i < #movableFrameList) do while (i < #movableFrameList) do
 
... ... local function confApply(confFrame)
169 422 else else
170 423 movableDisable(f) movableDisable(f)
171 424 end end
172 savePoints(ChorusConf, ChorusConfProfileName, f)
173 425 end end
174 426 end end
175 427
428 --[[--
429 Run every time user clicks `Okay` button in configuration frame.
430
431 First it reads the state of configuration widgets, then persists the values
432 with saved variables mechanism.
433
434 @see confRead
435 @see movableToggle
436 @see movableRead
437
438 @function confOkay
439 @tparam frame confFrame configuration frame that holds configuration widgets
440 ]]
441 local function confOkay(confFrame)
442 assert(confFrame ~= nil)
443
444 confRead(ChorusConf, ChorusConfProfileName)
445 movableToggle(ChorusConf, ChorusConfProfileName)
446 movableRead(ChorusConf, ChorusConfProfileName)
447 end
448
449 --[[--
450 Run every time user opens configuration frame.
451
452 Sets the state of configuration widgets accordingly to current configuration
453 profile.
454
455 @see confWrite
456 @see movableToggle
457 @see movableRead
458
459 @function confRefresh
460 @tparam frame confFrame configuration frame that holds configuration widgets
461 ]]
462 local function confRefresh(confFrame)
463 assert(confFrame ~= nil)
464
465 confWrite(ChorusConf, ChorusConfProfileName)
466 end
467
468 --[[--
469 Run every time user clicks `Cancel` button in the configuration frame, or
470 otherwise exits configuration frame without confirming changes.
471
472 Resets the state of configuration widgets accordingly to current configuration
473 profile, without commiting partial changes.
474
475 @see confWrite
476 @see movableToggle
477 @see movableWrite
478
479 @function confCancel
480 @tparam frame confFrame configuration frame that holds configuration widgets
481 ]]
176 482 local function confCancel(confFrame) local function confCancel(confFrame)
177 ChorusConfMovableCheckBox:SetChecked(false)
483 assert(confFrame ~= nil)
178 484
179 confApply(confFrame)
485 confWrite(ChorusConf, ChorusConfProfileName)
486 movableToggle(ChorusConf, ChorusConfProfileName)
487 movableWrite(ChorusConf, ChorusConfProfileName)
180 488 end end
181 489
490 --[[--
491 Run every time user clicks `Defaults` button in the configuration frame.
492
493 Sets the state of all movable frames and configuration widgets to sane
494 defaults, resets current configuration profile and persists the changes.
495
496 @see confRead
497 @see movableToggle
498 @see movableRead
499
500 @function confDefault
501 @tparam frame confFrame configuration frame that holds configuration widgets
502 ]]
182 503 local function confDefault(confFrame) local function confDefault(confFrame)
504 assert(confFrame ~= nil)
505
183 506 ChorusConfMovableCheckBox:SetChecked(false) ChorusConfMovableCheckBox:SetChecked(false)
184 507
185 508 local i = 0 local i = 0
 
... ... local function confDefault(confFrame)
202 525 ChorusSmallRaidFrame:SetPoint('TOPLEFT', 0, 0) ChorusSmallRaidFrame:SetPoint('TOPLEFT', 0, 0)
203 526 ChorusLargeRaidFrame:SetPoint('TOPLEFT', 0, 0) ChorusLargeRaidFrame:SetPoint('TOPLEFT', 0, 0)
204 527
205 confApply(confFrame)
528 confRead(ChorusConf, ChorusConfProfileName)
529 movableToggle(ChorusConf, ChorusConfProfileName)
530 movableRead(ChorusConf, ChorusConfProfileName)
206 531 end end
207 532
533 --[[--
534 Should be run once after all saved variables are loaded. Applies current
535 configuration profile to the game state.
536
537 @function confFrameEventProcessor
538 @tparam frame confFrame configuration frame that holds configuration widgets
539 ]]
208 540 local function confFrameEventProcessor(confFrame) local function confFrameEventProcessor(confFrame)
209 541 assert(confFrame ~= nil) assert(confFrame ~= nil)
210 542
211 ChorusConf = ChorusConf or {['main'] = {}}
212 ChorusConfProfileName = ChorusConfProfileName or 'main'
543 ChorusConf = ChorusConf or {CHORUS_DEFAULT_PROFILE_NAME = {}}
544 ChorusConfProfileName = ChorusConfProfileName or CHORUS_DEFAULT_PROFILE_NAME
213 545
214 local i = 0
215 while (i < #movableFrameList) do
216 i = i + 1
217 local f = movableFrameList[i]
218 assert(f ~= nil)
219 loadPoints(ChorusConf, ChorusConfProfileName, f)
220 end
546 confWrite(ChorusConf, ChorusConfProfileName)
547 movableToggle(ChorusConf, ChorusConfProfileName)
548 movableWrite(ChorusConf, ChorusConfProfileName)
221 549 end end
222 550
223 function Chorus.confFrameMain(confFrame)
551 --[[--
552 Initialize configuration frame.
553
554 User configuration feature heavily relies on saved variables mechanism. This
555 mechanism persists Lua tables and primitives as plain text files, that are
556 saved between game sessions. When user enters world, these files are loaded and
557 drive the game user interface state.
558
559 All user configuration options are persisted in a single key value table
560 `ChorusConf`. Each key in configuration map is a profile name. By default,
561 there is only one profile, `main`.
562
563 The current configuration profile that is to be used by the script is set by
564 `ChorusConfProfileName`, by default it is set to `main`.
565
566 Each configuration profile is a key value table. Each key in the configuration
567 profile is a record name, that is usually a valid frame name, and each value is
568 a record. A record is a table with configuration values.
569
570 @function confFrameMain
571 @tparam frame confFrame configuration frame that holds configuration widgets
572 ]]
573 local function confFrameMain(confFrame)
224 574 assert(confFrame ~= nil) assert(confFrame ~= nil)
225 575
226 576 local n = GetAddOnMetadata('chorus', 'Title') or 'chorus' local n = GetAddOnMetadata('chorus', 'Title') or 'chorus'
 
... ... function Chorus.confFrameMain(confFrame)
230 580
231 581 confFrame.name = n confFrame.name = n
232 582
233 confFrame.okay = confApply
583 confFrame.okay = confOkay
234 584
235 585 confFrame.cancel = confCancel confFrame.cancel = confCancel
236 586
237 587 confFrame.default = confDefault confFrame.default = confDefault
238 588
239 confFrame.refresh = confApply
589 confFrame.refresh = confRefresh
240 590
241 591 InterfaceOptions_AddCategory(confFrame) InterfaceOptions_AddCategory(confFrame)
242 592
243 593 confFrame:RegisterEvent('VARIABLES_LOADED') confFrame:RegisterEvent('VARIABLES_LOADED')
244 594 confFrame:SetScript('OnEvent', confFrameEventProcessor) confFrame:SetScript('OnEvent', confFrameEventProcessor)
245 595 end end
596
597 Chorus.confFrameMain = confFrameMain
File src/ChorusConfFrame.xml changed (mode: 100644) (index f864461..5c2914d)
16 16 </Anchor> </Anchor>
17 17 </Anchors> </Anchors>
18 18 </FontString> </FontString>
19 <FontString name="$parentSubText" text="Chorus subtext paragraph." inherits="GameFontHighlightSmall" nonspacewrap="true" maxLines="3" justifyH="LEFT" justifyV="TOP">
19 <FontString name="$parentSubText" inherits="GameFontHighlightSmall" nonspacewrap="true" maxLines="6" justifyH="LEFT" justifyV="TOP" text="CHORUS_CONF_FRAME_SUB_TEXT">
20 20 <Size> <Size>
21 21 <AbsDimension x="32" y="0"/> <AbsDimension x="32" y="0"/>
22 22 </Size> </Size>
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