WoWInterface - View Single Post - Screenshot timing issues
View Single Post
05-09-16, 01:48 AM   #2
A Pyroguard Emberseer
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,991
If you hook the right functions, you can get the screenshot to activate perfectly each time.

Lua Code:
  1. local Hooked={};
  2. local function OnFinished() RunBinding("SCREENSHOT"); end
  4. hooksecurefunc("AchievementAlertFrame_SetUp",function(frame)
  5.     if not Hooked[frame] then
  6.         if frame.glow then frame.glow.supressGlow=true; end
  7.         frame.animIn:HookScript("OnFinished",OnFinished);
  8.         Hooked[frame]=true;
  9.     end
  10. end);

This catches when a dynamic achievement alert frame is shown and hooks the animIn animation to take a screenshot when it finishes fading in. This also tells the frames to suppress the glow animation so it doesn't interfere.
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote