0
@@ -39,15 +39,6 @@ local icon = ww.SummonTexture(f, "ARTWORK", ICONSIZE, ICONSIZE, nil, "LEFT", che
0
local text = ww.SummonFontString(f, "OVERLAY", "GameFontNormalSmall", nil, "RIGHT", -GAP-4, 0)
0
text:SetPoint("LEFT", icon, "RIGHT", GAP-4, 0)
0
-local item = CreateFrame("Button", "TourGuideItemFrame", UIParent, "SecureActionButtonTemplate")
0
-item:SetFrameStrata("LOW")
0
-item:SetPoint("BOTTOMRIGHT", QuestWatchFrame, "TOPRIGHT", -62, 10)
0
-item:RegisterForClicks("anyUp")
0
-local itemicon = ww.SummonTexture(item, "ARTWORK", 24, 24, "Interface\\Icons\\INV_Misc_Bag_08")
0
-itemicon:SetAllPoints(item)
0
local f2 = CreateFrame("Frame", nil, UIParent)
0
local f2anchor = "RIGHT"
0
@@ -83,11 +74,6 @@ function TourGuide:PositionStatusFrame()
0
f:SetPoint(self.db.profile.statusframepoint, self.db.profile.statusframex, self.db.profile.statusframey)
0
- if self.db.profile.itemframepoint then
0
- item:SetPoint(self.db.profile.itemframepoint, self.db.profile.itemframex, self.db.profile.itemframey)
0
local dataobj = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("TourGuide", {text = "Bah!", icon = TourGuide.icons.KILL})
0
@@ -130,7 +116,7 @@ function TourGuide:SetText(i)
0
-local lastmapped, lastmappedaction
, tex, uitem0
+local lastmapped, lastmappedaction
0
function TourGuide:UpdateStatusFrame()
0
self:Debug(1, "UpdateStatusFrame", self.current)
0
@@ -240,28 +226,14 @@ function TourGuide:UpdateStatusFrame()
0
if not f2:IsVisible() then f:SetWidth(FIXEDWIDTH + text:GetWidth()) end
0
newsize = FIXEDWIDTH + text:GetWidth()
0
- tex = useitem and select(10, GetItemInfo(tonumber(useitem)))
0
- if InCombatLockdown() then self:RegisterEvent("PLAYER_REGEN_ENABLED")
0
- else self:PLAYER_REGEN_ENABLED() end
0
+ local usetex = useitem and select(10, GetItemInfo(tonumber(useitem)))
0
+ self:SetUseItem(usetex, useitem)
0
self:UpdateGuidesPanel()
0
-function TourGuide:PLAYER_REGEN_ENABLED()
0
- itemicon:SetTexture(tex)
0
- item:SetAttribute("type1", "item")
0
- item:SetAttribute("item1", "item:"..uitem)
0
- self:UnregisterEvent("PLAYER_REGEN_ENABLED")
0
function dataobj.OnClick(self, btn)
0
if TourGuide.db.char.currentguide == "No Guide" then InterfaceOptionsFrame_OpenToFrame(TourGuide.guidespanel)
0
@@ -288,11 +260,6 @@ f:SetScript("OnClick", dataobj.OnClick)
0
check:SetScript("OnClick", function(self, btn) TourGuide:SetTurnedIn() end)
0
-item:HookScript("OnClick", function()
0
- if TourGuide:GetObjectiveInfo() == "USE" then TourGuide:SetTurnedIn() end
0
function dataobj.OnLeave() GameTooltip:Hide() end
0
function dataobj.OnEnter(self)
0
local tip = TourGuide:GetObjectiveTag("N")
0
@@ -337,15 +304,3 @@ f:SetScript("OnDragStop", function(frame)
0
frame:SetPoint(TourGuide.db.profile.statusframepoint, TourGuide.db.profile.statusframex, TourGuide.db.profile.statusframey)
0
-item:RegisterForDrag("LeftButton")
0
-item:SetClampedToScreen(true)
0
-item:SetScript("OnDragStart", item.StartMoving)
0
-item:SetScript("OnDragStop", function(frame)
0
- frame:StopMovingOrSizing()
0
- TourGuide:Debug(1, "Item frame moved", GetUIParentAnchor(frame))
0
- TourGuide.db.profile.itemframepoint, TourGuide.db.profile.itemframex, TourGuide.db.profile.itemframey = GetUIParentAnchor(frame)
Comments
No one has commented yet.