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: 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
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
Commit beedf659895a3ecdd0df97e14e63d87f534d0bbc - feat: show remaining aura charges
Author: Vladyslav Bondarenko
Author date (UTC): 2024-01-23 14:24
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2024-01-23 14:24
Parent(s): d0785edceabe16095e6e56aa42d88fb25bca3eb7
Signer:
Signing key: EFF9624877D25D02
Signing status: E
Tree: 73699b75c809348ca6122b3d3dec49b986ad8bc0
File Lines added Lines deleted
src/ChorusAuraButtonTemplate.lua 38 7
src/ChorusAuraButtonTemplate.xml 15 1
File src/ChorusAuraButtonTemplate.lua changed (mode: 100644) (index 591de11..f8a7e8e)
... ... local function formatDuration(durationSec)
86 86 assert('number' == type(durationSec)) assert('number' == type(durationSec))
87 87
88 88 local t local t
89 if durationSec < 60 then
89 local durationSecAbs = math.abs(durationSec)
90 if durationSecAbs < 60 then
90 91 t = string.format("%.0f", durationSec) t = string.format("%.0f", durationSec)
91 elseif durationSec < 3600 then
92 elseif durationSecAbs < 3600 then
92 93 t = string.format("%.0f m", durationSec / 60) t = string.format("%.0f m", durationSec / 60)
93 elseif durationSec < 3600 * 24 then
94 elseif durationSecAbs < 3600 * 24 then
94 95 t = string.format("%.0f h", durationSec / 60 / 60) t = string.format("%.0f h", durationSec / 60 / 60)
95 96 else else
96 97 t = string.format("%.0f d", durationSec / 60 / 60 / 24) t = string.format("%.0f d", durationSec / 60 / 60 / 24)
 
... ... local function applyDuration(auraButton, now, totalDurationSec, expirationInstan
121 122 durationRemainingSec = expirationInstance - now durationRemainingSec = expirationInstance - now
122 123 end end
123 124
124 local t = nil
125 local t
125 126 if durationRemainingSec then if durationRemainingSec then
126 127 t = formatDuration(durationRemainingSec) t = formatDuration(durationRemainingSec)
128 else
129 --[[ The aura button text is color coded to report if the owner
130 of the aura is the user or another player. Therefore, the
131 label should never be empty. ]]--
132 t = '∞'
127 133 end end
128 134
129 135 label:SetText(t) label:SetText(t)
 
... ... local function applyDuration(auraButton, now, totalDurationSec, expirationInstan
136 142 end end
137 143 end end
138 144
145 local function applyChargeQuantity(auraButton, chargeQuantity)
146 auraButtonValidate(auraButton)
147
148 local label = auraButton.label2
149 assert (label ~= nil)
150
151 local t = nil
152 if chargeQuantity then
153 assert(chargeQuantity ~= nil)
154 assert('number' == type(chargeQuantity))
155 chargeQuantity = math.abs(math.floor(chargeQuantity))
156 if chargeQuantity < 2 then
157 t = nil
158 elseif chargeQuantity < 100 then
159 t = string.format('%d', chargeQuantity)
160 else
161 t = '>99'
162 end
163 end
164 label:SetText(t)
165 end
166
139 167 local function auraButtonUpdateProcessor(self) local function auraButtonUpdateProcessor(self)
140 168 local unitDesignation = SecureButton_GetUnit(self) local unitDesignation = SecureButton_GetUnit(self)
141 169 local index = self.index local index = self.index
 
... ... local function auraButtonUpdateProcessor(self)
143 171 if not unitDesignation or not index then if not unitDesignation or not index then
144 172 return return
145 173 end end
146 local name, _, _, _, _, durationSec, expirationInstance = UnitAura(unitDesignation, index, filter)
174 local name, _, _, chargeQuantity, _, durationSec, expirationInstance = UnitAura(unitDesignation, index, filter)
147 175 if not name then if not name then
148 176 return return
149 177 end end
150 178 applyDuration(self, GetTime(), durationSec, expirationInstance) applyDuration(self, GetTime(), durationSec, expirationInstance)
179 applyChargeQuantity(self, chargeQuantity)
151 180 end end
152 181
153 182 local function apply(auraButton, unitDesignation, auraIndex, filter) local function apply(auraButton, unitDesignation, auraIndex, filter)
 
... ... local function apply(auraButton, unitDesignation, auraIndex, filter)
176 205 return return
177 206 end end
178 207
179 local name, _, artworkFile, _, category, durationSec, expirationInstance,
208 local name, _, artworkFile, chargeQuantity, category, durationSec, expirationInstance,
180 209 owner = UnitAura(unitDesignation, auraIndex, filter) owner = UnitAura(unitDesignation, auraIndex, filter)
181 210 if name then if name then
182 211 auraButton:Show() auraButton:Show()
 
... ... local function apply(auraButton, unitDesignation, auraIndex, filter)
190 219 applyArtwork(auraButton, artworkFile) applyArtwork(auraButton, artworkFile)
191 220 applyDuration(auraButton, GetTime(), durationSec, expirationInstance) applyDuration(auraButton, GetTime(), durationSec, expirationInstance)
192 221 applyOverlay(auraButton, category, owner) applyOverlay(auraButton, category, owner)
222 applyChargeQuantity(auraButton, chargeQuantity)
193 223 end end
194 224
195 225 local function auraButtonEventProcessor(self, eventCategory, ...) local function auraButtonEventProcessor(self, eventCategory, ...)
 
... ... function Chorus.auraButtonMain(self)
257 287 local n = self:GetName() local n = self:GetName()
258 288 if n then if n then
259 289 self.artwork = _G[n .. 'Artwork'] self.artwork = _G[n .. 'Artwork']
260 self.label = _G[n .. 'Text']
290 self.label = _G[n .. 'Text1']
291 self.label2 = _G[n .. 'Text2']
261 292 self.overlay = _G[n .. 'Overlay'] self.overlay = _G[n .. 'Overlay']
262 293 end end
263 294 self:SetScript('OnEvent', auraButtonEventProcessor) self:SetScript('OnEvent', auraButtonEventProcessor)
File src/ChorusAuraButtonTemplate.xml changed (mode: 100644) (index 31a6d23..45e99c5)
35 35 </Anchors> </Anchors>
36 36 <TexCoords left="0.296875" right="0.5703125" top="0" bottom="0.515625"/> <TexCoords left="0.296875" right="0.5703125" top="0" bottom="0.515625"/>
37 37 </Texture> </Texture>
38 <FontString name="$parentText" inherits="ChorusFont12Mono" setAllPoints="true" justifyV="BOTTOM" justifyH="CENTER">
38 <FontString name="$parentText1" inherits="ChorusFont12Mono" setAllPoints="true" justifyV="BOTTOM" justifyH="CENTER">
39 39 <Anchors> <Anchors>
40 40 <Anchor point="BOTTOMLEFT"> <Anchor point="BOTTOMLEFT">
41 41 <Offset> <Offset>
 
49 49 </Anchor> </Anchor>
50 50 </Anchors> </Anchors>
51 51 </FontString> </FontString>
52 <FontString name="$parentText2" inherits="ChorusFont12Mono" setAllPoints="true" justifyV="TOP" justifyH="RIGHT">
53 <Anchors>
54 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
55 <Offset>
56 <AbsDimension x="0" y="-24"/>
57 </Offset>
58 </Anchor>
59 <Anchor point="TOPRIGHT">
60 <Offset>
61 <AbsDimension x="0" y="0"/>
62 </Offset>
63 </Anchor>
64 </Anchors>
65 </FontString>
52 66 </Layer> </Layer>
53 67 </Layers> </Layers>
54 68 <Scripts> <Scripts>
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