48 Commits

Author SHA1 Message Date
40fc8187fd Add ability to adjust strata globally
Submitted by slowkerd from Curseforge (thanks!)
2023-08-02 08:16:12 -05:00
5020279748 Fix errors when playing Faire games 2023-02-06 00:16:15 -06:00
01a017c179 Add support for background and frame
This adds more robust visuals on the power counters where we can (finally) display artwork similar to the default UI where the charges are sometimes framed by something and sometimes have a textured background behind empty charges. This doesn't yet add support for animations. Child classes can take advantage of this simply by implementing GetFrameAtlas() and/or GetBackgroundAtlas().

Note: as part of this, I moved the rune texture's layer to "BORDER" which doesn't feel quite appropriate, but does allow the layering to work as I want. I don't think this is going to be an issue since texture layers should only apply internal to a frame's strata (meaning this shouldn't suddenly cause an existing power counter to display above/below something else), but I wanted to document it in case something weird does come up later.

I also hardcoded a + 10 on the width/height for the frame since that's what works for Vigor. If those values don't work for any future users of this, it's easily adjusted.
2023-01-15 12:57:58 -06:00
b8aece0da3 Add support for a partially-ready final rune
This adds support for a class power counter that has a visible recharge on the final "rune." Most power counters are either fully ready or full un-ready (where the recharge is hidden away), but Dragonriding's Vigor resource does show the recharge of the final point, which this now supports.

Child classes can support this by setting self.partialReady to the index of the rune that's partially ready, and self.partialReadyPercent to the percentage that that final rune is ready (0.0-1.0). If the partially-charged point uses a different texture, the child can also implement GetPartialRuneAtlas() and it will be used only for the partially-ready rune.

If we ever need to be able to show multiple partially-ready runes, this will need a small refactor.
2023-01-15 12:52:22 -06:00
72adca99f9 Fix whitespace 2023-01-15 12:45:19 -06:00
f8e7cf06d6 Combine rune texture/color set into one method
This enables a simpler method of making sure the appropriate texture is set and using the appropriate color (for after a rune was modified to darkened/hidden).
2023-01-15 12:43:56 -06:00
059808c980 Add ability to opt out of displaypower event 2023-01-15 12:41:16 -06:00
689df94d55 Refactor repeated code into a function
I need this for an upcoming feature, and it turns out that the "new rune just became ready" feature didn't cooperate with width-growing runes anyway, so this is also a bugfix for that (I don't know that we have any width-growing power types in the game today, but still).
2023-01-15 12:40:51 -06:00
d49884198d Only apply numeric offset when not in numeric mode
This offset is an additional offset meant to apply only when a class power counter is in a non-Numeric mode with the "also show numeric" checkbox checked. This offset is hidden when in Numeric mode, but was still being applied, therefore making it an option you could not change without going through multiple other steps first.
2023-01-15 12:35:14 -06:00
6a985bc67a Add Evoker, empowered casting support 2022-11-11 11:29:15 -06:00
aa03a0b332 Add support for max power changing
Evokers can spec into an additional Essence, so we need to handle the power counter increasing/decreasing. This was a fundamental change to the class power counter, so I'm sure something else broke somewhere. A casual glance at other classes/specs seems fine, though...
2022-10-25 21:43:05 -05:00
5bc1f04504 Remove HolyPower reference from most power modules 2022-09-18 15:37:01 -05:00
db7d797eb2 Fixed various class power indicators using the wrong alpha sometimes 2020-05-30 15:25:02 -05:00
89ef91b9b3 Initial dump of BfA compatibility
Updated for:
- SPELL_POWER_* constants becoming Enum.PowerType.*
- Rank no longer existing in return values for UnitAura, UnitBuff, UnitDebuff, UnitCastingInfo, UnitChannelInfo
- UNIT_POWER event becoming UNIT_POWER_UPDATE
- UnitPopupFrames no longer existing
- Removed events: PLAYER_PET_CHANGED, UNIT_MAXPOWER, PET_BAR_CHANGED, UNIT_DYNAMIC_FLAGS
- Texture return value from UnitAura type changing (name -> id)
- All Warlock specializations using soul shards
- Death Knight rune changes

Haven't tested all classes/specializations yet, so I'm sure I missed some stuff.
Probably need to add support for the new circular cooldown wipe flourish added in the base client.
Saw a problem with cooldown flashes being delayed on DK runes becoming available that probably need to be fixed.
2018-06-06 22:57:35 -05:00
35e56ebec6 Updated shard display for Destro Warlocks
Ticket #234, thanks stencil!
2017-06-17 20:38:12 -05:00
a201aa5149 Fixed incorrect texture drawing behind power counters
Looks like at some point I modified how "darkened" inactive powers worked and ended up drawing two copies of the darkened power counter for each inactive power. "runebg" is superfluous since we're just setting the color of the actual counter to black and partially transparent instead. For some power counters, such as Paladins, the runebg texture was actually wrong and drawing the entire atlas rather than just the texture we wanted.
2016-07-26 21:37:45 -05:00
5ca6f20944 Fixed minor inefficient texture access
Also fixed an issue where we were looking for a variable that was not declared in the scope we were looking for it in.
2016-07-19 10:11:58 -05:00
debaf7f1ff Fixed Destruction Warlocks freezing on login in pre-7.0 (ticket #207)
Destruction Warlocks have a PowerMax of 1000 and apparently trying to create that many graphical frames blows something up really quick. In 7.0, everyone's runes are discrete objects, so I was trying to ensure that the graphical representations of a given power were ready at all times, but didn't consider the pre-7.0 case where this calculation would lead to an absurd number of "runes".
This change also fixes an errant CreateFrame() in UpdateRunePower() that was supposed to be self:CreateFrame(). CreateFrame() was just creating a nameless, parentless frame for no reason at all. Good job, me. This isn't C++.
2016-05-29 14:21:50 -05:00
2235364df9 Added checks for rune count changing mid-session
Right now most ClassPowerCounter child classes are doing this work themselves, but they don't need to be. Some cleanup could be done there if anyone ever felt like doing it. (I did a tiny bit with Shards and Chi, but there's more to be done)
2016-05-28 22:57:25 -05:00
e15dc1d226 Added support for atlases
Class power counters can now use atlases for their textures instead of just texture filenames and coordinates
2016-05-26 23:11:29 -05:00
54469655f6 Inactive mode "Darkened" on class power counters now displays a darkened background behind a full/partially full rune as well as the old behavior of showing empty runes as darkened forms. This aids in class powers like demonology warlocks who need to be able to see the full bar. 2014-10-25 23:02:33 -05:00
bfcf8de7b4 Fixed "divide by zero" errors that could happen in class power counters when switching specs. 2014-10-25 22:42:47 -05:00
ad9ad06447 - Fixed how class power counters are scaled so that they don't scale at strange angles when they're off-center. (ticket #130) 2014-10-12 16:49:20 -05:00
7d6a880623 - Cleaner method for the warlock Shards module to retrieve the current rune mode such that switching to Demonology spec and back doesn't overwrite it. (I currently force the rune mode to 'graphical' or 'numeric' for Demonology spec since nothing else makes sense at the moment.) 2013-03-21 03:03:51 +00:00
a4390cf0cd - Removed level restriction on harmony power since apparently that's not a thing any more.
- Fixed the fifth chi not always drawing immediately when changing specs to one that grants an additional chi.
- Registered harmony power for the UNIT_POWER_FREQUENT event since that's what Blizzard's version does.
2012-09-02 04:29:41 +00:00
348765ac00 - Now that the numeric class power frame is being placed via SetPoint instead of SetAllPoints, we don't have to worry about the parent frame's width being correct to avoid truncating the number string; so don't force-update the width on the parent frame any more.
- No longer explicitly setting the width on the class power numeric FontString either as we'll just allow it to size to the text instead.
2012-09-01 04:35:06 +00:00
d18c5465da - Added support for showing the numeric value on top of a class power's graphical display. This number can also be moved vertically. 2012-09-01 04:21:43 +00:00
b585385273 - Added support for bar-style class powers that grow left to right instead of just adding a new count or growing individual powers bottom-up. This could really use a background to give a sense of the bar's extents, but I'll leave that for a future improvement.
- Added basic support for Demonology spec (Demonic Fury) Warlock power.
- Fixed a bug or two in Warlock power presentation when un-speccing or learning a new spec after having been without a spec.
- Added support for hiding Warlock power until the requisite spell has been learned because apparently (after looking at Blizzard's code) you can have the spec without having the spell that builds up the power associated with the spec. Okay.
2012-08-26 19:17:46 +00:00
221d83566b - Added Destruction spec (Burning Embers) support to the warlock power module and renamed it from Shard Counter to Warlock Power. Demonology support coming soon. Hopefully. 2012-08-26 05:46:19 +00:00
3e32e4a481 - Added support for ClassPowerCounters to only show up for specific talent specs.
- Added Priest Shadow Orbs module.
2012-08-25 20:07:32 +00:00
d6506e79c2 - Expanded holy power to account for the now-5 rune maximum. Not sure what I'm going to do about this layout just yet. The default frame has two below the primary 3, but my class power base class doesn't have support for this type of layout. Will see what the users say.
- Fixed the old 3 runes to have appropriate texture coordinates.
2012-07-09 04:35:47 +00:00
4d4f2fc59b - evidently patch 4.1 broke either the BOUNCE animation type or something else about starting/stopping animations broke because the "pulsing" animation for holy power and warlock shards kept growing bigger and bigger over time 2011-04-27 00:34:27 +00:00
6c1549d6c1 - minor performance optimizations in class counter modules (holy power, shards) 2010-12-05 04:25:40 +00:00
4484f1af49 - added a toggle for the "override alpha" behavior that displays class counters at in-combat alpha when out of combat if the counter isn't full/empty 2010-11-11 16:16:53 +00:00
841e903d8d - made class power counters continue to display as long as they're not full/empty (depending on the class) 2010-10-30 18:35:19 +00:00
08d6c6ead4 - added level restrictions to shard and holy power class counters since players under 9/10 (different per bar, using constants provided by Blizzard) don't have those resources available yet 2010-10-24 03:19:58 +00:00
04a885b123 - fixed a bug causing bar font size adjustments to not take effect/display until a ui reload 2010-10-21 01:42:35 +00:00
af5574e4a6 - added local copy of _G.IceHUD to modules that reference it frequently for a minor lookup speed boost 2010-10-20 05:22:27 +00:00
cb77e8358b - fixed 'inverse' mode to work with potential SnD bar
- expanded range of class power counters (shards, holy power) by request
- fixed lacerate and sunder count modules to work with 3 max charges instead of 5 as per the new patch (these *really* need to go away and be auto-replaced by custom counters...)
- yet another fix for text sometimes displaying the unit name for PetHealth
- fixed how the 'second highest threat' bar is drawn so that it actually works with all textures
2010-10-17 20:20:00 +00:00
fd406cc177 - added pulsing to the shard counter and holy power modules whenever they are maxed out. if this feature goes well then it should probably be ported over to the existing counter modules as well 2010-10-15 06:16:04 +00:00
af0c4c7023 - added option to use out-of-combat alpha on class power bars (holy power, shards) when targeting a friendly 2010-10-15 04:48:46 +00:00
0b108c2afb - now that Eclipse doesn't decay, use the appropriate alpha value regardless of whether or not the user has some power left over. it used to stay at the "in combat" setting until the bar was back at 0
- fixed a bug with "hidden" mode for inactive shards/runes where the unactivated runes would show up darkened when changing targets out of combat
2010-10-07 13:10:40 +00:00
e1f2d4318b - added the ability to further customize the shard and holy power modules by displaying all the existing custom counter textures in place of shards/holy runes and colorizing them based on how many are available 2010-10-05 03:42:51 +00:00
08861ecfe7 - first shot at localization of all configuration settings in IceHUD using AceLocale. note that all of these conversions were generated programmatically so it's possible that something went awry...very casual testing seemed okay, however. 2010-09-26 05:14:42 +00:00
05afcebc3d - changed all step = 10 to step = 1 by request
- widened range of possible vertical offset values for the custom counter module by request
2010-09-18 07:04:38 +00:00
250adfc2db - removed the last remnants of Ace2 (AceOO-2.0 and AceLibrary) thanks to a huge amount of help from ckknight for metatables 2010-09-17 05:41:04 +00:00
fd6d570e0b - fixed up several "hide blizzard frame" options to re-display when the module is disabled and to call blizzard's OnLoad for the frame instead of manually entering every event to re-register
- fixed "show incoming heals" option to be properly toggleable on 4.0 (bad conditional on the 'disabled' option)
- hid "cooldown mode" option on the totems module since there was never more than one choice
2010-09-16 02:42:16 +00:00
fb884f41f4 - abstracted the HolyPower module's functionality to a ClassPowerCounter module since the warlock shard bar is functionally identical to holy power
- added shard bar inheriting from ClassPowerCounter. same basic functionality as the holy power module: graphical mode that shows the default shards and numeric mode that just displays a count of active shards
2010-09-10 06:49:45 +00:00