WoWInterface SVN PhanxWatchFrame

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 1 to Rev 2
    Reverse comparison

Rev 1 → Rev 2

PhanxWatchFrame.lua New file
0,0 → 1,127
hooksecurefunc("WatchFrameItem_UpdateCooldown", function(button)
if button and PhanxBorder and not button.BorderTextures then
button:SetSize(34, 34)
PhanxBorder.AddBorder(button)
_G[button:GetName() .. "NormalTexture"]:SetTexture("")
end
end)
 
hooksecurefunc("WatchFrame_SetWidth", function(width)
WATCHFRAME_EXPANDEDWIDTH = 406
WATCHFRAME_MAXLINEWIDTH = 394
 
if WatchFrame:IsShown() and not WatchFrame.collapsed then
WatchFrame:SetWidth(WATCHFRAME_EXPANDEDWIDTH)
WatchFrame_Update()
end
end)
 
hooksecurefunc("WatchFrame_SetLine", function(line, anchor, verticalOffset, isHeader, text, dash, hasItem, isComplete, eligible)
if isHeader then
line.text:SetTextColor(1, 0.8, 0)
elseif line.text.eligible then
line.text:SetTextColor(1, 1, 1)
end
end)
 
hooksecurefunc("WatchFrameLinkButtonTemplate_Highlight", function(self, onEnter)
if onEnter then
for i = self.startLine, self.lastLine do
local line = self.lines[i]
if line then
line.text:SetTextColor(1, 1, 0)
end
end
else
for i = self.startLine, self.lastLine do
local line = self.lines[i]
if line then
if i == self.startLine then
line.text:SetTextColor(1, 0.8, 0)
else
if line.text.eligible then
line.text:SetTextColor(1, 1, 1)
end
line.dash:SetTextColor(1, 1, 1)
end
end
end
end
end)
 
local origOnClick = WatchFrameLinkButtonTemplate_OnClick
WatchFrameLinkButtonTemplate_OnClick = function(self, button, pushed)
if button == "LeftButton" and not (IsAltKeyDown() or IsControlKeyDown() or IsShiftKeyDown()) then
CloseDropDownMenus()
if self.type == "QUEST" then
local questIndex = GetQuestIndexForWatch(self.index)
-- ExpandQuestHeader(GetQuestSortIndex(questIndex))
-- QuestLog_OpenToQuest(questIndex)
 
local selectedIndex = GetQuestLogSelection();
if selectedIndex ~= 0 and questIndex == selectedIndex and QuestLogFrame:IsShown() then
return HideUIPanel(QuestLogFrame)
end
 
local numEntries, numQuests = GetNumQuestLogEntries()
if questIndex < 1 or questIndex > numEntries then
return
end
 
ExpandQuestHeader(0)
ShowUIPanel(QuestLogFrame)
QuestLog_SetSelection(questIndex)
elseif self.type == "ACHIEVEMENT" then
if not AchievementFrame then
AchievementFrame_LoadUI()
end
if not AchievementFrame:IsShown() then
AchievementFrame_ToggleAchievementFrame()
AchievementFrame_SelectAchievement(self.index)
else
if AchievementFrameAchievements.selection ~= self.index then
AchievementFrame_SelectAchievement(self.index)
else
AchievementFrame_ToggleAchievementFrame()
end
end
end
return
end
return origOnClick(self, button, pushed)
end
 
WATCHFRAME_TYPE_OFFSET = 0
WATCHFRAME_QUEST_OFFSET = 0
WATCHFRAME_MULTIPLE_LINEHEIGHT = 20
 
local PWF = CreateFrame("Frame")
PWF:RegisterEvent("PLAYER_ENTERING_WORLD")
PWF:SetScript("OnEvent", function(self)
local noop = function() end
 
local f = WatchFrame
f:EnableMouse(false)
f:ClearAllPoints()
f:SetClampedToScreen(false)
f:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 30, 17)
f:SetPoint("BOTTOMLEFT", UIParent, "LEFT", 30, 0)
f.ClearAllPoints = noop
f.SetPoint = noop
 
local h = WatchFrameHeader
h:SetHeight(1)
h:Hide()
h.SetHeight = noop
h.Show = noop
 
local b = WatchFrameCollapseExpandButton
b:Hide()
b.Show = noop
 
WatchFrame_SetWidth(1)
WatchFrame_Update(WatchFrame)
 
self:UnregisterAllEvents()
self:SetScript("OnEvent", nil)
end)
\ No newline at end of file Property changes : Added: svn:eol-style + native
PhanxWatchFrame.toc New file
0,0 → 1,3
## Interface: 40100
 
PhanxWatchFrame.lua
\ No newline at end of file Property changes : Added: svn:eol-style + native