Subject | Hash | Author | Date (UTC) |
---|---|---|---|
fix: Add unit tooltip | 9b853289a7730a8783f02691c944492e0ef53f86 | Vladyslav Bondarenko | 2023-08-25 08:15:33 |
fix: Yet another health bar sanitization | 979af69272eec06c45cb300132bc020a91a180c2 | Vladyslav Bondarenko | 2023-08-24 03:52:05 |
feat(build): Add stub RocketGit hook | b1a0bb523fb570ee7cc73776bfbba1a6886e685f | Vladyslav Bondarenko | 2023-08-23 23:59:35 |
feat(build): Add 0.2-1 rockspec | 92a2b006a47f1a242bbb08467c431362d64d6ef8 | Vladyslav Bondarenko | 2023-08-23 23:31:41 |
fix!: Use native mechanism of inheriting values | 6a2ebf1aa52e4a300b4ad959670878b292140c4f | Vladyslav Bondarenko | 2023-08-23 23:05:39 |
fix: Typo in unit button template anchor | 98027a2779639493c97c4259b61cb53d25709255 | Vladyslav Bondarenko | 2023-08-23 22:06:16 |
feat!: Add unit button flavours | 21e61a0dbd629d25f458ce1a8dd370da31c6f991 | Vladyslav Bondarenko | 2023-08-23 21:17:33 |
fix: Shrink range frame height | b73521b13c6a9e5d34b2d425e5d7e9ddcb04f81c | Vladyslav Bondarenko | 2023-08-23 21:15:28 |
feat: Hide status bar text on demand | 307d97f5afee88e55c6799e4c4390ca8d6e98974 | Vladyslav Bondarenko | 2023-08-23 21:11:35 |
feat: Hide auras out of frame bounds | cb9ca55fb9dc361500e8b4f4c84320eb7d01b744 | Vladyslav Bondarenko | 2023-08-23 20:53:30 |
fix: Add text shadow to unit names | 2b7d56c701ad81825a838c9faa818632bf38bfb6 | Vladyslav Bondarenko | 2023-08-23 17:30:23 |
fix: Further sanitize health bar | 3318dee15eac9b8205e287997800c080b0aaf12d | Vladyslav Bondarenko | 2023-08-23 14:56:00 |
feat!: Correct range indcator for all characters | 8ef1a987ac4431ce90131c354d1a1775b653f3e3 | Vladyslav Bondarenko | 2023-08-22 15:05:35 |
fix: Improve health bar robustness | 2be053184653a6cd282437f8190e9196af495d81 | Vladyslav Bondarenko | 2023-08-22 13:24:12 |
fix: Upgrade aura sorting | a2132995674f81e0775def67b0f5786945b0bba3 | Vladyslav Bondarenko | 2023-08-22 13:21:37 |
feat: Add threat percentage for hostiles | 590bc95167dfc0f22a135fe173182104b6f5b923 | Vladyslav Bondarenko | 2023-08-22 13:17:57 |
feat: Add threat for hostiles | 22562481a0c9dfb297ebbe47da4aa19046cf6eeb | Vladyslav Bondarenko | 2023-08-21 22:28:50 |
fix(build): Add more luacheck definitions | aac4bb444d894b5d565af3abe417cbafd4f966f5 | Vladyslav Bondarenko | 2023-08-21 18:09:50 |
fix: Ensure TargetFrame is hidden | 98bd355e604bf1c51791d5f5874ef33ab640123c | Vladyslav Bondarenko | 2023-08-21 14:04:40 |
fix: Show only meaningful numbers for health | 37217b1dc78c0a2b4711dc45ada0c4873e904a1f | Vladyslav Bondarenko | 2023-08-21 13:32:19 |
File | Lines added | Lines deleted |
---|---|---|
etc/luacheckrc.lua | 3 | 0 |
src/ChorusUnitButtonTemplate.lua | 26 | 7 |
src/ChorusUnitButtonTemplate.xml | 0 | 3 |
File etc/luacheckrc.lua changed (mode: 100644) (index 819ac8e..5145bd4) | |||
... | ... | stds.framexml = { | |
78 | 78 | 'FocusFrameSpellBar', | 'FocusFrameSpellBar', |
79 | 79 | 'GameFontWhite', | 'GameFontWhite', |
80 | 80 | 'GameTooltip', | 'GameTooltip', |
81 | 'GameTooltipTextLeft1', | ||
82 | 'GameTooltip_SetDefaultAnchor', | ||
83 | 'GameTooltip_UnitColor', | ||
81 | 84 | 'MAX_PARTY_MEMBERS', | 'MAX_PARTY_MEMBERS', |
82 | 85 | 'MAX_SPELLS', | 'MAX_SPELLS', |
83 | 86 | 'NumberFontNormalSmall', | 'NumberFontNormalSmall', |
File src/ChorusUnitButtonTemplate.lua changed (mode: 100644) (index 68bac1e..93f37ff) | |||
1 | local GameTooltip = GameTooltip | ||
2 | local GameTooltipTextLeft1 = GameTooltipTextLeft1 | ||
3 | |||
4 | local GameTooltip_SetDefaultAnchor = GameTooltip_SetDefaultAnchor | ||
5 | local GameTooltip_UnitColor = GameTooltip_UnitColor | ||
6 | local SecureButton_GetUnit = SecureButton_GetUnit | ||
7 | |||
1 | 8 | local Chorus = Chorus | local Chorus = Chorus |
2 | 9 | ||
3 | function Chorus.unitButtonAttributeProcessor(self, name, value) | ||
4 | --[[ This is required for UnitFrame_OnEnter to work, which is in turn | ||
5 | used for unit game tooltips. The alternative is to wrap | ||
6 | GameTooltip:SetUnit ourselves.]]-- | ||
7 | if 'unit' == name then | ||
8 | self[name] = value | ||
10 | local function unitButtonLeaveProcessor() | ||
11 | assert(GameTooltip ~= nil) | ||
12 | |||
13 | GameTooltip:FadeOut() | ||
14 | end | ||
15 | |||
16 | local function unitButtonEnterProcessor(unitButton) | ||
17 | assert(GameTooltip ~= nil) | ||
18 | |||
19 | local unitDesignation = SecureButton_GetUnit(unitButton) | ||
20 | if unitDesignation then | ||
21 | GameTooltip_SetDefaultAnchor(GameTooltip, unitButton); | ||
22 | GameTooltip:SetUnit(unitDesignation) | ||
23 | local r, g, b = GameTooltip_UnitColor(unitDesignation); | ||
24 | GameTooltipTextLeft1:SetTextColor(r, g, b); | ||
9 | 25 | end | end |
10 | 26 | end | end |
11 | 27 | ||
12 | 28 | function Chorus.unitButtonMain(self) | function Chorus.unitButtonMain(self) |
13 | 29 | self:RegisterForClicks('AnyUp') | self:RegisterForClicks('AnyUp') |
14 | self.unit = self:GetAttribute('unit') | ||
30 | |||
31 | --[[ Toggle game tooltip on mouseover. ]]-- | ||
32 | self:SetScript('OnEnter', unitButtonEnterProcessor) | ||
33 | self:SetScript('OnLeave', unitButtonLeaveProcessor) | ||
15 | 34 | ||
16 | 35 | --[[ TODO Add menu popup for unit frames ]]-- | --[[ TODO Add menu popup for unit frames ]]-- |
17 | 36 | --[[ TODO Add role indicator ]]-- | --[[ TODO Add role indicator ]]-- |
File src/ChorusUnitButtonTemplate.xml changed (mode: 100644) (index 7b81d4a..87264a7) | |||
6 | 6 | <Frame name="$parentSecureHandlerAttributeFrame" inherits="SecureHandlerAttributeTemplate"/> | <Frame name="$parentSecureHandlerAttributeFrame" inherits="SecureHandlerAttributeTemplate"/> |
7 | 7 | </Frames> | </Frames> |
8 | 8 | <Scripts> | <Scripts> |
9 | <OnAttributeChanged>Chorus.unitButtonAttributeProcessor(self);</OnAttributeChanged> | ||
10 | <OnEnter function="UnitFrame_OnEnter"/> | ||
11 | <OnLeave function="UnitFrame_OnLeave"/> | ||
12 | 9 | <OnLoad>Chorus.unitButtonMain(self);</OnLoad> | <OnLoad>Chorus.unitButtonMain(self);</OnLoad> |
13 | 10 | </Scripts> | </Scripts> |
14 | 11 | <Attributes> | <Attributes> |