WoWInterface SVN MikScrollingBattleText

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/MikScrollingBattleText
    from Rev 137 to Rev 138
    Reverse comparison

Rev 137 → Rev 138

MSBTTriggers.lua
205,7 → 205,7
-- Health/power changes.
threshold = function (f, t, v) if (type(v)=="number") then return f(t.currentPercentage, v/100) and not f(t.lastPercentage, v/100) end end,
unitID = function (f, t, v) if ((v == "party" and string_find(t.unitID, "party%d+")) or (v == "raid" and (string_find(t.unitID, "raid%d+") or string_find(t.unitID, "party%d+")))) then v = t.unitID end return f(t.unitID, v) end,
unitReaction = function (f, t, v) if (v == REACTION_HOSTILE) then return f(UnitIsFriend(t.unitID, "player"), nil) else return f(UnitIsFriend(t.unitID, "player"), 1) end end,
unitReaction = function (f, t, v) if (v == REACTION_HOSTILE) then return f(UnitIsFriend(t.unitID, "player"), false) else return f(UnitIsFriend(t.unitID, "player"), true) end end,
}
 
 
readme.html
1213,6 → 1213,17
<td class="ParameterName" nowrap="nowrap"><a name="WhatsNew"></a>Latest</td>
<td class="ParameterDesc">
<ul>
<li>Moved the new font loader logic into its own frame to prevent issues with UIs such as RealUI that play with opacity on objects they don't own.</li>
<li>Fixed unit reaction condition that was preventing many triggers like Kill Shot and Hammer of Wrath from working.</li>
<li>Fixed taint issues cause by the _ global variable.</li>
<li>Updated options dialogs to remove reference to support for mp3s which the game no longer supports.</li>
</ul>
</td>
</tr>
<tr>
<td class="ParameterName" nowrap="nowrap">5.7.137</td>
<td class="ParameterDesc">
<ul>
<li>Corrected an error that occurs on startup with deleted default triggers.</li>
</ul>
</td>
MSBTAnimations.lua
70,6 → 70,9
-- Private variables.
-------------------------------------------------------------------------------
 
-- Prevent tainting global _.
local _
 
-- Dynamically created frame for animation updates.
local animationFrame
 
88,7 → 91,9
-- Scroll area table to be returned for external use.
local externalScrollAreas = {}
 
-- Font strings used to do initial load of used fonts.
-- Dynmically create frame and font strings used to do initial load of used
-- fonts.
local fontLoaderFrame
local loadedFontStrings = {}
 
-------------------------------------------------------------------------------
211,17 → 216,16
-- Create the font string and load the font. Since it's only being used to
-- cause the font to be loaded by the game, the default font size and outline
-- flags are acceptable to use.
fontString = animationFrame:CreateFontString(nil, "ARTWORK", "GameFontNormal")
fontLoaderFrame:Show()
fontString = fontLoaderFrame:CreateFontString(nil, "ARTWORK", "GameFontNormal")
fontString:SetPoint("BOTTOM")
fontString:SetAlpha(0)
fontString:SetFont(DEFAULT_FONT_PATH, DEFAULT_FONT_SIZE, DEFAULT_FONT_OUTLINE)
fontString:SetText("Font Loader")
fontString:SetFont(fontPath, DEFAULT_FONT_SIZE, DEFAULT_FONT_OUTLINE)
fontString:SetText("")
fontString:SetFont(fontPath, DEFAULT_FONT_SIZE, DEFAULT_FONT_OUTLINE)
fontString:SetText("Font Loader")
fontString:SetAlpha(0)
loadedFontStrings[fontName] = fontString
 
-- Finally, show the animation frame to ensure the font is loaded.
animationFrame:Show()
fontLoaderFrame:Hide()
end
 
 
553,6 → 557,13
animationFrame:Hide()
animationFrame:SetScript("OnUpdate", OnUpdateAnimationFrame)
 
-- Create a frame for preloading fonts. It seems that it needs to be anchored
-- and have a height and width in order for the fonts to actually to be loaded.
fontLoaderFrame = CreateFrame("Frame", nil, UIParent)
fontLoaderFrame:SetPoint("BOTTOM")
fontLoaderFrame:SetWidth(0.0001)
fontLoaderFrame:SetHeight(0.0001)
fontLoaderFrame:Hide()