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!: Update unit frame layout framework 1af4c0bd53a474483d60425f2a4e40250367ecf1 Vladyslav Bondarenko 2023-08-29 21:20:40
feat: Classify rare or elite units dd2c1f490c08a75774be085b318ebcd1b2788a2b Vladyslav Bondarenko 2023-08-29 21:18:49
feat(build): Remove cgitrc 1e6b59264abab70e1f2fa9ae494c74d2606c060f Vladyslav Bondarenko 2023-08-29 14:37:03
feat(build): Add cgitrc 7288f0336e36010fb92bf60479fdca3a0082ecd1 Vladyslav Bondarenko 2023-08-29 14:14:24
feat(build): Add cgitrc ea45afc0375774c2fe6bb0a3237cfd1817529ff0 Vladyslav Bondarenko 2023-08-29 14:14:24
feat(test)!: Toggle debug mode at runtime 23c37e3ab2eaf924f41fe51adc1e54f525222a8b Vladyslav Bondarenko 2023-08-29 03:41:55
fix: Aura tooltip is always opaque 1f7ba009c71796093b8cfa63cb38d918b9696c79 Vladyslav Bondarenko 2023-08-29 01:31:40
fix: Adjust aura tooltip toggle button layout fc72d10b09f44ef9ba6f2f93413a20def40c2d4a Vladyslav Bondarenko 2023-08-29 01:30:27
feat!: Add role widget 0ac8cda6522056c8adb527ba2f144229f251f69e Vladyslav Bondarenko 2023-08-29 00:59:14
fix: Only show power bar when appropriate 5313d1bfbf676c88b5c2a0a56fbea88549633b7b Vladyslav Bondarenko 2023-08-28 22:46:36
feat!: Toggle detailed unit aura tooltip in combat 460c622c04a8b0fa503c2a5d45313b667809b95c Vladyslav Bondarenko 2023-08-28 19:26:25
feat!: Add detailed buff and debuff popup 1ff7bcff470419c7fa40c6b946e441867dda4825 Vladyslav Bondarenko 2023-08-27 20:42:05
fix!: Further specialize every aura frame 1ec8385427bda76ea40840e68da7f5948d5af9bd Vladyslav Bondarenko 2023-08-27 18:40:55
feat: Add combat status indicator to unit buttons 38e469e01eb581693fd22f69b0739ea308d94966 Vladyslav Bondarenko 2023-08-27 16:35:38
fix!: Show raid targeting icon correctly ae5a1c5541d4bf137ea287671eb1f558422b26f4 Vladyslav Bondarenko 2023-08-27 15:24:57
fix!: Disable test mockup for release 0.4 54113d6a7f222ea2f382a1d5382c8e941e7537b1 Vladyslav Bondarenko 2023-08-26 22:42:33
fix: Apply source formatting before 0.4 cb1c5f11b553aba43751091c8746abdf261806e6 Vladyslav Bondarenko 2023-08-26 22:36:57
fix!: Cast bar consistent between targets a7c5e11ec5094033e946a95002010e5b02d6da74 Vladyslav Bondarenko 2023-08-26 21:56:35
fix(test)!: Add primitive test mockups f2b7fcf2058c7c1b61ef43241f55e92a5113bf57 Vladyslav Bondarenko 2023-08-26 16:55:54
feat(build): Update project descriptors for 0.3 740e01cc3a8888e0500ce213d7901f66625919ab Vladyslav Bondarenko 2023-08-25 21:15:10
Commit 1af4c0bd53a474483d60425f2a4e40250367ecf1 - feat!: Update unit frame layout framework
Unit frame layout must be final at initializaiton time. Add templates
that clearly specialize different flavours of frames, instead of having
them be dynamically change at runtime using Lua snippets. Additionally,
apply the updated layout to solo frames. Party and raid frames still use
old layout. Next step is to replace old layout completely, before raid
profiles can be implemented.

This is the first step in the attempt to finalize frame layout. It
misses some features that were already present but were implemented
sloppily. They must be added back in. Specifically unit context menu for
player, target and focus. Also there should be an option to toggle
native solo frames.
Author: Vladyslav Bondarenko
Author date (UTC): 2023-08-29 21:20
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2023-08-29 21:20
Parent(s): dd2c1f490c08a75774be085b318ebcd1b2788a2b
Signer:
Signing key: EFF9624877D25D02
Signing status: E
Tree: cfe4de9f315e723f8959c18b31c398634c784a88
File Lines added Lines deleted
src/Chorus.xml 1 0
src/ChorusAuraFrameTemplate.xml 61 0
src/ChorusFrame.xml 43 100
src/ChorusHealthFrameTemplate.xml 44 0
src/ChorusHugeUnitFrameTemplate.xml 168 0
src/ChorusPowerFrameTemplate.xml 27 0
src/ChorusProgressFrameTemplate.lua 46 80
src/ChorusProgressFrameTemplate.xml 1 28
src/ChorusRangeFrameTemplate.xml 1 1
src/ChorusThreatFrameTemplate.xml 10 1
src/ChorusUnitButtonTemplate.xml 9 10
src/ChorusUnitNameFrameTemplate.xml 1 1
File src/Chorus.xml changed (mode: 100644) (index 572aca4..6305201)
21 21 <Include file="ChorusUnitAffectingCombatFrameTemplate.xml"/> <Include file="ChorusUnitAffectingCombatFrameTemplate.xml"/>
22 22 <Include file="ChorusUnitGroupRoleFrameTemplate.xml"/> <Include file="ChorusUnitGroupRoleFrameTemplate.xml"/>
23 23 <Include file="ChorusUnitButtonTemplate.xml"/> <Include file="ChorusUnitButtonTemplate.xml"/>
24 <Include file="ChorusHugeUnitFrameTemplate.xml"/>
24 25 <Include file="ChorusPartyFrame.xml"/> <Include file="ChorusPartyFrame.xml"/>
25 26 <Include file="ChorusRaidFrame.xml"/> <Include file="ChorusRaidFrame.xml"/>
26 27 <Include file="ChorusFrame.xml"/> <Include file="ChorusFrame.xml"/>
File src/ChorusAuraFrameTemplate.xml changed (mode: 100644) (index ac28d48..dfaea8e)
10 10 <Attribute name="useparent-unit" type="boolean" value="true"/> <Attribute name="useparent-unit" type="boolean" value="true"/>
11 11 </Attributes> </Attributes>
12 12 </Frame> </Frame>
13 <Frame name="ChorusLargeAuraFrameTemplate" inherits="ChorusAuraFrameTemplate" virtual="true">
14 <Size>
15 <AbsDimension x="240" y="30"/>
16 </Size>
17 <Frames>
18 <Frame name="$parentAuraButton1" inherits="ChorusAuraButtonTemplate" id="1">
19 <Anchors>
20 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="BOTTOMLEFT">
21 <Offset>
22 <AbsDimension x="0" y="0"/>
23 </Offset>
24 </Anchor>
25 </Anchors>
26 </Frame>
27 <Frame name="$parentAuraButton2" inherits="ChorusAuraButtonTemplate" id="2">
28 <Anchors>
29 <Anchor point="BOTTOMLEFT" relativeTo="$parentAuraButton1" relativePoint="BOTTOMRIGHT">
30 <Offset>
31 <AbsDimension x="0" y="0"/>
32 </Offset>
33 </Anchor>
34 </Anchors>
35 </Frame>
36 <Frame name="$parentAuraButton3" inherits="ChorusAuraButtonTemplate" id="3">
37 <Anchors>
38 <Anchor point="BOTTOMLEFT" relativeTo="$parentAuraButton2" relativePoint="BOTTOMRIGHT">
39 <Offset>
40 <AbsDimension x="0" y="0"/>
41 </Offset>
42 </Anchor>
43 </Anchors>
44 </Frame>
45 <Frame name="$parentAuraButton4" inherits="ChorusAuraButtonTemplate" id="4">
46 <Anchors>
47 <Anchor point="BOTTOMLEFT" relativeTo="$parentAuraButton3" relativePoint="BOTTOMRIGHT">
48 <Offset>
49 <AbsDimension x="0" y="0"/>
50 </Offset>
51 </Anchor>
52 </Anchors>
53 </Frame>
54 <Frame name="$parentAuraButton5" inherits="ChorusAuraButtonTemplate" id="5">
55 <Anchors>
56 <Anchor point="BOTTOMLEFT" relativeTo="$parentAuraButton4" relativePoint="BOTTOMRIGHT">
57 <Offset>
58 <AbsDimension x="0" y="0"/>
59 </Offset>
60 </Anchor>
61 </Anchors>
62 </Frame>
63 <Frame name="$parentAuraButton6" inherits="ChorusAuraButtonTemplate" id="6">
64 <Anchors>
65 <Anchor point="BOTTOMLEFT" relativeTo="$parentAuraButton5" relativePoint="BOTTOMRIGHT">
66 <Offset>
67 <AbsDimension x="0" y="0"/>
68 </Offset>
69 </Anchor>
70 </Anchors>
71 </Frame>
72 </Frames>
73 </Frame>
13 74 </Ui> </Ui>
File src/ChorusFrame.xml changed (mode: 100644) (index 63d4746..91d2f28)
2 2 <Ui xmlns="http://www.blizzard.com/wow/ui/"> <Ui xmlns="http://www.blizzard.com/wow/ui/">
3 3 <Script file="ChorusFrame.lua"/> <Script file="ChorusFrame.lua"/>
4 4 <Frame name="ChorusFrame"> <Frame name="ChorusFrame">
5 <!-- TODO Add back disabling of native frames.
5 6 <Scripts> <Scripts>
6 7 <OnLoad>Chorus.chorusFrameMain(self);</OnLoad> <OnLoad>Chorus.chorusFrameMain(self);</OnLoad>
7 8 </Scripts> </Scripts>
9 -->
8 10 </Frame> </Frame>
9 <!-- TODO Find a better way to solve the issue of __hidden__ buttons obstructing mouse clicks. -->
10 <Frame name="ChorusPlayerFrame">
11 <Size>
12 <AbsDimension x="288" y="210"/>
13 </Size>
11 <!-- TODO Toggle unit frame visibility when units update. -->
12 <Frame name="ChorusHugePlayerFrame" inherits="ChorusHugeUnitFrameTemplate">
14 13 <Anchors> <Anchors>
15 14 <Anchor point="TOP"> <Anchor point="TOP">
16 <Offset x="-288" y="0"/>
15 <Offset x="-288" y="-100"/>
17 16 </Anchor> </Anchor>
18 17 <Anchor point="CENTER"> <Anchor point="CENTER">
19 18 <Offset x="0" y="0"/> <Offset x="0" y="0"/>
20 19 </Anchor> </Anchor>
21 20 </Anchors> </Anchors>
22 <Frames>
23 <Button name="ChorusPlayerButton" inherits="ChorusHugeUnitButtonTemplate">
24 <Anchors>
25 <Anchor point="TOPLEFT">
26 <Offset x="0" y="0"/>
27 </Anchor>
28 </Anchors>
29 <Attributes>
30 <Attribute name="unit" type="string" value="player"/>
31 <Attribute name="type2" type="string" value="menu"/>
32 </Attributes>
33 </Button>
34 <Button name="ChorusPetButton" inherits="ChorusSmallUnitButtonTemplate">
35 <Anchors>
36 <Anchor point="TOPLEFT" relativeTo="ChorusPlayerButton" relativePoint="BOTTOMLEFT">
37 <Offset x="0" y="-6"/>
38 </Anchor>
39 </Anchors>
40 <Attributes>
41 <Attribute name="unit" type="string" value="pet"/>
42 </Attributes>
43 </Button>
44 </Frames>
45 21 <Attributes> <Attributes>
22 <!-- TODO Add back player context menu popup on right click. -->
46 23 <Attribute name="unit" type="string" value="player"/> <Attribute name="unit" type="string" value="player"/>
47 24 </Attributes> </Attributes>
48 <Scripts>
49 <OnLoad>
50 RegisterUnitWatch(self);
51 </OnLoad>
52 </Scripts>
53 25 </Frame> </Frame>
54 <Frame name="ChorusTargetFrame">
55 <Size>
56 <AbsDimension x="288" y="210"/>
57 </Size>
26 <Frame name="ChorusHugeTargetFrame" inherits="ChorusHugeUnitFrameTemplate">
58 27 <Anchors> <Anchors>
59 28 <Anchor point="TOP"> <Anchor point="TOP">
60 <Offset x="0" y="0"/>
29 <Offset x="-288" y="-300"/>
61 30 </Anchor> </Anchor>
62 31 <Anchor point="CENTER"> <Anchor point="CENTER">
63 32 <Offset x="0" y="0"/> <Offset x="0" y="0"/>
64 33 </Anchor> </Anchor>
65 34 </Anchors> </Anchors>
66 <Frames>
67 <Button name="ChorusTargetButton" inherits="ChorusHugeUnitButtonTemplate">
68 <Anchors>
69 <Anchor point="TOPLEFT">
70 <Offset x="0" y="0"/>
71 </Anchor>
72 </Anchors>
73 <Attributes>
74 <Attribute name="unit" type="string" value="target"/>
75 <Attribute name="type2" type="string" value="menu"/>
76 </Attributes>
77 </Button>
78 <Button name="ChorusTargetTargetButton" inherits="ChorusSmallUnitButtonTemplate">
79 <Anchors>
80 <Anchor point="TOPLEFT" relativeTo="ChorusTargetButton" relativePoint="BOTTOMLEFT">
81 <Offset x="0" y="-6"/>
82 </Anchor>
83 </Anchors>
84 <Attributes>
85 <Attribute name="unit" type="string" value="targettarget"/>
86 </Attributes>
87 </Button>
88 </Frames>
89 35 <Attributes> <Attributes>
36 <!-- TODO Add back target context menu popup on right click. -->
90 37 <Attribute name="unit" type="string" value="target"/> <Attribute name="unit" type="string" value="target"/>
91 38 </Attributes> </Attributes>
92 <Scripts>
93 <OnLoad>
94 RegisterUnitWatch(self);
95 </OnLoad>
96 </Scripts>
97 39 </Frame> </Frame>
98 <Frame name="ChorusFocusFrame">
99 <Size>
100 <AbsDimension x="288" y="210"/>
101 </Size>
40 <Frame name="ChorusHugeFocusFrame" inherits="ChorusHugeUnitFrameTemplate">
102 41 <Anchors> <Anchors>
103 42 <Anchor point="TOP"> <Anchor point="TOP">
104 <Offset x="288" y="0"/>
43 <Offset x="288" y="-100"/>
105 44 </Anchor> </Anchor>
106 45 <Anchor point="CENTER"> <Anchor point="CENTER">
107 46 <Offset x="0" y="0"/> <Offset x="0" y="0"/>
108 47 </Anchor> </Anchor>
109 48 </Anchors> </Anchors>
110 <Frames>
111 <Button name="ChorusFocusButton" inherits="ChorusHugeUnitButtonTemplate">
112 <Anchors>
113 <Anchor point="TOPLEFT">
114 <Offset x="0" y="0"/>
115 </Anchor>
116 </Anchors>
117 <Attributes>
118 <Attribute name="unit" type="string" value="focus"/>
119 <Attribute name="type2" type="string" value="menu"/>
120 </Attributes>
121 </Button>
122 <Button name="ChorusFocusTargetButton" inherits="ChorusSmallUnitButtonTemplate">
123 <Anchors>
124 <Anchor point="TOPLEFT" relativeTo="ChorusFocusButton" relativePoint="BOTTOMLEFT">
125 <Offset x="0" y="-6"/>
126 </Anchor>
127 </Anchors>
128 <Attributes>
129 <Attribute name="unit" type="string" value="focustarget"/>
130 </Attributes>
131 </Button>
132 </Frames>
133 49 <Attributes> <Attributes>
50 <!-- TODO Add back context menu popup on right click. -->
134 51 <Attribute name="unit" type="string" value="focus"/> <Attribute name="unit" type="string" value="focus"/>
135 52 </Attributes> </Attributes>
136 <Scripts>
137 <OnLoad>
138 RegisterUnitWatch(self);
139 </OnLoad>
140 </Scripts>
141 53 </Frame> </Frame>
54 <Button name="ChorusHugePlayerPetButton" inherits="ChorusSmallUnitButtonTemplate">
55 <Anchors>
56 <Anchor point="TOPRIGHT" relativeTo="ChorusHugePlayerFrame" relativePoint="TOPLEFT">
57 <Offset x="-6" y="-6"/>
58 </Anchor>
59 </Anchors>
60 <Attributes>
61 <Attribute name="unit" type="string" value="pet"/>
62 </Attributes>
63 </Button>
64 <Button name="ChorusHugeTargetTargetButton" inherits="ChorusSmallUnitButtonTemplate">
65 <Anchors>
66 <Anchor point="TOPRIGHT" relativeTo="ChorusHugeTargetFrame" relativePoint="TOPLEFT">
67 <Offset x="-6" y="-6"/>
68 </Anchor>
69 </Anchors>
70 <Attributes>
71 <Attribute name="unit" type="string" value="targettarget"/>
72 </Attributes>
73 </Button>
74 <Button name="ChorusHugeFocusTargetButton" inherits="ChorusSmallUnitButtonTemplate">
75 <Anchors>
76 <Anchor point="TOPLEFT" relativeTo="ChorusHugeFocusFrame" relativePoint="TOPRIGHT">
77 <Offset x="6" y="-6"/>
78 </Anchor>
79 </Anchors>
80 <Attributes>
81 <Attribute name="unit" type="string" value="focustarget"/>
82 </Attributes>
83 </Button>
84
142 85 </Ui> </Ui>
File src/ChorusHealthFrameTemplate.xml changed (mode: 100644) (index 9a7f36d..4aad3fc)
9 9 <Attribute name="useparent-unit" type="boolean" value="true"/> <Attribute name="useparent-unit" type="boolean" value="true"/>
10 10 </Attributes> </Attributes>
11 11 </StatusBar> </StatusBar>
12 <!-- Huge health bar shows percentage, current amount and current deficit in the middle of the frame. -->
13 <StatusBar name="ChorusHugeHealthFrameTemplate" inherits="ChorusHealthFrameTemplate" virtual="true">
14 <Size>
15 <AbsDimension x="144" y="48"/>
16 </Size>
17 <Layers>
18 <Layer level="OVERLAY">
19 <FontString name="$parentText1" inherits="ChorusFont12Mono" justifyH="LEFT" justifyV="MIDDLE" setAllPoints="true"/>
20 <FontString name="$parentText2" inherits="ChorusFont12Mono" justifyH="CENTER" justifyV="MIDDLE" setAllPoints="true"/>
21 <FontString name="$parentText3" inherits="ChorusFont12Mono" justifyH="RIGHT" justifyV="MIDDLE" setAllPoints="true">
22 <Color r="1" g="0" b="0"/>
23 </FontString>
24 </Layer>
25 </Layers>
26 </StatusBar>
27 <!-- Large health bar shows percentage and current amount in the middle of the frame. -->
28 <StatusBar name="ChorusLargeHealthFrameTemplate" inherits="ChorusHealthFrameTemplate" virtual="true">
29 <Size>
30 <AbsDimension x="144" y="48"/>
31 </Size>
32 <Layers>
33 <Layer level="OVERLAY">
34 <FontString name="$parentText1" inherits="ChorusFont12Mono" justifyH="LEFT" justifyV="MIDDLE" setAllPoints="true"/>
35 <FontString name="$parentText2" inherits="ChorusFont12Mono" justifyH="RIGHT" justifyV="MIDDLE" setAllPoints="true"/>
36 </Layer>
37 </Layers>
38 </StatusBar>
39 <!-- Small health bar shows percentage at the bottom of the frame. -->
40 <StatusBar name="ChorusSmallHealthFrameTemplate" inherits="ChorusHealthFrameTemplate" virtual="true">
41 <Size>
42 <AbsDimension x="144" y="48"/>
43 </Size>
44 <Layers>
45 <Layer level="OVERLAY">
46 <FontString name="$parentText1" inherits="ChorusFont12Mono" justifyH="LEFT" justifyV="BOTTOM" setAllPoints="true"/>
47 </Layer>
48 </Layers>
49 </StatusBar>
50 <!-- Tiny health bar shows no amounts. -->
51 <StatusBar name="ChorusTinyHealthFrameTemplate" inherits="ChorusHealthFrameTemplate" virtual="true">
52 <Size>
53 <AbsDimension x="36" y="12"/>
54 </Size>
55 </StatusBar>
12 56 </Ui> </Ui>
File src/ChorusHugeUnitFrameTemplate.xml added (mode: 100644) (index 0000000..5533e70)
1 <?xml version="1.0" encoding="UTF-8"?>
2 <Ui xmlns="http://www.blizzard.com/wow/ui/">
3 <Frame name="ChorusHugeUnitFrameTemplate" virtual="true">
4 <Size>
5 <AbsDimension x="200" y="150"/>
6 </Size>
7 <Layers>
8 <Layer level="BACKGROUND">
9 <Texture name="$parentBackground" setAllPoints="true">
10 <Color r="0.05" g="0.05" b="0.05" a="0.6"/>
11 </Texture>
12 </Layer>
13 </Layers>
14 <Frames>
15 <!-- Clickable area. -->
16 <Button name="$parentSecureUnitButton" inherits="ChorusUnitButtonTemplate" setAllPoints="true">
17 <Anchors>
18 <Anchor point="TOPRIGHT">
19 <Offset x="0" y="0"/>
20 </Anchor>
21 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
22 <Offset x="0" y="-80"/>
23 </Anchor>
24 </Anchors>
25 </Button>
26 <!-- Header -->
27 <Frame name="$parentUnitLevelFrame" inherits="ChorusUnitLevelFrameTemplate">
28 <Anchors>
29 <Anchor point="TOPLEFT">
30 <Offset x="0" y="0"/>
31 </Anchor>
32 </Anchors>
33 </Frame>
34 <Frame name="$parentUnitNameFrame" inherits="ChorusUnitNameFrameTemplate">
35 <Anchors>
36 <Anchor point="TOPLEFT">
37 <Offset x="24" y="0"/>
38 </Anchor>
39 </Anchors>
40 </Frame>
41 <Frame name="$parentUnitAffectingCombatFrame" inherits="ChorusUnitAffectingCombatFrameTemplate">
42 <Anchors>
43 <Anchor point="TOPRIGHT">
44 <Offset x="0" y="0"/>
45 </Anchor>
46 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPRIGHT">
47 <Offset x="-16" y="-16"/>
48 </Anchor>
49 </Anchors>
50 </Frame>
51 <Frame name="$parentRaidTargetIconFrame" inherits="ChorusRaidTargetIconFrameTemplate">
52 <Anchors>
53 <Anchor point="TOP">
54 <Offset x="0" y="4"/>
55 </Anchor>
56 <Anchor point="CENTER">
57 <Offset x="0" y="4"/>
58 </Anchor>
59 </Anchors>
60 </Frame>
61 <Frame name="$parentUnitGroupRoleFrame" inherits="ChorusUnitGroupRoleFrameTemplate">
62 <Anchors>
63 <Anchor point="TOPRIGHT">
64 <Offset x="-16" y="0"/>
65 </Anchor>
66 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPRIGHT">
67 <Offset x="-32" y="-16"/>
68 </Anchor>
69 </Anchors>
70 </Frame>
71 <!-- Main -->
72 <StatusBar name="$parentHealthFrame" inherits="ChorusHugeHealthFrameTemplate">
73 <Anchors>
74 <Anchor point="TOPRIGHT">
75 <Offset x="0" y="-16"/>
76 </Anchor>
77 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
78 <Offset x="0" y="-40"/>
79 </Anchor>
80 </Anchors>
81 </StatusBar>
82 <StatusBar name="$parentPowerFrame" inherits="ChorusHugePowerFrameTemplate">
83 <Anchors>
84 <Anchor point="TOPRIGHT">
85 <Offset x="0" y="-40"/>
86 </Anchor>
87 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
88 <Offset x="0" y="-56"/>
89 </Anchor>
90 </Anchors>
91 </StatusBar>
92 <Frame name="$parentThreatFrame" inherits="ChorusThreatFrameTemplate">
93 <Anchors>
94 <Anchor point="TOPRIGHT">
95 <Offset x="0" y="-56"/>
96 </Anchor>
97 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
98 <Offset x="0" y="-72"/>
99 </Anchor>
100 </Anchors>
101 </Frame>
102 <Frame name="$parentRangeFrame" inherits="ChorusRangeFrameTemplate">
103 <Anchors>
104 <Anchor point="TOPRIGHT">
105 <Offset x="0" y="-56"/>
106 </Anchor>
107 <Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="TOPRIGHT">
108 <Offset x="0" y="-72"/>
109 </Anchor>
110 </Anchors>
111 </Frame>
112 <!-- Footer -->
113 <StatusBar name="$parentCastFrame" inherits="ChorusCastFrameTemplate">
114 <Anchors>
115 <Anchor point="TOPRIGHT">
116 <Offset x="0" y="-72"/>
117 </Anchor>
118 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
119 <Offset x="0" y="-88"/>
120 </Anchor>
121 </Anchors>
122 </StatusBar>
123 <Frame name="$parentBuffFrame" inherits="ChorusLargeAuraFrameTemplate">
124 <Anchors>
125 <Anchor point="TOPRIGHT">
126 <Offset x="0" y="-90"/>
127 </Anchor>
128 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
129 <Offset x="0" y="-120"/>
130 </Anchor>
131 </Anchors>
132 <Attributes>
133 <Attribute name="filter" type="string" value="HELPFUL"/>
134 </Attributes>
135 </Frame>
136 <Frame name="$parentDebuffFrame" inherits="ChorusLargeAuraFrameTemplate">
137 <Anchors>
138 <Anchor point="TOPRIGHT">
139 <Offset x="0" y="-120"/>
140 </Anchor>
141 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
142 <Offset x="0" y="-150"/>
143 </Anchor>
144 </Anchors>
145 <Attributes>
146 <Attribute name="filter" type="string" value="HARMFUL"/>
147 </Attributes>
148 </Frame>
149 <Frame name="$parentAuraTooltipFrame" inherits="ChorusAuraTooltipFrameTemplate">
150 <Anchors>
151 <Anchor point="TOPLEFT">
152 <Offset x="0" y="0"/>
153 </Anchor>
154 </Anchors>
155 </Frame>
156 <Button name="$parentAuraTooltipToggleButton" inherits="ChorusAuraTooltipFrameToggleButtonTemplate">
157 <Anchors>
158 <Anchor point="TOPRIGHT">
159 <Offset x="0" y="-90"/>
160 </Anchor>
161 <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="TOPRIGHT">
162 <Offset x="-12" y="-150"/>
163 </Anchor>
164 </Anchors>
165 </Button>
166 </Frames>
167 </Frame>
168 </Ui>
File src/ChorusPowerFrameTemplate.xml changed (mode: 100644) (index 12b8b54..18bc257)
9 9 <Attribute name="useparent-unit" type="boolean" value="true"/> <Attribute name="useparent-unit" type="boolean" value="true"/>
10 10 </Attributes> </Attributes>
11 11 </StatusBar> </StatusBar>
12 <StatusBar name="ChorusHugePowerFrameTemplate" inherits="ChorusPowerFrameTemplate" virtual="true">
13 <Size>
14 <AbsDimension x="144" y="24"/>
15 </Size>
16 <Layers>
17 <Layer level="OVERLAY">
18 <FontString name="$parentText1" inherits="ChorusFont12Mono" justifyH="LEFT" justifyV="MIDDLE" setAllPoints="true"/>
19 <FontString name="$parentText2" inherits="ChorusFont12Mono" justifyH="RIGHT" justifyV="MIDDLE" setAllPoints="true"/>
20 </Layer>
21 </Layers>
22 </StatusBar>
23 <StatusBar name="ChorusLargePowerFrameTemplate" inherits="ChorusHugePowerFrameTemplate" virtual="true"/>
24 <StatusBar name="ChorusSmallPowerFrameTemplate" inherits="ChorusPowerFrameTemplate" virtual="true">
25 <Size>
26 <AbsDimension x="36" y="16"/>
27 </Size>
28 <Layers>
29 <Layer level="OVERLAY">
30 <FontString name="$parentText1" inherits="ChorusFont12Mono" justifyH="LEFT" justifyV="BOTTOM" setAllPoints="true"/>
31 </Layer>
32 </Layers>
33 </StatusBar>
34 <StatusBar name="ChorusTinyPowerFrameTemplate" inherits="ChorusPowerFrameTemplate" virtual="true">
35 <Size>
36 <AbsDimension x="36" y="12"/>
37 </Size>
38 </StatusBar>
12 39 </Ui> </Ui>
File src/ChorusProgressFrameTemplate.lua changed (mode: 100644) (index 508de2f..73dc001)
... ... local function validateProgressFrame(self)
24 24 local artwork = self.artwork local artwork = self.artwork
25 25 assert(artwork ~= nil) assert(artwork ~= nil)
26 26
27 local label1 = self.label1
28 assert(label1 ~= nil)
29
30 local label2 = self.label2
31 assert(label2 ~= nil)
32
33 local label3 = self.label3
34 assert(label3 ~= nil)
35
36 27 local ratio = self:GetValue() local ratio = self:GetValue()
37 28 assert(ratio ~= nil) assert(ratio ~= nil)
38 29 assert('number' == type(ratio)) assert('number' == type(ratio))
 
... ... local function getRatio(a, b)
70 61 return ratio return ratio
71 62 end end
72 63
73 local function toggleText(self)
74 local flag = self:GetAttribute('showText')
75 if not flag then
76 self.label1:Hide()
77 self.label2:Hide()
78 self.label3:Hide()
79 end
80 end
81
82 local function applySize(self)
83 assert(self ~= nil)
84
85 local label1 = self.label1
86 assert(label1 ~= nil)
87
88 local label2 = self.label2
89 assert(label2 ~= nil)
90
91 local label3 = self.label3
92 assert(label3 ~= nil)
93
94 if self:GetHeight() >= 36 then
95 label1:Show()
96 label2:Show()
97 label3:Show()
98 elseif self:GetHeight() >= 12 then
99 label1:Show()
100 label2:Show()
101 label3:Hide()
102 else
103 label1:Hide()
104 label2:Hide()
105 label3:Hide()
106 end
107 end
108
109 64 local function applyRatio(self, a, b) local function applyRatio(self, a, b)
110 65 assert(self ~= nil) assert(self ~= nil)
111 66
 
... ... local function applyOverlay(self, a, b)
159 114 local ratio = getRatio(a, b) local ratio = getRatio(a, b)
160 115
161 116 local label1 = self.label1 or _G[self:GetName() .. 'Text1'] local label1 = self.label1 or _G[self:GetName() .. 'Text1']
162 assert(label1 ~= nil)
163 local t = formatQuantity(a)
164 label1:SetText(t)
117 if label1 then
118 local e = string.format('%.0f%%', ratio * 100)
119 label1:SetText(e)
120
121 --[[ ShadowedUnitFrames recommend this approach for adjusting font size. ]]--
122 if e ~= nil and string.len(e) >= 1 then
123 local fontSize = 12
124 self:SetScale(label1:GetStringHeight() / fontSize)
125 end
126 else
127 return
128 end
165 129
166 130 local label2 = self.label2 or _G[self:GetName() .. 'Text2'] local label2 = self.label2 or _G[self:GetName() .. 'Text2']
167 assert(label2 ~= nil)
168 local e = string.format('%.0f%%', ratio * 100)
169 label2:SetText(e)
170
171 --[[ ShadowedUnitFrames recommend this approach for adjusting font size. ]]--
172 if t ~= nil and string.len(t) >= 1 then
173 local fontSize = 12
174 self:SetScale(label1:GetStringHeight() / fontSize)
131 if label2 then
132 local t = formatQuantity(a)
133 label2:SetText(t)
134
135 --[[ ShadowedUnitFrames recommend this approach for adjusting font size. ]]--
136 if t ~= nil and string.len(t) >= 1 then
137 local fontSize = 12
138 self:SetScale(label2:GetStringHeight() / fontSize)
139 end
140 else
141 return
175 142 end end
176 143 end end
177 144
 
... ... local function applyOverlayHealthDeficit(self, a, b)
201 168 assert(self ~= nil) assert(self ~= nil)
202 169
203 170 local label3 = self.label3 or _G[self:GetName() .. 'Text3'] local label3 = self.label3 or _G[self:GetName() .. 'Text3']
204 assert(label3 ~= nil)
171 if not label3 then
172 return
173 end
174
205 175 if a and b and a >= 1 and b >= 1 and a < b then if a and b and a >= 1 and b >= 1 and a < b then
206 176 local c = a - b local c = a - b
207 177 local t = formatQuantity(c) local t = formatQuantity(c)
 
... ... local function applyOverlayHealth(self, unitDesignation)
216 186
217 187 assert(unitDesignation ~= nil) assert(unitDesignation ~= nil)
218 188
219 local label1 = self.label1
220 assert(label1 ~= nil)
221
222 local label2 = self.label2
223 assert(label2 ~= nil)
224
225 local label3 = self.label3
226 assert(label3 ~= nil)
227
228 189 local u = unitDesignation local u = unitDesignation
229 190 local a = UnitHealth(u) local a = UnitHealth(u)
230 191 local b = UnitHealthMax(u) local b = UnitHealthMax(u)
 
... ... local function applyOverlayHealth(self, unitDesignation)
238 199 applyOverlay(self, a, b) applyOverlay(self, a, b)
239 200 applyOverlayHealthDeficit(self, a, b) applyOverlayHealthDeficit(self, a, b)
240 201 else else
241 label1:SetText(nil)
242 label2:SetText(nil)
243 label3:SetText(nil)
244 202 --[[ TODO Separate health status bar and unit statues. ]]-- --[[ TODO Separate health status bar and unit statues. ]]--
203 local t = {self.label1, self.label2, self.label3}
204 local i = 0
205 while (i < #t) do
206 i = i + 1
207 local label = t[i]
208 if label then
209 label:SetText(nil)
210 end
211 end
212
213 local label1 = self.label1
214 if not label1 then
215 return
216 end
217
245 218 if UnitIsCorpse(unitDesignation) then if UnitIsCorpse(unitDesignation) then
246 219 label1:SetText('(Corpse)') label1:SetText('(Corpse)')
247 220 elseif UnitIsGhost(unitDesignation) then elseif UnitIsGhost(unitDesignation) then
 
... ... local function healthFrameEventProcessor(self, eventCategory, ...)
367 340 return return
368 341 end end
369 342
370 applySize(self)
371 343 applyRatioHealth(self, unitDesignation) applyRatioHealth(self, unitDesignation)
372 344 applyOverlayHealth(self, unitDesignation) applyOverlayHealth(self, unitDesignation)
373 toggleText(self)
374 345
375 346 local strategy = self.strategy local strategy = self.strategy
376 347 assert(strategy ~= nil) assert(strategy ~= nil)
 
... ... local function powerFrameEventProcessor(self, eventCategory, ...)
475 446
476 447 if UnitPowerMax(unitDesignation, powerTypeEnum) >= 1 then if UnitPowerMax(unitDesignation, powerTypeEnum) >= 1 then
477 448 self:Show() self:Show()
478 applySize(self)
479 449 applyRatioPower(self, unitDesignation, powerTypeEnum) applyRatioPower(self, unitDesignation, powerTypeEnum)
480 450 applyOverlayPower(self, unitDesignation, powerTypeEnum) applyOverlayPower(self, unitDesignation, powerTypeEnum)
481 451 applyPowerFrameColor(self, powerTypeEnum) applyPowerFrameColor(self, powerTypeEnum)
482 toggleText(self)
483 452 else else
484 453 self:Hide() self:Hide()
485 454 end end
 
... ... function Chorus.progressFrameMain(self)
497 466 assert(string.len(frameDesignation) <= 256) assert(string.len(frameDesignation) <= 256)
498 467
499 468 local artwork = _G[frameDesignation .. 'Artwork'] local artwork = _G[frameDesignation .. 'Artwork']
500 assert(artwork ~= nil)
469 assert(artwork ~= nil, self:GetName() .. ': invalid state')
501 470 self.artwork = artwork self.artwork = artwork
502 471
503 local label1 = _G[frameDesignation .. 'Text1']
504 assert(label1 ~= nil)
472 local label1 = _G[frameDesignation .. 'Text1'] or nil
505 473 self.label1 = label1 self.label1 = label1
506 474
507 local label2 = _G[frameDesignation .. 'Text2']
508 assert(label2 ~= nil)
475 local label2 = _G[frameDesignation .. 'Text2'] or nil
509 476 self.label2 = label2 self.label2 = label2
510 477
511 local label3 = _G[frameDesignation .. 'Text3']
512 assert(label3 ~= nil)
478 local label3 = _G[frameDesignation .. 'Text3'] or nil
513 479 self.label3 = label3 self.label3 = label3
514 480
515 481 self:RegisterEvent('PARTY_CONVERTED_TO_RAID') self:RegisterEvent('PARTY_CONVERTED_TO_RAID')
File src/ChorusProgressFrameTemplate.xml changed (mode: 100644) (index caca7a2..c52391a)
1 1 <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
2 2 <Ui xmlns="http://www.blizzard.com/wow/ui/"> <Ui xmlns="http://www.blizzard.com/wow/ui/">
3 3 <Script file="ChorusProgressFrameTemplate.lua"/> <Script file="ChorusProgressFrameTemplate.lua"/>
4 <StatusBar name="ChorusProgressFrameTemplate" minValue="0" maxValue="1" defaultValue="1" virtual="true" frameStrata="BACKGROUND">
4 <StatusBar name="ChorusProgressFrameTemplate" minValue="0" maxValue="1" defaultValue="1" virtual="true">
5 5 <Layers> <Layers>
6 6 <Layer level="BACKGROUND"> <Layer level="BACKGROUND">
7 7 <Texture name="$parentBackground" nonBlocking="true" setAllPoints="true"> <Texture name="$parentBackground" nonBlocking="true" setAllPoints="true">
8 8 <Color r="0" g="0" b="0" a="0.4"/> <Color r="0" g="0" b="0" a="0.4"/>
9 9 </Texture> </Texture>
10 10 </Layer> </Layer>
11 <Layer level="OVERLAY">
12 <FontString name="$parentText1" inherits="ChorusFont12Mono" justifyH="LEFT">
13 <Anchors>
14 <Anchor point="BOTTOMLEFT">
15 <Offset x="0" y="0"/>
16 </Anchor>
17 </Anchors>
18 </FontString>
19 <FontString name="$parentText2" inherits="ChorusFont12Mono" justifyH="RIGHT">
20 <Anchors>
21 <Anchor point="BOTTOMRIGHT">
22 <Offset x="0" y="0"/>
23 </Anchor>
24 </Anchors>
25 </FontString>
26 <FontString name="$parentText3" inherits="ChorusFont12Mono" justifyH="RIGHT">
27 <Anchors>
28 <Anchor point="TOPRIGHT">
29 <Offset x="0" y="0"/>
30 </Anchor>
31 </Anchors>
32 <Color r="1" g="0" b="0"/>
33 </FontString>
34 </Layer>
35 11 </Layers> </Layers>
36 <Attributes>
37 <Attribute name="showText" type="boolean" value="true"/>
38 </Attributes>
39 12 <BarTexture name="$parentArtwork" file="Interface\TargetingFrame\UI-StatusBar"/> <BarTexture name="$parentArtwork" file="Interface\TargetingFrame\UI-StatusBar"/>
40 13 <BarColor r="1" g="0" b="1" a="1"/> <BarColor r="1" g="0" b="1" a="1"/>
41 14 </StatusBar> </StatusBar>
File src/ChorusRangeFrameTemplate.xml changed (mode: 100644) (index bc3583e..8877a45)
12 12 </Size> </Size>
13 13 <Layers> <Layers>
14 14 <Layer level="OVERLAY"> <Layer level="OVERLAY">
15 <FontString name="$parentText" inherits="ChorusFont12Mono" setAllPoints="true"/>
15 <FontString name="$parentText" inherits="ChorusFont12Mono" justifyV="MIDDLE" justifyH="RIGHT" setAllPoints="true"/>
16 16 </Layer> </Layer>
17 17 </Layers> </Layers>
18 18 <Scripts> <Scripts>
File src/ChorusThreatFrameTemplate.xml changed (mode: 100644) (index 6cd327c..10b2738)
19 19 </Texture> </Texture>
20 20 </Layer> </Layer>
21 21 <Layer level="OVERLAY"> <Layer level="OVERLAY">
22 <FontString name="$parentText" inherits="ChorusFont12Mono" setAllPoints="true" justifyH="RIGHT" justifyV="MIDDLE"/>
22 <FontString name="$parentText" inherits="ChorusFont12Mono" setAllPoints="true" justifyH="LEFT" justifyV="MIDDLE">
23 <Anchors>
24 <Anchor point="TOPLEFT">
25 <Offset x="16" y="0"/>
26 </Anchor>
27 <Anchor point="BOTTOMLEFT">
28 <Offset x="16" y="0"/>
29 </Anchor>
30 </Anchors>
31 </FontString>
23 32 </Layer> </Layer>
24 33 </Layers> </Layers>
25 34 <Scripts> <Scripts>
File src/ChorusUnitButtonTemplate.xml changed (mode: 100644) (index 27ea79e..64f77bf)
155 155 given no modifier keys are held, given no modifier keys are held,
156 156 target game unit that corresponds to the button. --> target game unit that corresponds to the button. -->
157 157 <Attribute name="type1" type="string" value="target"/> <Attribute name="type1" type="string" value="target"/>
158 <!-- Fallback to parent's unit property if necessary. -->
159 <Attribute name="useparent-unit" type="boolean" value="true"/>
158 160 </Attributes> </Attributes>
159 161 </Button> </Button>
160 162 <Button name="ChorusTinyUnitButtonTemplate" inherits="ChorusUnitButtonTemplate" virtual="true"> <Button name="ChorusTinyUnitButtonTemplate" inherits="ChorusUnitButtonTemplate" virtual="true">
 
163 165 </Size> </Size>
164 166 <Frames> <Frames>
165 167 <Frame name="$parentUnitNameFrame" inherits="ChorusUnitNameFrameTemplate" setAllPoints="true"/> <Frame name="$parentUnitNameFrame" inherits="ChorusUnitNameFrameTemplate" setAllPoints="true"/>
166 <StatusBar name="$parentHealthFrame" inherits="ChorusHealthFrameTemplate" setAllPoints="true">
167 <Attributes>
168 <Attribute name="showText" type="boolean" value="false"/>
169 </Attributes>
168 <StatusBar name="$parentHealthFrame" inherits="ChorusTinyHealthFrameTemplate" setAllPoints="true">
170 169 </StatusBar> </StatusBar>
171 170 </Frames> </Frames>
172 171 </Button> </Button>
 
205 204 </Anchor> </Anchor>
206 205 </Anchors> </Anchors>
207 206 </Frame> </Frame>
208 <StatusBar name="$parentHealthFrame" inherits="ChorusHealthFrameTemplate">
207 <StatusBar name="$parentHealthFrame" inherits="ChorusSmallHealthFrameTemplate">
209 208 <Anchors> <Anchors>
210 209 <Anchor point="TOPRIGHT"> <Anchor point="TOPRIGHT">
211 210 <Offset x="0" y="0"/> <Offset x="0" y="0"/>
 
218 217 </Anchor> </Anchor>
219 218 </Anchors> </Anchors>
220 219 </StatusBar> </StatusBar>
221 <StatusBar name="$parentPowerFrame" inherits="ChorusPowerFrameTemplate">
220 <StatusBar name="$parentPowerFrame" inherits="ChorusTinyPowerFrameTemplate">
222 221 <Anchors> <Anchors>
223 222 <Anchor point="TOPRIGHT"> <Anchor point="TOPRIGHT">
224 223 <Offset x="0" y="-28"/> <Offset x="0" y="-28"/>
 
268 267 </Anchor> </Anchor>
269 268 </Anchors> </Anchors>
270 269 </Frame> </Frame>
271 <StatusBar name="$parentHealthFrame" inherits="ChorusHealthFrameTemplate">
270 <StatusBar name="$parentHealthFrame" inherits="ChorusLargeHealthFrameTemplate">
272 271 <Anchors> <Anchors>
273 272 <Anchor point="TOPRIGHT"> <Anchor point="TOPRIGHT">
274 273 <Offset x="0" y="0"/> <Offset x="0" y="0"/>
 
284 283 </Anchor> </Anchor>
285 284 </Anchors> </Anchors>
286 285 </StatusBar> </StatusBar>
287 <StatusBar name="$parentPowerFrame" inherits="ChorusPowerFrameTemplate">
286 <StatusBar name="$parentPowerFrame" inherits="ChorusLargePowerFrameTemplate">
288 287 <Anchors> <Anchors>
289 288 <Anchor point="TOPRIGHT" relativeTo="$parentHealthFrame" relativePoint="BOTTOMRIGHT"> <Anchor point="TOPRIGHT" relativeTo="$parentHealthFrame" relativePoint="BOTTOMRIGHT">
290 289 <Offset x="0" y="0"/> <Offset x="0" y="0"/>
 
432 431 </Anchor> </Anchor>
433 432 </Anchors> </Anchors>
434 433 </Frame> </Frame>
435 <StatusBar name="$parentHealthFrame" inherits="ChorusHealthFrameTemplate">
434 <StatusBar name="$parentHealthFrame" inherits="ChorusHugeHealthFrameTemplate">
436 435 <Anchors> <Anchors>
437 436 <Anchor point="TOPRIGHT"> <Anchor point="TOPRIGHT">
438 437 <Offset x="0" y="0"/> <Offset x="0" y="0"/>
 
448 447 </Anchor> </Anchor>
449 448 </Anchors> </Anchors>
450 449 </StatusBar> </StatusBar>
451 <StatusBar name="$parentPowerFrame" inherits="ChorusPowerFrameTemplate">
450 <StatusBar name="$parentPowerFrame" inherits="ChorusHugePowerFrameTemplate">
452 451 <Anchors> <Anchors>
453 452 <Anchor point="TOPRIGHT" relativeTo="$parentHealthFrame" relativePoint="BOTTOMRIGHT"> <Anchor point="TOPRIGHT" relativeTo="$parentHealthFrame" relativePoint="BOTTOMRIGHT">
454 453 <Offset x="0" y="0"/> <Offset x="0" y="0"/>
File src/ChorusUnitNameFrameTemplate.xml changed (mode: 100644) (index 01e1dce..77351cb)
3 3 <Script file="ChorusUnitNameFrameTemplate.lua"/> <Script file="ChorusUnitNameFrameTemplate.lua"/>
4 4 <Frame name="ChorusUnitNameFrameTemplate" virtual="true"> <Frame name="ChorusUnitNameFrameTemplate" virtual="true">
5 5 <Size> <Size>
6 <AbsDimension x="144" y="24" />
6 <AbsDimension x="144" y="16" />
7 7 </Size> </Size>
8 8 <Layers> <Layers>
9 9 <Layer level="OVERLAY"> <Layer level="OVERLAY">
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