|Go to Page...|
||Thread Tools||Display Modes|
|04-15-21, 09:30 PM||#1|
A Chromatic Dragonspawn
Join Date: Aug 2011
Solution to re-layout raid panel during combat
There are two type raid panel, one that modify the CompactRaidFrame but it has many limits, one created by SecureGroupHeaderTemplate, many authors think that can't be re-layout during combat, popular addons like Grid2, Vuhdo also have that problem.
Although I had solved that a long times ago, but people just love popular. I'll share two solutions, you can check the second solution if you have secure snippet experiences and don't want use another Lib.
I. Use the Scorpio Lib.
You can leave the details to the Scorpio, and enjoy the further updatings. BTW. if you have interesting about the Scorpio's Style system(which all indicators can be defined in the style table), you can check Scoriop Docs and AshToAsh for an example.
II. The implementing based on the secure mechanism.
I assume the author read this part have enough secure snippet experences. There are two parts to make that happend.
i. Use a shadow panel created by SecureGroupHeaderTemplate to notify the group roster update in the secure environments.
ii. The group roster update may occurs many times during the same time, we need a secure delay mechanism to make sure only do one time re-layout.
Here is an example code.
This only describe the mechanism to re-layout the raid panels, if you need the real code, you may need check those files:
1. SecurePanel.lua, the secure panel which used to re-layout based on the visiblity of the elements.
2. SecureGroupPanel.lua, the secure group panel inherited the Secure Panel, and use a shadow group header to refresh the unit frames generated by it.
3. UnitFrame.lua, the unit frame definition also with a hover spell manage system, this file could be ignored.
Last edited by kurapica.igas : 04-16-21 at 02:04 AM.
|WoWInterface » Developer Discussions » Dev Tools » Solution to re-layout raid panel during combat|