Quantcast Cooldown spiral no longer inherit alpha? - Page 2 - WoWInterface
Thread Tools Display Modes
10-27-14, 07:15 AM   #21
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
So how can we get this to Blizzard and make them notice?

The change affects every addon that is using cooldown spirals now.

That can't be right.

Posted it in the WoD BUG forum.

__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 10-27-14 at 07:34 AM.
  Reply With Quote
10-27-14, 10:49 AM   #22
Tuller
A Warpwood Thunder Caller
 
Tuller's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 91
So might I suggest something completely horrible to work around the lack of cooldown:GetSwipeColor? I've not actually tested this at all.
Lua Code:
  1. do
  2.     local mt = getmetatable(_G['ActionButton1Cooldown']).__index
  3.  
  4.     if not mt.GetSwipeColor then
  5.         local swipeColors = setmetatable({}, {
  6.             __index = function(t, cooldown)
  7.                 local color = t[cooldown]
  8.  
  9.                 if not color then
  10.                     color = { r = 0, g = 0, b = 0, a = 1 }
  11.                     t[cooldown] = color
  12.                 end
  13.  
  14.                 return color
  15.             end
  16.         })
  17.  
  18.         mt.GetSwipeColor = function(self)
  19.             local color = swipeColors[self]
  20.  
  21.             return color.r, color.g, color.b, color.a
  22.         end
  23.  
  24.         hooksecurefunc(mt, 'SetSwipeColor', function(self, r, g, b, a)
  25.             local color = swipeColors[self]
  26.  
  27.             color.r = r
  28.             color.g = g
  29.             color.b = b
  30.             color.a = a
  31.         end)
  32.     end
  33. end
  Reply With Quote
10-27-14, 03:46 PM   #23
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
The alpha issue was apparently a typo that will be fixed in the next patch.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
10-27-14, 03:54 PM   #24
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
Good to hear that.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
10-31-14, 06:40 AM   #25
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
Patch 6.0.3 seems not to have fixed the issue. :-(
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
10-31-14, 12:22 PM   #26
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Urk. Sorry :/
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
11-04-14, 10:31 AM   #27
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
might have already been answered but I didn't see it - does anyone know if it's possible to modify the new cooldown text? i'm looking to scale it down a bit.
  Reply With Quote
11-05-14, 05:25 AM   #28
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
FrameXML/Cooldown.xml has the corresponding template.

But in that template is no FontString described.

So here is the button from the InterfaceOptionPanels.xml

Code:
			<CheckButton name="$parentCountdownCooldowns" inherits="InterfaceOptionsCheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSecureAbilityToggle" relativePoint="BOTTOMLEFT" x="0" y="-8"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.type = CONTROLTYPE_CHECKBOX;
						self.cvar = "countdownForCooldowns";
						BlizzardOptionsPanel_RegisterControl(self, self:GetParent());
					</OnLoad>
				</Scripts>
			</CheckButton>
In the Lua: countdownForCooldowns = "COUNTDOWN_FOR_COOLDOWNS_TEXT"
Problem is. That CVAR is nowhere being used. Thus I assume it is added C-side?!

But we could try parsing the button regions.
lua Code:
  1. local function CheckRegions(f)
  2.   for _, child in pairs({ f:GetChildren() }) do
  3.     CheckRegions(child)
  4.   end
  5.   for _, region in pairs({ f:GetRegions() }) do
  6.     print("region",region:GetName(),region:GetObjectType())
  7.   end
  8. end
  9.  
  10. CheckRegions(ActionButton1)

macro
Code:
/run local function CR(f) for _,c in pairs({f:GetChildren()}) do CR(c) end for _,r in pairs({f:GetRegions()}) do print("region",r:GetName(),r:GetObjectType()) end end; CR(ActionButton1)
Ok I got it. macro
Code:
/run local function CR(f) for _,c in pairs({f:GetChildren()}) do CR(c) end for _,r in pairs({f:GetRegions()}) do if r:GetObjectType() == "FontString" then print("region",r:GetName(),r:GetFont(),r:GetText()) end end end; CR(ActionButton1)
I ran a cooldown on button1 and there is a fontstring that has no name. But the text it is spitting out is exactly my cooldown.


If you disable the interface option the font string is still there.

I checked the child name. So the child that is inheriting the fontstring is _G["ActionButton1Cooldown"]. Easy as that. Parse over all actionbutton cooldowns and track down that fontstring. Actionally making it accessable via key would be best. Actionbuttons have a key for the cooldown child: Actionbutton1.cooldown would be your cooldown frame.

Tested it. It is working properly.

Lua Code:
  1. local bu = ActionButton1
  2.     for _, region in next, {bu.cooldown:GetRegions()} do
  3.       if region:GetObjectType() == "FontString" then
  4.         bu.cooldown.cooldownText = region      
  5.       end
  6.     end
  7.     bu.cooldown.cooldownText:SetFont(cfg.font, cfg.hotkeys.fontsize, "OUTLINE")

Btw. Tuller is hooking OnSizeChanced on the cooldown and adjusts the size of the cooldown text based on button size/scale. Pretty important if your cooldowns on buffs become huge.

I would still use OmniCC/tullaCC any day long instead.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 11-05-14 at 06:25 AM.
  Reply With Quote
11-06-14, 04:06 PM   #29
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
neat, thanks!

I definitely still prefer omniCC but it's nice to have the option to mod this - since I imagine a fair few users will shift to use the default option where available.
  Reply With Quote
11-07-14, 08:37 AM   #30
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
Does anyone have a definitive workaround for this yet?

I can hook the parent's SetAlpha, PLAYER_LOGIN, PLAYER_ENTERING_WORLD, but still it'll reset itself sometimes.
  Reply With Quote
11-07-14, 10:12 AM   #31
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 328
@zork, wish we could edit text, currently neither SetText nor SetFormattedText works for that string
__________________
  Reply With Quote
11-07-14, 11:04 AM   #32
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
setting a "MONOCHROME" flag for that string also crashes the client, though "MONOCHROMEOUTLINE" works fine...
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Cooldown spiral no longer inherit alpha?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off