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!: Re-add player solo frames bf5346aa96a3daeadafeb3a723f7821012f1d5e5 Vladyslav Bondarenko 2023-08-21 12:22:48
fix: Render raid target icon on correct layer 890bb5340a3876b611f67ac1277cc009e5e4df5b Vladyslav Bondarenko 2023-08-20 18:12:31
feat: Display health deficit 0620038bf95d2c8e77eb088f2345764f428563d4 Vladyslav Bondarenko 2023-08-20 17:55:49
fix(build): Update rockspec dcffb9897deb97fa4039cd4513a51e397ebc4ab7 Vladyslav Bondarenko 2023-08-20 17:16:25
feat!: Update raid frame layout ad51f7e37e8babd30ee45c5b87d931a09c1fc0f3 Vladyslav Bondarenko 2023-08-20 14:45:38
fix: Do not show range to oneself c055a76806c5646e4027698c6a105f06199be4ae Vladyslav Bondarenko 2023-08-20 04:29:32
feat!: Add raid targeting icons 53121d5d75fb55d745734337ab70283496e46e7c Vladyslav Bondarenko 2023-08-19 23:22:01
feat!: Add general threat situation widget a002db1c9c810f21fe1e1c042a435875bbe5f317 Vladyslav Bondarenko 2023-08-19 22:20:58
fix!: Highlight offline players 7c28b6efa34f6e5450d2999acfd5a54880aa6df0 Vladyslav Bondarenko 2023-08-19 21:06:38
fix!: Change aura sorting ba249c7309ccbcb14fea727b347c3dd532af73ee Vladyslav Bondarenko 2023-08-19 20:40:31
feat: Show player in party 198e8c86b9b93dd9c3edf7045d5bbcb9142d76d6 Vladyslav Bondarenko 2023-08-19 20:38:40
feat(doc)!: Add project description 4b406a549e83dda3845104e8a6a233eae481a3c8 Vladyslav Bondarenko 2023-08-19 05:58:50
fix: Typo in ChorusRaidFrame 61fb4f93c227e3b94a52df26eeffece12fe86e55 Vladyslav Bondarenko 2023-08-18 21:00:34
feat(build): Document build validation scripts d19d03c4a20c8c02fee8b4c1c00241c58baa12eb Vladyslav Bondarenko 2023-08-18 20:57:35
feat: Update raid frame ff5ad9619c6af14f7e1719cbaaf34fa0465c1f12 Vladyslav Bondarenko 2023-08-18 20:54:29
feat: Update add-on loading mechanism 2d8df81c17fbfcaf8d0bb966a3373503bb32a585 Vladyslav Bondarenko 2023-08-18 19:59:39
feat: Update progress frames on demand only 7c18488e61b5889eca4b057602fbc41883fc53f1 Vladyslav Bondarenko 2023-08-18 19:50:41
feat: Add basic font customization 321c2e6251e2e619101f8d57b4d4b1ef10a79694 Vladyslav Bondarenko 2023-08-18 17:29:12
fix: Improve range indicator accuracy 17ee7011ae6bdd3e28bae4694d40a68ea799d001 Vladyslav Bondarenko 2023-08-17 23:52:43
feat!: Add target range indicator 83b3fae1f675042b7d9e89c09aedc864e8fcaa27 Vladyslav Bondarenko 2023-08-17 22:41:08
Commit bf5346aa96a3daeadafeb3a723f7821012f1d5e5 - feat!: Re-add player solo frames
Replace native unit buttons for player, target and focus. Player pet is
notably missing for now. Remove player button from party frame. This is
mostly done for consistency and to benefit from Chorus features, like
aura sorting, range approximation, unit class coloring.

The exact layout is still a work in progress. Right now buttons are too
large, even for a small party.

Drop-down context menus are present, but are not fully functional.
Notably "Set focus" produces an error, because of restricted environment
permission violation. A work around for it is to allow focusing units
differently, by combination of key presses.

Note that drop-down context menus are not available for raid unit
buttons. The user must firts target the raid unit (left click raid unit
button) and then use target unit button (right click target unit
button).

To focus target unit, left-click the target unit button, while pressing
and holding focus modifier key. By default the focus modifier key is not
set. Some users prefer to set it to "SHIFT".

The focus modifier key can be configured in the native options menu:
Game menu => Interface => "Game" tab => "Combat" menu entry =>
"Focus Cast Key" option.
Author: Vladyslav Bondarenko
Author date (UTC): 2023-08-21 12:22
Committer name: Vladyslav Bondarenko
Committer date (UTC): 2023-08-21 12:22
Parent(s): 890bb5340a3876b611f67ac1277cc009e5e4df5b
Signer:
Signing key: EFF9624877D25D02
Signing status: E
Tree: a88340cf93c97297bca9d3d25ef737a383489b17
File Lines added Lines deleted
etc/luacheckrc.lua 64 13
src/Chorus.xml 1 0
src/ChorusFrame.lua 92 0
src/ChorusFrame.xml 55 0
src/ChorusRaidFrame.xml 2 2
File etc/luacheckrc.lua changed (mode: 100644) (index 420f278..6deff2f)
1 1 --[[ http://luacheck.readthedocs.io/en/stable/config.html ]]-- --[[ http://luacheck.readthedocs.io/en/stable/config.html ]]--
2 stds.wow = {
2
3 --[[ Functions defined in World of Warcraft client Lua environment. It is
4 distinct from default Lua 5.1 environment. For example, `os` package is
5 excluded. Only globals used by this project are included, therefore the list is
6 only a subset and not extensive. ]]--
7
8 stds.wowapi = {
3 9 read_globals = { read_globals = {
4 10 'CreateFrame', 'CreateFrame',
5 'DebuffTypeColor',
11 'GetModifiedClick',
6 12 'GetPlayerInfoByGUID', 'GetPlayerInfoByGUID',
7 13 'GetRaidTargetIndex', 'GetRaidTargetIndex',
8 14 'GetSpellInfo', 'GetSpellInfo',
 
... ... stds.wow = {
10 16 'GetThreatStatusColor', 'GetThreatStatusColor',
11 17 'GetTime', 'GetTime',
12 18 'IsSpellInRange', 'IsSpellInRange',
13 'PowerBarColor',
14 'RAID_CLASS_COLORS',
15 'SetRaidTargetIconTexture',
16 'UIParent',
17 19 'UnitAura', 'UnitAura',
18 20 'UnitClass', 'UnitClass',
19 21 'UnitExists', 'UnitExists',
 
... ... stds.wow = {
33 35 'UnitPowerMax', 'UnitPowerMax',
34 36 'UnitPowerType', 'UnitPowerType',
35 37 'UnitThreatSituation', 'UnitThreatSituation',
38 'assert',
36 39 'date', 'date',
40 'error',
41 'format',
42 'math',
43 'pairs',
44 'select',
45 'string',
37 46 'strtrim', 'strtrim',
38 47 'tContains', 'tContains',
48 'table',
39 49 'time', 'time',
50 'type',
40 51 'unpack', 'unpack',
41 52 }, },
42 53 globals = { globals = {
54 '_G',
43 55 }, },
44 56 } }
45 57
46 stds.unifont = {
47 read_globals = {
48 'Unifont12Regular',
49 'Unifont16Regular',
50 'Unifont20Regular',
51 }
58 --[[ Functions defined in FrameXML or AddOns natively. ]]--
59
60 --[[ The distinction between FrameXML and Lua environment is made, so that
61 testing mockups may be created more easily. The Lua environmenet is uniform
62 between game versions, and even game versions can be made compatible among each
63 other. On the other hand, FrameXML may be extensively modified by individual
64 users, making each installation unique and reliance on FrameXML undesireable.
65 Author still chose to use FrameXML for convenience. ]]--
66
67 stds.framexml = {
68 read_globals = {
69 'DebuffTypeColor',
70 'FocusFrame',
71 'GameFontWhite',
72 'NumberFontNormalSmall',
73 'PartyMemberFrame1',
74 'PartyMemberFrame2',
75 'PartyMemberFrame3',
76 'PartyMemberFrame4',
77 'PlayerFrame',
78 'PowerBarColor',
79 'RAID_CLASS_COLORS',
80 'SetRaidTargetIconTexture',
81 'TargetFrame',
82 'ToggleDropDownMenu',
83 'UIParent',
84 'PlayerFrameDropDown',
85 'TargetFrameDropDown',
86 'FocusFrameDropDown',
87 'PartyMemberBackground',
88 },
89 globals = {
90 },
52 91 } }
53 92
93 --[[ Functions and globals defined by authors of this add-on. This list is not extensive. ]]--
94
54 95 stds.chorus = { stds.chorus = {
55 96 read_globals = { read_globals = {
56 97 }, },
57 98 globals = { globals = {
58 99 'Chorus', 'Chorus',
100 'ChorusFocusButton',
101 'ChorusFocusButtonHealthFrame',
102 'ChorusFocusButtonUnitNameFrame',
103 'ChorusPlayerButton',
104 'ChorusPlayerButtonHealthFrame',
105 'ChorusPlayerButtonUnitNameFrame',
106 'ChorusRaidFrame',
107 'ChorusTargetButton',
108 'ChorusTargetButtonHealthFrame',
109 'ChorusTargetButtonUnitNameFrame',
59 110 }, },
60 111 } }
61 112
62 std = 'min+wow+unifont+chorus'
113 std = 'wowapi+framexml+chorus'
File src/Chorus.xml changed (mode: 100644) (index a890a88..339586c)
13 13 <Include file="ChorusRaidTargetIconFrameTemplate.xml"/> <Include file="ChorusRaidTargetIconFrameTemplate.xml"/>
14 14 <Include file="ChorusRaidUnitButtonTemplate.xml"/> <Include file="ChorusRaidUnitButtonTemplate.xml"/>
15 15 <Include file="ChorusRaidFrame.xml"/> <Include file="ChorusRaidFrame.xml"/>
16 <Include file="ChorusFrame.xml"/>
16 17 </Ui> </Ui>
File src/ChorusFrame.lua added (mode: 100644) (index 0000000..70c6e02)
1 local UIParent = UIParent
2
3 local Chorus = Chorus
4
5 local function disableNativeFrames()
6 local t = {
7 FocusFrame,
8 PlayerFrame,
9 TargetFrame,
10 PartyMemberFrame1,
11 PartyMemberFrame2,
12 PartyMemberFrame3,
13 PartyMemberFrame4,
14 PartyMemberBackground,
15 }
16 local i = 0
17 while (i < #t) do
18 i = i + 1
19 local e = t[i]
20 if e then
21 e:Hide()
22 e:SetScript('OnShow', function(self)
23 self:Hide()
24 end)
25 end
26 end
27 end
28
29 local function applyLayout(self)
30 assert(self ~= nil)
31 assert(UIParent ~= nil)
32
33 self:UnregisterAllEvents();
34 self:SetScript('OnEvent', nil)
35
36 --[[ FIXME Range indicator shows false information. ]]--
37
38 ChorusPlayerButtonHealthFrame.strategy = 'UnitClass'
39 ChorusPlayerButton.menu = function()
40 local offsetX = ChorusPlayerButton:GetWidth() / 2
41 local offsetY = ChorusPlayerButton:GetHeight()
42 ToggleDropDownMenu(1, nil, PlayerFrameDropDown, 'ChorusPlayerButton', offsetX, offsetY)
43 end
44
45 local focuscastModifier = GetModifiedClick('FOCUSCAST')
46 if focuscastModifier and 'NONE' ~= focuscastModifier then
47 local key = string.lower(focuscastModifier) .. '-type1'
48 ChorusPlayerButton:SetAttribute(key, 'focus')
49 ChorusTargetButton:SetAttribute(key, 'focus')
50 end
51
52 ChorusFocusButtonHealthFrame.strategy = 'UnitIsFriend'
53 ChorusFocusButtonUnitNameFrame.strategy = 'UnitClass'
54
55 ChorusTargetButtonHealthFrame.strategy = 'UnitIsFriend'
56 ChorusTargetButtonUnitNameFrame.strategy = 'UnitClass'
57
58 --[[ FIXME Selecting "Set focus" option in the context menu for Chorus
59 unit button results in permission violation exception (restricted
60 execution environment issue). ]]--
61
62 ChorusTargetButton.menu = function()
63 local offsetX = ChorusTargetButton:GetWidth() / 2
64 local offsetY = ChorusTargetButton:GetHeight()
65 ToggleDropDownMenu(1, nil, TargetFrameDropDown, 'ChorusTargetButton', offsetX, offsetY)
66 end
67
68 ChorusFocusButton.menu = function()
69 local offsetX = ChorusFocusButton:GetWidth() / 2
70 local offsetY = ChorusFocusButton:GetHeight()
71 ToggleDropDownMenu(1, nil, FocusFrameDropDown, 'ChorusFocusButton', offsetX, offsetY)
72 end
73
74 --[[ NOTE The menu functions are equivalent of PlayerFrame.menu and
75 TargetFrame.menu. It is possible to use them direcctly. THe only
76 quirk is that the context menu will be displayed at the display point
77 of the native unit frames. Hence, the need to define separate menu
78 functions. ]]--
79 end
80
81 local function chorusFrameMain(self)
82 --[[ Wait for the game to finish loading completely, only then apply
83 changes. ]]--
84
85 --[[ TODO Add pet buttons. ]]--
86
87 self:RegisterEvent('PLAYER_LOGIN'); self:SetScript('OnEvent',
88 applyLayout) disableNativeFrames() end
89
90 Chorus.chorusFrameMain = function(...)
91 return chorusFrameMain(...)
92 end
File src/ChorusFrame.xml added (mode: 100644) (index 0000000..091aff0)
1 <?xml version="1.0" encoding="UTF-8"?>
2 <Ui xmlns="http://www.blizzard.com/wow/ui/">
3 <Script file="ChorusFrame.lua"/>
4 <Frame name="ChorusFrame">
5 <Size>
6 <AbsDimension x="630" y="126"/>
7 </Size>
8 <Anchors>
9 <Anchor point="TOP">
10 <Offset x="0" y="0"/>
11 </Anchor>
12 <Anchor point="CENTER">
13 <Offset x="0" y="0"/>
14 </Anchor>
15 </Anchors>
16 <Frames>
17 <Button name="ChorusPlayerButton" inherits="ChorusRaidUnitButtonTemplate">
18 <Anchors>
19 <Anchor point="BOTTOMLEFT">
20 <Offset x="0" y="0"/>
21 </Anchor>
22 </Anchors>
23 <Attributes>
24 <Attribute name="unit" type="string" value="player"/>
25 <Attribute name="type2" type="string" value="menu"/>
26 </Attributes>
27 </Button>
28 <Button name="ChorusTargetButton" inherits="ChorusRaidUnitButtonTemplate">
29 <Anchors>
30 <Anchor point="BOTTOMLEFT" relativeTo="ChorusPlayerButton" relativePoint="BOTTOMRIGHT">
31 <Offset x="6" y="0"/>
32 </Anchor>
33 </Anchors>
34 <Attributes>
35 <Attribute name="unit" type="string" value="target"/>
36 <Attribute name="type2" type="string" value="menu"/>
37 </Attributes>
38 </Button>
39 <Button name="ChorusFocusButton" inherits="ChorusRaidUnitButtonTemplate">
40 <Anchors>
41 <Anchor point="BOTTOMLEFT" relativeTo="ChorusTargetButton" relativePoint="BOTTOMRIGHT">
42 <Offset x="6" y="0"/>
43 </Anchor>
44 </Anchors>
45 <Attributes>
46 <Attribute name="unit" type="string" value="focus"/>
47 <Attribute name="type2" type="string" value="menu"/>
48 </Attributes>
49 </Button>
50 </Frames>
51 <Scripts>
52 <OnLoad>Chorus.chorusFrameMain(self);</OnLoad>
53 </Scripts>
54 </Frame>
55 </Ui>
File src/ChorusRaidFrame.xml changed (mode: 100644) (index f6303bd..52b9acc)
39 39 <Attribute name="groupFilter" type="number" value="1"/> <Attribute name="groupFilter" type="number" value="1"/>
40 40 <!-- Given raid show first raid group, given party show party. --> <!-- Given raid show first raid group, given party show party. -->
41 41 <!-- Do not show party in raid. --> <!-- Do not show party in raid. -->
42 <!-- Show player in party. -->
42 <!-- Do not show player in party. -->
43 43 <Attribute name="showParty" type="boolean" value="true"/> <Attribute name="showParty" type="boolean" value="true"/>
44 <Attribute name="showPlayer" type="boolean" value="true"/>
44 <Attribute name="showPlayer" type="boolean" value="false"/>
45 45 <Attribute name="showSolo" type="boolean" value="false"/> <Attribute name="showSolo" type="boolean" value="false"/>
46 46 </Attributes> </Attributes>
47 47 </Frame> </Frame>
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