WoWInterface SVN hankui

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /Interface/AddOns/hankui/elements
    from Rev 16 to Rev 17
    Reverse comparison

Rev 16 → Rev 17

buffs.lua
19,6 → 19,7
{15, 1, "TOPRIGHT", "TOPRIGHT", -1, -1, 1, "horizontal"}
}
 
local tempColor = CreateColor(1, 1, 1)
local dragButton
 
local function UpdateButton(self, elapsed)
29,7 → 30,7
local percent = self.timeLeft / self.durationMax
 
-- THIS SO NEEDS SOME OPTIMIZATION!!!
--[[for i = 1, 5 do
for i = 1, 5 do
local lowerBound, upperBound = i > 1 and statusbars[i - 1][7] or 0, statusbars[i][7]
if percent > lowerBound and percent < upperBound then
if self.filter == "HARMFUL" then
57,7 → 58,7
elseif percent < lowerBound then
self.statusbars[i]:Hide()
end
end]]
end
 
 
self.elapsed = 0
74,11 → 75,10
end
 
local function CreateButton(name, index, filter)
local button = _G[name .. index]
 
if button and button:IsShown() then
 
if _G[name .. index] and _G[name .. index]:IsShown() then
-- Skin button
local button = _G[name .. index]
 
if not button.skinned then
local icon, oldBorder = _G[name .. index .. "Icon"], _G[name .. index .. "Border"]
 
nameplates.lua
1,43 → 1,56
--[[ 2do
local hover = ...; hover = ...; self.hover = hover => self.hover = ...; self.hover:...;
]]
 
 
setfenv(1, select(2, ...))
 
SetCVar("spreadnameplates", 1)
SetCVar("bloattest", 0)
SetCVar("bloatnameplates", 0)
SetCVar("bloatthreat", 0)
SetCVar("ShowVKeyCastbar", 1)
local select, unpack, RED_FONT_COLOR_CODE = select, unpack, RED_FONT_COLOR_CODE
local WorldFrame = WorldFrame
local tempColor = CreateColor(1, 1, 1)
 
-- Modified caelNameplates by Caellian
local f = CreateFrame("Frame", nil, UIParent)
f:SetScript("OnEvent", function(self, event, ...)
if type(self[event] == "function") then
return self[event](self, event, ...)
end
end)
-- Color the health bar dependent on hp%
local function ColorHealthBar(self, value)
local hpp, _, max = self:GetParent().hpp, self:GetMinMaxValues()
local tempColor = colors["Red"]:GetBlend(colors["Green"], value / max)
 
local select, unpack = select, unpack
local RED_FONT_COLOR_CODE = RED_FONT_COLOR_CODE
hpp:SetText(("%d%%"):format(value / max * 100))
hpp:SetTextColor(unpack(tempColor))
self:SetStatusBarColor(unpack(tempColor))
end
 
local function ColorHealthBar(self)
local hpCur, _, hpMax = self.healthBar:GetValue(), self.healthBar:GetMinMaxValues()
local color = colors["Red"]:GetBlend(colors["Green"], hpCur / hpMax)
-- Update spell names / interruptibility
local function UpdateCastState(self, event, ...)
if (event == "UNIT_SPELLCAST_START" or event == "UNIT_SPELLCAST_CHANNEL_START") and ({...})[1] == "target" then
self.channeling = event == "UNIT_SPELLCAST_CHANNEL_START"
local spellInfo = self.channeling and UnitChannelInfo or UnitCastingInfo
local interruptible = UnitCanAttack("player", "target") and select(select("#", spellInfo("target")), spellInfo("target"))
self.name:SetTextColor(unpack(colors[interruptible and "Red" or "White"]))
self.time:SetTextColor(unpack(colors[interruptible and "Red" or "White"]))
self.name:SetText(({...})[2])
end
end
 
self.hpp:SetText(("%d%%"):format(hpCur / hpMax * 100))
self.hpp:SetTextColor(unpack(color))
self.healthBar:SetStatusBarColor(unpack(color))
-- Update spell cast timer
local function UpdateCastTime(self, value)
self.time:SetText(("%.2fs"):format(self.channeling and value or select(2, self:GetMinMaxValues()) - value))
end
 
-- Color on hover
local function CheckMouseOver(self)
if self.highlight:IsShown() then
if self.hover:IsShown() then
self.name:SetTextColor(unpack(colors["White"]))
else
self.name:SetTextColor(self.r, self.g, self.b)
end
end
 
-- Show glow on aggro
local function CheckThreat(self)
if self.oldGlow:IsShown() then self.glow:Show() else self.glow:Hide() end
if self._aggro:IsShown() then self.aggro:Show() else self.aggro:Hide() end
end
 
-- Poll for hover / threat updates
local function UpdatePlate(self, elapsed)
self.elapsed = self.elapsed + elapsed
if self.elapsed >= 0.2 then
47,28 → 60,29
end
end
 
-- Some information is not available until visibility changes
local function ShowPlate(self)
local statusR, statusG, statusB = self.healthBar:GetStatusBarColor()
if statusG + statusB == 0 then
local r, g, b = self.healthBar:GetStatusBarColor()
if g + b == 0 then
-- Hostile unit
self.r, self.g, self.b = unpack(colors["Red"])
elseif statusR + statusB == 0 then
elseif r + b == 0 then
-- Friendly unit
self.r, self.g, self.b = unpack(colors["Green"])
elseif statusR + statusG == 0 then
elseif r + g == 0 then
-- Friendly player
self.r, self.g, self.b = unpack(colors["Blue"])
elseif 2 - (statusR + statusG) < 0.05 and statusB == 0 then
elseif 2 - (r + g) < 0.05 and b == 0 then
-- Neutral unit
self.r, self.g, self.b = unpack(colors["Red"]:GetBlend(colors["Green"], 0.5))
tempColor = colors["Red"]:GetBlend(colors["Green"], 0.5)
self.r, self.g, self.b = unpack(tempColor)
else
-- Hostile player - class colored.
self.r, self.g, self.b = statusR, statusG, statusB
self.r, self.g, self.b = r, g, b
end
 
local oldName = self.oldName:GetText()
local newName = (string.len(oldName) > 20) and string.gsub(oldName, "%s?(.[\128-\191]*)%S+%s", "%1. ") or oldName
self.name:SetText(newName)
local name = self._name:GetText()
self.name:SetText((string.len(name) > 20) and string.gsub(name, "%s?(.[\128-\191]*)%S+%s", "%1. ") or name)
 
self.healthBar:SetSize(13, 13)
self.healthBar:ClearAllPoints()
84,82 → 98,82
self.level:SetText(level .. "+")
end
 
self.highlight:ClearAllPoints()
self.highlight:SetPoint("LEFT", self.hpp, -5, 0)
self.highlight:SetPoint("RIGHT", self.level, 5, 0)
self.highlight:SetPoint("TOP", self.name, 0, 5)
self.highlight:SetPoint("BOTTOM", self.name, 0, -5)
self.hover:ClearAllPoints()
self.hover:SetPoint("LEFT", self.hpp, -5, 0)
self.hover:SetPoint("RIGHT", self.level, 5, 0)
self.hover:SetPoint("TOP", self.name, 0, 5)
self.hover:SetPoint("BOTTOM", self.name, 0, -5)
 
ColorHealthBar(self)
ColorHealthBar(self.healthBar, self.healthBar:GetValue())
CheckMouseOver(self)
CheckThreat(self)
end
 
local function HidePlate(self)
-- Won't go on it's own
self.highlight:Hide()
self.hover:Hide()
end
 
local function CreatePlate(frame)
if frame.skinned then return end
frame.skinned = true
 
frame.healthBar, frame.castBar = frame:GetChildren()
local healthBar, castBar = frame.healthBar, frame.castBar
local glowRegion, overlayRegion, castbarOverlay, shieldedRegion, spellIconRegion, highlightRegion, nameTextRegion, levelTextRegion, bossIconRegion, raidIconRegion, stateIconRegion = frame:GetRegions()
 
-- Initial skinning
local function SkinPlate(self)
self.healthBar, self.castBar = self:GetChildren()
local _aggro, border, hover, _name, level, boss, raidTarget, elite = self:GetRegions()
self._aggro, self.hover, self._name, self.level, self.boss, self.elite = _aggro, hover, _name, level, boss, elite
local _, cbBorder, cbShield, cbIcon = self.castBar:GetRegions()
 
-- Name
local name = frame:CreateFontString()
name:SetPoint("CENTER")
name:SetFontObject("NameplatesFontNormal")
name:SetShadowOffset(1.25, -1.25)
nameTextRegion:Hide()
self.name = self:CreateFontString()
self.name:SetPoint("CENTER")
self.name:SetFontObject("NameplatesFontNormal")
self.name:SetShadowOffset(1.25, -1.25)
 
-- Health bar
local healthBarBd = CreateFrame("Frame", nil, frame)
healthBarBd:SetSize(13, 13)
healthBarBd:SetPoint("RIGHT", name, "LEFT", -2, 0)
healthBarBd:SetBackdrop({
self.healthBarBd = CreateFrame("Frame", nil, self)
self.healthBarBd:SetSize(13, 13)
self.healthBarBd:SetPoint("RIGHT", self.name, "LEFT", -2, 0)
self.healthBarBd:SetBackdrop({
bgFile = media.background["Flat"],
edgeFile = media.border["hankui: Nameplates"],
edgeSize = 4,
insets = { left = 2, right = 2, top = 2, bottom = 2 }
})
healthBarBd:SetBackdropColor(unpack(colors["Background light"]))
healthBarBd:SetFrameLevel(healthBar:GetFrameLevel() -1 > 0 and healthBar:GetFrameLevel() - 1 or 0)
self.healthBarBd:SetBackdropColor(unpack(colors["Background light"]))
self.healthBarBd:SetFrameLevel(self.healthBar:GetFrameLevel() -1 > 0 and self.healthBar:GetFrameLevel() - 1 or 0)
 
healthBar:SetStatusBarTexture(media.background["Flat"])
healthBar:SetOrientation("VERTICAL")
healthBar:SetBackdropColor(unpack(colors["Background light"]))
 
self.healthBar:SetStatusBarTexture(media.background["Flat"])
self.healthBar:SetOrientation("VERTICAL")
self.healthBar:SetBackdropColor(unpack(colors["Background light"]))
self.healthBar:SetScript("OnValueChanged", ColorHealthBar)
 
-- HP%
local hpp = frame:CreateFontString()
hpp:SetPoint("RIGHT", healthBarBd, "LEFT")
hpp:SetFontObject("NameplatesFontSmall")
hpp:SetShadowOffset(1.25, -1.25)
 
self.hpp = self:CreateFontString()
self.hpp:SetPoint("RIGHT", self.healthBarBd, "LEFT")
self.hpp:SetFontObject("NameplatesFontSmall")
self.hpp:SetShadowOffset(1.25, -1.25)
 
-- Mouseover glow
highlightRegion:SetTexture(media.background["hankui: Nameplates aggro"])
highlightRegion:SetVertexColor(unpack(colors["White"]))
highlightRegion:SetBlendMode("ADD")
highlightRegion:SetAlpha(0.1)
 
self.hover:SetTexture(media.background["hankui: Nameplates aggro"])
self.hover:SetVertexColor(unpack(colors["White"]))
self.hover:SetBlendMode("ADD")
self.hover:SetAlpha(0.1)
 
-- Aggro glow
local glow = frame:CreateTexture(nil, "BACKGROUND", healthBarBd:GetFrameLevel() - 1)
glow:SetTexture(media.background["hankui: Nameplates aggro"])
glow:SetVertexColor(unpack(colors["Red"]))
glow:SetBlendMode("ADD")
glow:SetTexCoord(0, 1, 0, 1)
glow:SetPoint("LEFT", hpp, -5, 0)
glow:SetPoint("RIGHT", levelTextRegion, 5, 0)
glow:SetPoint("TOP", name, 0, 5)
glow:SetPoint("BOTTOM", name, 0, -5)
glow:SetAlpha(0.25)
self.aggro = self:CreateTexture(nil, "BACKGROUND", self.healthBarBd:GetFrameLevel() - 1)
self.aggro:SetTexture(media.background["hankui: Nameplates aggro"])
self.aggro:SetVertexColor(unpack(colors["Red"]))
self.aggro:SetBlendMode("ADD")
self.aggro:SetTexCoord(0, 1, 0, 1)
self.aggro:SetPoint("LEFT", self.hpp, -5, 0)
self.aggro:SetPoint("RIGHT", level, 5, 0)
self.aggro:SetPoint("TOP", self.name, 0, 5)
self.aggro:SetPoint("BOTTOM", self.name, 0, -5)
self.aggro:SetAlpha(0.25)
 
frame:RegisterEvent("PLAYER_TARGET_CHANGED")
frame:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
frame:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE")
frame:HookScript("OnEvent", function(self, event, ...)
-- Aggro / mouseover events
self:RegisterEvent("PLAYER_TARGET_CHANGED")
self:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
self:RegisterEvent("UNIT_THREAT_SITUATION_UPDATE")
self:HookScript("OnEvent", function(self, event, ...)
-- Improve responsiveness
if event == "PLAYER_TARGET_CHANGED" or event == "UPDATE_MOUSEOVER_UNIT" then
CheckMouseOver(self)
167,132 → 181,96
CheckThreat(self)
end
end)
 
 
-- Level
levelTextRegion:ClearAllPoints()
levelTextRegion:SetPoint("LEFT", name, "RIGHT", -1, -3)
levelTextRegion:SetFontObject("NameplatesFontTiny")
levelTextRegion:SetShadowOffset(1.25, -1.25)
self.level:ClearAllPoints()
self.level:SetPoint("LEFT", self.name, "RIGHT", -1, -3)
self.level:SetFontObject("NameplatesFontTiny")
self.level:SetShadowOffset(1.25, -1.25)
 
-- Raid icon
raidIconRegion:SetSize(16, 16)
raidIconRegion:ClearAllPoints()
raidIconRegion:SetPoint("LEFT", name, "RIGHT", 10, 0)
raidIconRegion:SetTexture(media.misc["Raid icons"])
raidTarget:SetSize(16, 16)
raidTarget:ClearAllPoints()
raidTarget:SetPoint("LEFT", self.name, "RIGHT", 10, 0)
raidTarget:SetTexture(media.misc["Raid icons"])
 
-- Spell icon
spellIconRegion:ClearAllPoints()
spellIconRegion:SetPoint("TOP", healthBar, "BOTTOM", 0, -5)
spellIconRegion:SetTexCoord(0.08, 0.92, 0.08, 0.92)
spellIconRegion:SetSize(7, 7)
cbIcon:ClearAllPoints()
cbIcon:SetPoint("TOP", self.healthBar, "BOTTOM", 0, -5)
cbIcon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
cbIcon:SetSize(7, 7)
 
local spellIcoBd = CreateFrame("Frame", nil, castBar)
spellIcoBd:SetPoint("TOPLEFT", spellIconRegion, -2, 2)
spellIcoBd:SetPoint("BOTTOMRIGHT", spellIconRegion, 2, -2)
spellIcoBd:SetBackdrop({
local cbIconBd = CreateFrame("Frame", nil, self.castBar)
cbIconBd:SetPoint("TOPLEFT", cbIcon, -2, 2)
cbIconBd:SetPoint("BOTTOMRIGHT", cbIcon, 2, -2)
cbIconBd:SetBackdrop({
bgFile = media.background["Flat"],
edgeFile = media.border["hankui: Nameplates"],
edgeSize = 4,
insets = { left = 2, right = 2, top = 2, bottom = 2 }
})
spellIcoBd:SetBackdropColor(unpack(colors["Background light"]))
spellIcoBd:SetFrameLevel(castBar:GetFrameLevel() -1 > 0 and castBar:GetFrameLevel() - 1 or 0)
cbIconBd:SetBackdropColor(unpack(colors["Background light"]))
cbIconBd:SetFrameLevel(self.castBar:GetFrameLevel() -1 > 0 and self.castBar:GetFrameLevel() - 1 or 0)
 
-- Cast timer
local castTime = castBar:CreateFontString()
castTime:SetPoint("TOP", spellIcoBd)
castTime:SetPoint("BOTTOM", spellIcoBd)
castTime:SetPoint("RIGHT", hpp)
castTime:SetFontObject("NameplatesFontTiny")
castTime:SetShadowOffset(1.25, -1.25)
self.castBar.time = self.castBar:CreateFontString()
self.castBar.time:SetPoint("TOP", cbIconBd)
self.castBar.time:SetPoint("BOTTOM", cbIconBd)
self.castBar.time:SetPoint("RIGHT", self.hpp)
self.castBar.time:SetFontObject("NameplatesFontTiny")
self.castBar.time:SetShadowOffset(1.25, -1.25)
 
-- Spell
local spellName = castBar:CreateFontString()
spellName:SetPoint("TOP", spellIcoBd)
spellName:SetPoint("BOTTOM", spellIcoBd)
spellName:SetPoint("LEFT", name)
spellName:SetPoint("RIGHT", levelTextRegion)
self.castBar.name = self.castBar:CreateFontString()
self.castBar.name:SetPoint("TOP", cbIconBd)
self.castBar.name:SetPoint("BOTTOM", cbIconBd)
self.castBar.name:SetPoint("LEFT", self.name)
self.castBar.name:SetPoint("RIGHT", self.level)
 
spellName:SetFontObject("NameplatesFontTiny")
spellName:SetJustifyH("LEFT")
spellName:SetShadowOffset(1.25, -1.25)
self.castBar.name:SetFontObject("NameplatesFontTiny")
self.castBar.name:SetJustifyH("LEFT")
self.castBar.name:SetShadowOffset(1.25, -1.25)
 
-- Set spell name / interruptible color
castBar:RegisterEvent("UNIT_SPELLCAST_START")
castBar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START")
castBar:HookScript("OnEvent", function(self, event, ...)
if (event == "UNIT_SPELLCAST_START" or event == "UNIT_SPELLCAST_CHANNEL_START") and ({...})[1] == "target" then
self.channeling = event == "UNIT_SPELLCAST_CHANNEL_START"
local spellInfo = self.channeling and UnitChannelInfo or UnitCastingInfo
local interruptible = UnitCanAttack("player", "target") and select(select("#", spellInfo("target")), spellInfo("target"))
spellName:SetTextColor(unpack(colors[interruptible and "Red" or "White"]))
castTime:SetTextColor(unpack(colors[interruptible and "Red" or "White"]))
spellName:SetText(({...})[2])
end
end)
 
-- Update cast time
castBar:HookScript("OnValueChanged", function(self, value)
castTime:SetText(("%.2fs"):format(self.channeling and value or select(2, self:GetMinMaxValues()) - value))
end)
 
-- Update hp bar
healthBar:HookScript("OnValueChanged", function(self, value)
ColorHealthBar(frame)
end)
self.castBar:RegisterEvent("UNIT_SPELLCAST_START")
self.castBar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START")
self.castBar:HookScript("OnEvent", UpdateCastState)
self.castBar:HookScript("OnValueChanged", UpdateCastTime)
 
glowRegion:SetTexture(nil)
overlayRegion:SetTexture(nil)
shieldedRegion:SetTexture(nil)
castbarOverlay:SetTexture(nil)
stateIconRegion:SetTexture(nil)
bossIconRegion:SetTexture(nil)
castBar:SetStatusBarTexture(nil)
 
frame.name = name
frame.oldName = nameTextRegion
frame.healthBarBd = healthBarBd
frame.hpp = hpp
frame.level = levelTextRegion
frame.elite = stateIconRegion
frame.boss = bossIconRegion
frame.glow = glow
frame.oldGlow = glowRegion
frame.highlight = highlightRegion
 
ShowPlate(frame)
frame:SetScript("OnShow", ShowPlate)
frame:SetScript("OnHide", HidePlate)
-- Hide stuff
self._aggro:SetTexture(nil)
border:SetTexture(nil)
self._name:Hide()
self.boss:SetTexture(nil)
self.elite:SetTexture(nil)
self.castBar:SetStatusBarTexture(nil)
cbBorder:SetTexture(nil)
cbShield:SetTexture(nil)
 
frame.elapsed = 0
frame:SetScript("OnUpdate", UpdatePlate)
ShowPlate(self)
 
self.elapsed = 0
self:SetScript("OnUpdate", UpdatePlate)
self:SetScript("OnShow", ShowPlate)
self:SetScript("OnHide", HidePlate)
end
 
-- Find out if a frame is a nameplate
local IsValidFrame = function(frame)
if frame:GetName() then return end
local overlayRegion = select(2, frame:GetRegions())
return overlayRegion and overlayRegion:GetObjectType() == "Texture" and overlayRegion:GetTexture() == [[Interface\Tooltips\Nameplate-Border]]
-- Scan for new plates
local function Scan()
for i = 1, WorldFrame:GetNumChildren() do
local child = select(i, WorldFrame:GetChildren())
if child:GetName() and child:GetName():find("NamePlate%d+") and not child.name then
SkinPlate(child)
end
end
end
 
local numKids = 0
local lastUpdate = 0
-- Search for nameplates
f:SetScript("OnUpdate", function(self, elapsed)
lastUpdate = lastUpdate + elapsed
local dummy = CreateFrame("Frame")
local totalElapsed, numChildren = 0, 0
 
if lastUpdate > 0.1 then
lastUpdate = 0
 
local newNumKids = WorldFrame:GetNumChildren()
if newNumKids ~= numKids then
for i = numKids + 1, newNumKids do
local frame = select(i, WorldFrame:GetChildren())
if IsValidFrame(frame) then
CreatePlate(frame)
end
end
numKids = newNumKids
end
dummy:SetScript("OnUpdate", function(self, elapsed)
totalElapsed = totalElapsed + elapsed
if totalElapsed > 0.1 and WorldFrame:GetNumChildren() ~= numChildren then
Scan()
end
end)
minimap.lua
168,6 → 168,40
end
MiniMapInstanceDifficultyText:SetFontObject("MinimapFontNormal")
 
-- Instance guild difficulty
 
GuildInstanceDifficulty:SetSize(64, 32)
GuildInstanceDifficulty:ClearAllPoints()
GuildInstanceDifficulty:SetPoint("TOPLEFT", MinimapBackdrop, -8, -12)
 
-- GuildInstanceDifficultyBackground (BG) => Neu setzen
GuildInstanceDifficultyBackground:SetTexture(media.misc["Ribbon"])
GuildInstanceDifficultyBackground:SetVertexColor(unpack(colors["Signature color"]))
GuildInstanceDifficultyBackground.SetVertexColor = function() end
GuildInstanceDifficultyBackground:ClearAllPoints()
GuildInstanceDifficultyBackground:SetAllPoints()
GuildInstanceDifficultyBackground:SetTexCoord(0, 1, 0, 1)
 
--GuildInstanceDifficultyEmblem (Gilden Icon) => Verstecken oder anordnen
GuildInstanceDifficultyEmblem:Hide()
GuildInstanceDifficultyBorder:Hide()
GuildInstanceDifficultyHanger:Hide()
GuildInstanceDifficultyDarkBackground:Hide()
 
--GuildInstanceDifficultyHeroicTexture (Hero Totenkopf) => Verstecken & Funktion überschreiben
GuildInstanceDifficultyHeroicTexture:Hide()
GuildInstanceDifficultyHeroicTexture.Hide = function(shown)
GuildInstanceDifficultyText:SetText((GuildInstanceDifficultyText:GetText() or "") .. (shown and " (H)" or " (N)"))
end
GuildInstanceDifficultyHeroicTexture.Show = function() GuildInstanceDifficultyHeroicTexture.Hide(true) end
 
--GuildInstanceDifficultyText (FontString) => Funktion überschreiben
GuildInstanceDifficultyText:ClearAllPoints()
GuildInstanceDifficultyText:SetPoint("TOPLEFT", 10, -6)
GuildInstanceDifficultyText:SetFontObject("MinimapFontNormal")
GuildInstanceDifficultyText.SetPoint = function() end
GuildInstanceDifficultyText.ClearAllPoints = function() end
 
-- Coordinates
local coords = Minimap:CreateFontString()
coords:SetFontObject("MinimapFontNormal")
180,7 → 214,7
coordThrottle = coordThrottle + elapsed
if coordThrottle > 0.2 then
local x, y = GetPlayerMapPosition("player")
coords:SetText(("%.1f, %.1f"):format(x * 100, y * 100))
coords:SetText(("%.1f|n%.1f"):format(x * 100, y * 100))
coordThrottle = 0
end
end)
190,7 → 224,7
MiniMapBin:SetAlpha(1)
MiniMapTracking:SetAlpha(1)
MiniMapMailFrame:SetAlpha(1)
coords:SetAlpha(1)
coords:Show()
end
 
local function mouseout()
198,7 → 232,7
MiniMapBin:SetAlpha(0)
MiniMapTracking:SetAlpha(0)
MiniMapMailFrame:SetAlpha(0)
coords:SetAlpha(0)
coords:Hide()
end
end
 
chat.lua
207,6 → 207,8
chatFrame.caption = UIParent:CreateFontString(nil, "OVERLAY")
chatFrame.caption:SetAllPoints(chatTab)
chatFrame.caption:SetFontObject("ChatTabFontNormal")
chatFrame.caption:SetShadowOffset(1.25, -1.25)
chatFrame.caption:SetShadowColor(unpack(colors["Background"]))
if not chatTab:IsShown() then chatFrame.caption:Hide() end
chatTab:SetScript("OnShow", function() chatFrame.caption:Show() end)
chatTab:SetScript("OnHide", function() chatFrame.caption:Hide() end)
237,6 → 239,21
_G[frame .. "EditBox" .. tex]:SetTexture(nil)
end
 
-- Editbox animation
local editBoxAnimIn = editBox:CreateAnimationGroup()
local fadeIn = editBoxAnimIn:CreateAnimation("Alpha")
fadeIn:SetChange(1)
fadeIn:SetDuration(1)
fadeIn:SetSmoothing("IN_OUT")
fadeIn:SetOrder(0)
 
editBoxAnimIn:SetScript("OnFinished", function() editBox:SetAlpha(1) end)
editBox:HookScript("OnHide", function() if editBoxAnimIn:IsPlaying() then editBoxAnimIn:Stop() end end)
editBox:HookScript("OnShow", function()
editBox:SetAlpha(0)
editBoxAnimIn:Play()
end)
 
-- Copy button
local copyFrame = CreateFrame("Frame", frame .. "Copypasta", chatFrame)
copyFrame:SetSize(16, 16)