diff --git a/Interface/AddOns/SVUI/data/defaults.lua b/Interface/AddOns/SVUI/data/defaults.lua index d874ce6..98e07dc 100644 --- a/Interface/AddOns/SVUI/data/defaults.lua +++ b/Interface/AddOns/SVUI/data/defaults.lua @@ -675,6 +675,10 @@ SV.defaults["SVPlate"] = { }, }; +SV.defaults["SVQuest"] = { + ["enable"] = true, +} + SV.defaults["SVStats"] = { ["enable"] = true, ["font"] = "SVUI Number Font", diff --git a/Interface/AddOns/SVUI/framework/api/api_templates.lua b/Interface/AddOns/SVUI/framework/api/api_templates.lua index d07785f..443ea05 100644 --- a/Interface/AddOns/SVUI/framework/api/api_templates.lua +++ b/Interface/AddOns/SVUI/framework/api/api_templates.lua @@ -732,8 +732,8 @@ local function SetCheckboxTemplate(self, shrink, x, y) local width, height = self:GetSize() if(shrink) then - x = x or -7 - y = y or -7 + x = x or 0 + y = y or 0 end width = width + (x or 0) @@ -742,6 +742,33 @@ local function SetCheckboxTemplate(self, shrink, x, y) self:SetSize(width, height) CreatePanelTemplate(self, "Inset", true, true, 1, x, y) + + if(self.SetNormalTexture) then + self:SetNormalTexture("") + end + + if(self.SetPushedTexture) then + self:SetPushedTexture("") + end + + if(self.SetHighlightTexture) then + if(not self.hover) then + local hover = self:CreateTexture(nil, "OVERLAY") + hover:FillInner(self.Panel) + self.hover = hover; + end + local color = SV.Media.color.highlight + self.hover:SetTexture(color[1], color[2], color[3], 0.5) + self:SetHighlightTexture(self.hover) + end + + if(self.SetCheckedTexture) then + self:SetCheckedTexture([[Interface\Buttons\UI-CheckBox-Check]]) + end + + if(self.SetDisabledCheckedTexture) then + self:SetDisabledCheckedTexture([[Interface\Buttons\UI-CheckBox-Check-Disabled]]) + end end local function SetColorCheckboxTemplate(self, underlay, x, y) @@ -757,7 +784,7 @@ local function SetColorCheckboxTemplate(self, underlay, x, y) hooksecurefunc(self, "SetChecked", function(self,checked) local r,g,b = 0,0,0 - if(checked == 1 or checked == true) then + if(checked) then r,g,b = self:GetCheckedTexture():GetVertexColor() end self:SetBackdropBorderColor(r,g,b) diff --git a/Interface/AddOns/SVUI/framework/movers/mover_dragger.lua b/Interface/AddOns/SVUI/framework/movers/mover_dragger.lua index 275d2fd..c3dd21d 100644 --- a/Interface/AddOns/SVUI/framework/movers/mover_dragger.lua +++ b/Interface/AddOns/SVUI/framework/movers/mover_dragger.lua @@ -48,261 +48,181 @@ Dragger.Frames = {}; local UIPanels = {}; -UIPanels["AchievementFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["AuctionFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["ArchaeologyFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["BattlefieldMinimap"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["BarberShopFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["BlackMarketFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["CalendarFrame"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["CharacterFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["ClassTrainerFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["DressUpFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["DraenorZoneAbilityFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["EncounterJournal"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["FriendsFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["GMSurveyFrame"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["GossipFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["GuildFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["GuildBankFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["GuildRegistrarFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["GarrisonLandingPage"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["GarrisonMissionFrame"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["GarrisonCapacitiveDisplayFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["HelpFrame"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["InterfaceOptionsFrame"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["ItemUpgradeFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["KeyBindingFrame"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["LFGDungeonReadyPopup"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["MacOptionsFrame"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["MacroFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["MailFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["MerchantFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["PlayerTalentFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["PetJournalParent"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["PetStableFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["PVEFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["PVPFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["QuestFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["QuestLogFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["RaidBrowserFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["ReadyCheckFrame"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["ReforgingFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["ReportCheatingDialog"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["ReportPlayerNameDialog"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["RolePollPopup"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["SpellBookFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["TabardFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["TaxiFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["TimeManagerFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["TradeSkillFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["TradeFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["TransmogrifyFrame"] = { point = 'TBD', snap = false, centered = false }; -UIPanels["TutorialFrame"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["VideoOptionsFrame"] = { point = 'TBD', snap = false, centered = true }; -UIPanels["VoidStorageFrame"] = { point = 'TBD', snap = false, centered = false }; - -UIPanels["ScrollOfResurrectionSelectionFrame"] = { point = 'TBD', snap = false, centered = false }; +UIPanels["AchievementFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["AuctionFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["ArchaeologyFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["BattlefieldMinimap"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["BarberShopFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["BlackMarketFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["CalendarFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["CharacterFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["ClassTrainerFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["DressUpFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["DraenorZoneAbilityFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["EncounterJournal"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["FriendsFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["GMSurveyFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["GossipFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["GuildFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["GuildBankFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["GuildRegistrarFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["GarrisonLandingPage"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["GarrisonMissionFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["GarrisonCapacitiveDisplayFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["HelpFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["InterfaceOptionsFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["ItemUpgradeFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["KeyBindingFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["LFGDungeonReadyPopup"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["MacOptionsFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["MacroFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["MailFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["MerchantFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["PlayerTalentFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["PetJournalParent"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["PetStableFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["PVEFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["PVPFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["QuestFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["QuestLogFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["RaidBrowserFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["ReadyCheckFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["ReforgingFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["ReportCheatingDialog"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["ReportPlayerNameDialog"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["RolePollPopup"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["SpellBookFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["TabardFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["TaxiFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["TimeManagerFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["TradeSkillFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["TradeFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["TransmogrifyFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; +UIPanels["TutorialFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["VideoOptionsFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = true }; +UIPanels["VoidStorageFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; + +UIPanels["ScrollOfResurrectionSelectionFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; --[[ ########################################################## LOCAL FUNCTIONS ########################################################## ]]-- -local function Pinpoint(parent) - local centerX, centerY = parent:GetCenter() - local screenWidth = GetScreenWidth() - local screenHeight = GetScreenHeight() - local result; - if not centerX or not centerY then - return "CENTER" - end - local heightTop = screenHeight * 0.75; - local heightBottom = screenHeight * 0.25; - local widthLeft = screenWidth * 0.25; - local widthRight = screenWidth * 0.75; - if(((centerX > widthLeft) and (centerX < widthRight)) and (centerY > heightTop)) then - result = "TOP" - elseif((centerX < widthLeft) and (centerY > heightTop)) then - result = "TOPLEFT" - elseif((centerX > widthRight) and (centerY > heightTop)) then - result = "TOPRIGHT" - elseif(((centerX > widthLeft) and (centerX < widthRight)) and centerY < heightBottom) then - result = "BOTTOM" - elseif((centerX < widthLeft) and (centerY < heightBottom)) then - result = "BOTTOMLEFT" - elseif((centerX > widthRight) and (centerY < heightBottom)) then - result = "BOTTOMRIGHT" - elseif((centerX < widthLeft) and (centerY > heightBottom) and (centerY < heightTop)) then - result = "LEFT" - elseif((centerX > widthRight) and (centerY < heightTop) and (centerY > heightBottom)) then - result = "RIGHT" - else - result = "CENTER" - end - return result +local function SetDraggablePoint(frame, data) + if((not frame) or (not data)) then return; end + local frameName = frame:GetName() + local point = Dragger.Frames[frameName]; + if(point and (type(point) == "string") and (point ~= 'TBD')) then + local anchor1, parent, anchor2, x, y = split("\031", point); + data.cansetpoint = true; + data.snapped = false; + frame:ClearAllPoints(); + frame:SetPoint(anchor1, parent, anchor2, x, y); + end end -local function CurrentPosition(frame) +local function SaveCurrentPosition(frame) if not frame then return end + local frameName = frame:GetName() local anchor1, parent, anchor2, x, y = frame:GetPoint() if((not anchor1) or (not anchor2) or (not x) or (not y)) then - return "TBD" - end - - local parentName - if(not parent or (parent and (not parent:GetName()))) then - parentName = "UIParent" + Dragger.Frames[frameName] = "TBD"; else - parentName = parent:GetName() + local parentName + if(not parent or (parent and (not parent:GetName()))) then + parentName = "UIParent" + else + parentName = parent:GetName() + end + Dragger.Frames[frameName] = ("%s\031%s\031%s\031%d\031%d"):format(anchor1, parentName, anchor2, parsefloat(x), parsefloat(y)) end - return ("%s\031%s\031%s\031%d\031%d"):format(anchor1, parentName, anchor2, parsefloat(x), parsefloat(y)) end --[[ ########################################################## -CONSTRUCTS +SCRIPT AND EVENT HANDLERS ########################################################## ]]-- -function Dragger:New(frameName) - if(not UIPanels[frameName]) then - UIPanels[frameName] = { point = 'TBD', snap = false, centered = false }; - if(not self.EventsActive) then - self:RegisterEvent("ADDON_LOADED") - self:RegisterEvent("LFG_UPDATE") - self:RegisterEvent("ROLE_POLL_BEGIN") - self:RegisterEvent("READY_CHECK") - self:RegisterEvent("UPDATE_WORLD_STATES") - self:RegisterEvent("WORLD_STATE_TIMER_START") - self:RegisterEvent("WORLD_STATE_UI_TIMER_UPDATE") - self:SetScript("OnEvent", self.EventHandler) - self.EventsActive = true; - end +local DraggerFrame_OnDragStart = function(self) + if(not self:IsMovable()) then return; end + self:StartMoving(); + local data = UIPanels[self:GetName()]; + if(data) then + data.moving = true; + data.snapped = false; + data.canupdate = false; end -end - -function Dragger:SavePoint(frameName) - if((not _G[frameName]) or (not SV.cache.UIPanels)) then return end - SV.cache.UIPanels[frameName] = CurrentPosition(_G[frameName]) end -function Dragger:SetPositions() - for frameName, point in pairs(Dragger.Frames) do - local frame = _G[frameName]; - local anchor1, parent, anchor2, x, y; - if(frame) then - if (SV.cache.UIPanels and SV.cache.UIPanels[frameName] and (type(SV.cache.UIPanels[frameName]) == "string")) then - local saved = SV.cache.UIPanels[frameName] - if(saved ~= 'TBD') then - local anchor1, parent, anchor2, x, y = split("\031", saved) - frame:ClearAllPoints() - frame:SetPoint(anchor1, parent, anchor2, x, y) - end - elseif(point and (type(point) == "string") and (point ~= 'TBD')) then - anchor1, parent, anchor2, x, y = split("\031", point) - frame:ClearAllPoints() - frame:SetPoint(anchor1, parent, anchor2, x, y) - end - end +local DraggerFrame_OnDragStop = function(self) + if(not self:IsMovable()) then return; end + self:StopMovingOrSizing(); + local data = UIPanels[self:GetName()]; + if(data) then + data.moving = false; + data.snapped = false; + data.canupdate = true; + SaveCurrentPosition(self); end end -function Dragger:Reset() - for frameName, point in pairs(self.Frames) do - if(SV.cache.UIPanels and SV.cache.UIPanels[frameName]) then - SV.cache.UIPanels[frameName] = nil - end +local _hook_DraggerFrame_OnShow = function(self) + if(InCombatLockdown() or (not self:IsMovable())) then return; end + local data = UIPanels[self:GetName()]; + if(data and (not data.snapped)) then + SetDraggablePoint(self, data) end - ReloadUI() -end ---[[ -########################################################## -SCRIPT AND EVENT HANDLERS -########################################################## -]]-- -local DraggerFrame_OnDragStart = function(self) - if(not self:IsMovable()) then return end - self:StartMoving() - self.IsMoving = true end -local DraggerFrame_OnDragStop = function(self) - if(not self:IsMovable()) then return end - local frameName = self:GetName(); - self.IsMoving = false; - self.CanUpdate = true; - self:StopMovingOrSizing() - local anchor1, parent, anchor2, x, y = self:GetPoint() - parent = self:GetParent():GetName() - self:ClearAllPoints() - self:SetPoint(anchor1, parent, anchor2, x, y) - Dragger.Frames[frameName] = CurrentPosition(self) - if(UIPanels[frameName] and UIPanels[frameName].saved) then - Dragger:SavePoint(frameName) +local _hook_DraggerFrame_OnHide = function(self) + if(InCombatLockdown() or (not self:IsMovable())) then return; end + local data = UIPanels[self:GetName()]; + if(data) then + data.moving = false; + data.snapped = false; + data.canupdate = true; end end -local DraggerFrame_OnShow = function(self) - if(not self:IsMovable()) then return end - local frameName = self:GetName(); - if(UIPanels[frameName] and UIPanels[frameName].saved and (SV.cache.UIPanels and SV.cache.UIPanels[frameName] and (type(SV.cache.UIPanels[frameName]) == "string"))) then - local saved = SV.cache.UIPanels[frameName] - if(saved ~= 'TBD') then - local anchor1, parent, anchor2, x, y = split("\031", saved) - self:ClearAllPoints() - self:SetPoint(anchor1, parent, anchor2, x, y) - self.CanUpdate = false; - end - else - local defaultPoint = Dragger.Frames[frameName] - if(defaultPoint and (type(defaultPoint) == "string") and (defaultPoint ~= 'TBD')) then - local anchor1, parent, anchor2, x, y = split("\031", defaultPoint) - self:ClearAllPoints() - self:SetPoint(anchor1, parent, anchor2, x, y) - self.CanUpdate = false; - end +local _hook_DraggerFrame_OnUpdate = function(self) + if(InCombatLockdown()) then return; end + local data = UIPanels[self:GetName()]; + if(data and (not data.moving) and (not data.snapped)) then + SetDraggablePoint(self, data) end end -local DraggerFrame_OnAttributeChanged = function(self) - if(self.IsMoving) then return end - self.CanUpdate = false; -end - -local DraggerFrame_PostSetPoint = function(self) - if(self.IsMoving) then return end - self.CanUpdate = true; +local _hook_DraggerFrame_OnSetPoint = function(self) + if(not self:IsMovable()) then return; end + local data = UIPanels[self:GetName()]; + if(data and (not data.moving)) then + if(not data.cansetpoint) then + data.snapped = true; + data.canupdate = false; + end + end end -local DraggerFrame_OnUpdate = function(self) - if(InCombatLockdown() or (self.IsMoving)) then return end - local frameName = self:GetName(); - if(self.CanUpdate) then - if(UIPanels[frameName] and UIPanels[frameName].saved and (SV.cache.UIPanels and SV.cache.UIPanels[frameName] and (type(SV.cache.UIPanels[frameName]) == "string"))) then - local saved = SV.cache.UIPanels[frameName] - if(saved ~= 'TBD') then - local anchor1, parent, anchor2, x, y = split("\031", saved) - self:ClearAllPoints() - self:SetPoint(anchor1, parent, anchor2, x, y) - self.CanUpdate = false; - end - else - local defaultPoint = Dragger.Frames[frameName] - if(defaultPoint and (type(defaultPoint) == "string") and (defaultPoint ~= 'TBD')) then - local anchor1, parent, anchor2, x, y = split("\031", defaultPoint) - self:ClearAllPoints() - self:SetPoint(anchor1, parent, anchor2, x, y) - self.CanUpdate = false; - end +local _hook_UIParent_ManageFramePositions = function() + for frameName, point in pairs(Dragger.Frames) do + local data = UIPanels[frameName] + if(data and (not data.snapped)) then + SetDraggablePoint(_G[frameName], data) end end end -function Dragger:EventHandler(event, ...) +local DraggerEventHandler = function(self, event, ...) if(InCombatLockdown()) then return end local noMoreChanges = true; + local allCentered = SV.db.general.multiMonitor for frameName, data in pairs(UIPanels) do - if((not self.Frames[frameName]) or (self.Frames[frameName] and (self.Frames[frameName] == "TBD"))) then + if(not self.Frames[frameName] or (self.Frames[frameName] and type(self.Frames[frameName]) ~= 'string')) then + self.Frames[frameName] = 'TBD' + noMoreChanges = false; + end + if(not data.initialized) then local frame = _G[frameName] if(frame) then frame:EnableMouse(true) @@ -314,21 +234,33 @@ function Dragger:EventHandler(event, ...) frame:SetMovable(true) frame:RegisterForDrag("LeftButton") frame:SetClampedToScreen(true) - frame:HookScript("OnUpdate", DraggerFrame_OnUpdate) - frame:HookScript("OnShow", DraggerFrame_OnShow) - frame:SetScript("OnDragStart", DraggerFrame_OnDragStart) - frame:SetScript("OnDragStop", DraggerFrame_OnDragStop) - if(self.CenterEverything) then + if(allCentered) then frame:ClearAllPoints() frame:SetPoint('TOP', SV.Screen, 'TOP', 0, -180) + data.centered = true + end + + if(self.Frames[frameName] == 'TBD') then + SaveCurrentPosition(frame); end - self.Frames[frameName] = CurrentPosition(frame) - else - self.Frames[frameName] = 'TBD' + data.canupdate = true + + frame:SetScript("OnDragStart", DraggerFrame_OnDragStart) + frame:SetScript("OnDragStop", DraggerFrame_OnDragStop) + + frame:HookScript("OnUpdate", _hook_DraggerFrame_OnUpdate) + hooksecurefunc(frame, "SetPoint", _hook_DraggerFrame_OnSetPoint) + + if(SV.db.general.saveDraggable) then + frame:HookScript("OnShow", _hook_DraggerFrame_OnShow) + frame:HookScript("OnHide", _hook_DraggerFrame_OnHide) + end + + data.initialized = true end - noMoreChanges = false; + noMoreChanges = false; end end @@ -346,18 +278,86 @@ function Dragger:EventHandler(event, ...) end --[[ ########################################################## -Initialize +CORE FUNCTIONS +########################################################## +]]-- +function Dragger:New(frameName) + if(not UIPanels[frameName]) then + UIPanels[frameName] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; + if(not self.EventsActive) then + self:RegisterEvent("ADDON_LOADED") + self:RegisterEvent("LFG_UPDATE") + self:RegisterEvent("ROLE_POLL_BEGIN") + self:RegisterEvent("READY_CHECK") + self:RegisterEvent("UPDATE_WORLD_STATES") + self:RegisterEvent("WORLD_STATE_TIMER_START") + self:RegisterEvent("WORLD_STATE_UI_TIMER_UPDATE") + self:SetScript("OnEvent", DraggerEventHandler) + self.EventsActive = true; + end + end +end + +function Dragger:SetPositions() + for frameName, point in pairs(Dragger.Frames) do + local data = UIPanels[frameName] + if(data and (not data.snapped)) then + SetDraggablePoint(_G[frameName], point, data) + end + end +end + +function Dragger:Reset() + if(SV.db.general.saveDraggable) then + for frameName, data in pairs(UIPanels) do + if(SV.cache.Draggables[frameName]) then + SV.cache.Draggables[frameName] = nil + end + data.initialized = nil + end + self.Frames = SV.cache.Draggables + else + for frameName, data in pairs(UIPanels) do + if(self.Frames[frameName]) then + self.Frames[frameName] = nil + end + data.initialized = nil + end + end + + if(not self.EventsActive) then + self:RegisterEvent("ADDON_LOADED") + self:RegisterEvent("LFG_UPDATE") + self:RegisterEvent("ROLE_POLL_BEGIN") + self:RegisterEvent("READY_CHECK") + self:RegisterEvent("UPDATE_WORLD_STATES") + self:RegisterEvent("WORLD_STATE_TIMER_START") + self:RegisterEvent("WORLD_STATE_UI_TIMER_UPDATE") + self:SetScript("OnEvent", DraggerEventHandler) + self.EventsActive = true; + end + + ReloadUI() +end +--[[ +########################################################## +INITIALIZE ########################################################## ]]-- function Dragger:Initialize() - SV.cache.UIPanels = SV.cache.UIPanels or {} + if(SV.db.general.saveDraggable) then + SV.cache.Draggables = SV.cache.Draggables or {} + self.Frames = SV.cache.Draggables + else + SV.cache.Draggables = {} + self.Frames = {} + end if(not SV.db.general.questWatch) then - UIPanels["ObjectiveTrackerFrame"] = { point = 'TBD', snap = false, centered = false }; + UIPanels["ObjectiveTrackerFrame"] = { moving = false, snapped = false, canupdate = false, cansetpoint = false, centered = false }; end self.EventsActive = true - self.CenterEverything = SV.db.general.multiMonitor self:RegisterEvent("ADDON_LOADED") self:RegisterEvent("LFG_UPDATE") @@ -367,17 +367,12 @@ function Dragger:Initialize() self:RegisterEvent("WORLD_STATE_TIMER_START") self:RegisterEvent("WORLD_STATE_UI_TIMER_UPDATE") - self:EventHandler() - self:SetScript("OnEvent", self.EventHandler) + DraggerEventHandler(self) + self:SetScript("OnEvent", DraggerEventHandler) if(SV.db.general.saveDraggable) then - for frameName, data in pairs(UIPanels) do - data.saved = true - end - self:SetPositions() + hooksecurefunc("UIParent_ManageFramePositions", _hook_UIParent_ManageFramePositions) end - - hooksecurefunc("UIParent_ManageFramePositions", Dragger.SetPositions) end SV.Dragger = Dragger \ No newline at end of file diff --git a/Interface/AddOns/SVUI/framework/movers/mover_mentalo.lua b/Interface/AddOns/SVUI/framework/movers/mover_mentalo.lua index a2ecc02..74796a0 100644 --- a/Interface/AddOns/SVUI/framework/movers/mover_mentalo.lua +++ b/Interface/AddOns/SVUI/framework/movers/mover_mentalo.lua @@ -804,6 +804,8 @@ Initialize ########################################################## ]]-- function Mentalo:Initialize() + SV.cache.Anchors = SV.cache.Anchors or {} + SVUI_Mentalo:SetFixedPanelTemplate("Component") SVUI_Mentalo:SetPanelColor("yellow") SVUI_Mentalo:RegisterForDrag("LeftButton") @@ -828,8 +830,6 @@ function Mentalo:Initialize() SVUI_MentaloPrecisionDownButton:SetButtonTemplate() SVUI_MentaloPrecisionLeftButton:SetButtonTemplate() SVUI_MentaloPrecisionRightButton:SetButtonTemplate() - - SV.cache.Anchors = SV.cache.Anchors or {} self:SetPositions() diff --git a/Interface/AddOns/SVUI/packages/_load.xml b/Interface/AddOns/SVUI/packages/_load.xml index e4cc54e..c8f5432 100644 --- a/Interface/AddOns/SVUI/packages/_load.xml +++ b/Interface/AddOns/SVUI/packages/_load.xml @@ -13,4 +13,5 @@ <Script file="gear\SVGear.lua"/> <Script file="henchmen\SVHenchmen.lua"/> <Include file="tools\SVTools.xml"/> + <!-- <Include file="quest\SVQuest.xml"/> --> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/chat/SVChat.lua b/Interface/AddOns/SVUI/packages/chat/SVChat.lua index 7ffa5cc..c9f9c49 100644 --- a/Interface/AddOns/SVUI/packages/chat/SVChat.lua +++ b/Interface/AddOns/SVUI/packages/chat/SVChat.lua @@ -357,6 +357,7 @@ do local TabsList = {}; local TabSafety = {}; local refreshLocked = false; + local doskey = false; local SVUI_OnHyperlinkShow = function(self, link, ...) if(link:sub(1, 3) == "url") then @@ -435,6 +436,20 @@ do end end + local EditBox_OnKeyUp = function(self, button) + if(not button) then return end + if(doskey) then + if(button == KEY_LEFT) then + self:SetCursorPosition(0) + elseif(button == KEY_RIGHT) then + self:SetCursorPosition(self:GetNumLetters()) + end + doskey = false + elseif((button == KEY_UP) or (button == KEY_DOWN)) then + doskey = true + end + end + local EditBox_OnEditFocusGained = function(self) self:Show() if not MOD.Dock.Parent:IsShown()then @@ -453,46 +468,53 @@ do end self:Hide() MOD.Dock.Parent.Alert:Deactivate() + doskey = false end local EditBox_OnTextChanged = function(self) local text = self:GetText() - if InCombatLockdown()then + if(InCombatLockdown()) then local max = 5; - if len(text) > max then + if(len(text) > max) then local testText = true; for i = 1, max, 1 do - if sub(text, 0 - i, 0 - i) ~= sub(text, -1 - i, -1 - i) then + if(sub(text, 0 - i, 0 - i) ~= sub(text, -1 - i, -1 - i)) then testText = false; break end end - if testText then + if(testText) then self:Hide() return end end - end - if text:len() < 5 then - if text:sub(1, 4) == "/tt " then + end + + if(text:len() < 5) then + if(text:sub(1, 4) == "/tt ") then local name, realm = UnitName("target") - if name then + if(name) then name = gsub(name, " ", "") - end - if name and not UnitIsSameServer("player", "target") then - name = name.."-"..gsub(realm, " ", "") - end - ChatFrame_SendTell(name or L["Invalid Target"], ChatFrame1) + if(name and (not UnitIsSameServer("player", "target"))) then + name = name.."-"..gsub(realm, " ", "") + end + else + name = L["Invalid Target"] + end + ChatFrame_SendTell(name, ChatFrame1) end - if text:sub(1, 4) == "/gr " then + if(text:sub(1, 4) == "/gr ") then self:SetText(MOD:GetGroupDistribution()..text:sub(5)) ChatEdit_ParseText(self, 0) + doskey = false end - end + end + local result, ct = text:gsub("|Kf(%S+)|k(%S+)%s(%S+)|k", "%2 %3") - if ct > 0 then + if(ct > 0) then result = result:gsub("|", "") self:SetText(result) + doskey = false end end @@ -662,16 +684,18 @@ do editBox:HookScript("OnEditFocusGained", EditBox_OnEditFocusGained) editBox:HookScript("OnEditFocusLost", EditBox_OnEditFocusLost) editBox:HookScript("OnTextChanged", EditBox_OnTextChanged) + editBox:HookScript("OnKeyUp", EditBox_OnKeyUp) ------------------------------------------- chat:SetTimeVisible(100) chat:SetFading(CHAT_FADING) chat:SetScript("OnHyperlinkClick", SVUI_OnHyperlinkShow) - local alertSize = (MOD.Dock.Bar:GetHeight()) * 2; + local alertSize = MOD.Dock.Bar:GetHeight(); + local alertOffset = alertSize * 0.25 local alert = CreateFrame("Frame", nil, tab) alert:SetSize(alertSize, alertSize) alert:SetFrameStrata("DIALOG") - alert:SetPoint("CENTER", tab, "TOP", 0, 0) + alert:SetPoint("TOPRIGHT", tab, "TOPRIGHT", alertOffset, alertOffset) local alticon = alert:CreateTexture(nil, "OVERLAY") alticon:SetAllPoints(alert) alticon:SetTexture(WHISPER_ALERT) diff --git a/Interface/AddOns/SVUI/packages/tools/components/questwatch.lua b/Interface/AddOns/SVUI/packages/tools/components/questwatch.lua index 7edcca8..6dc636d 100644 --- a/Interface/AddOns/SVUI/packages/tools/components/questwatch.lua +++ b/Interface/AddOns/SVUI/packages/tools/components/questwatch.lua @@ -130,7 +130,7 @@ function MOD:LoadQuestWatch() scrollFrame:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob"); scrollFrame:SetOrientation("VERTICAL"); scrollFrame:SetValueStep(5); - scrollFrame:SetMinMaxValues(1, 420); + scrollFrame:SetMinMaxValues(1, 1420); scrollFrame:SetValue(1); scrollFrame:SetScript("OnValueChanged", function(self, argValue) listFrame:SetVerticalScroll(argValue) @@ -152,14 +152,14 @@ function MOD:LoadQuestWatch() ObjectiveTrackerFrame:ClearAllPoints() ObjectiveTrackerFrame:SetClampedToScreen(false) - ObjectiveTrackerFrame:SetHeight(500) + ObjectiveTrackerFrame:SetHeight(1500) ObjectiveTrackerFrame:SetWidth(WIDTH) - ObjectiveTrackerFrame:SetPoint("TOPRIGHT", listFrame, "TOPRIGHT", -31, 0) + ObjectiveTrackerFrame:SetPoint("TOPRIGHT", listFrame, "TOPRIGHT", -2, 0) ObjectiveTrackerFrame:SetFrameLevel(listFrame:GetFrameLevel() + 1) hooksecurefunc(ObjectiveTrackerFrame, "SetPoint", function(self, a1, p, a2, x, y) if(p ~= SVUI_QuestWatchFrameScrollFrame) then - self:SetPoint("TOPRIGHT", SVUI_QuestWatchFrameScrollFrame, "TOPRIGHT", -31, 0) + self:SetPoint("TOPRIGHT", SVUI_QuestWatchFrameScrollFrame, "TOPRIGHT", -2, 0) end end) --ObjectiveTrackerFrame.SetPoint = function() return end; diff --git a/Interface/AddOns/SVUI/scripts/sounds.lua b/Interface/AddOns/SVUI/scripts/sounds.lua new file mode 100644 index 0000000..457f674 --- /dev/null +++ b/Interface/AddOns/SVUI/scripts/sounds.lua @@ -0,0 +1,34 @@ +--[[ + /$$ /$$ /$$ /$$ /$$ /$$ /$$$$$$ +| $$$ /$$$| $$ | $$| $$$ | $$ /$$__ $$ +| $$$$ /$$$$| $$ | $$| $$$$| $$| $$ \__/ +| $$ $$/$$ $$| $$ | $$| $$ $$ $$| $$ /$$$$ +| $$ $$$| $$| $$ | $$| $$ $$$$| $$|_ $$ +| $$\ $ | $$| $$ | $$| $$\ $$$| $$ \ $$ +| $$ \/ | $$| $$$$$$/| $$ \ $$| $$$$$$/ +|__/ |__/ \______/ |__/ \__/ \______/ + /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$$ +| $$$ /$$$ /$$__ $$| $$__ $$| $$_____/ +| $$$$ /$$$$| $$ \ $$| $$ \ $$| $$ +| $$ $$/$$ $$| $$$$$$$$| $$ | $$| $$$$$ +| $$ $$$| $$| $$__ $$| $$ | $$| $$__/ +| $$\ $ | $$| $$ | $$| $$ | $$| $$ +| $$ \/ | $$| $$ | $$| $$$$$$$/| $$$$$$$$ +|__/ |__/|__/ |__/|_______/ |________/ +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local ipairs = _G.ipairs; +local type = _G.type; +local tinsert = _G.tinsert; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format, gsub = string.format, string.gsub; + +--PlaySoundFile("sound\\vehicles\\veh_hordechopper_summon.ogg") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/setup/installer.lua b/Interface/AddOns/SVUI/setup/installer.lua index e28160b..155c6e4 100644 --- a/Interface/AddOns/SVUI/setup/installer.lua +++ b/Interface/AddOns/SVUI/setup/installer.lua @@ -52,7 +52,7 @@ LOCAL VARS local CURRENT_PAGE, MAX_PAGE, XOFF = 0, 9, (GetScreenWidth() * 0.025) local okToResetMOVE = false local mungs = false; -local user_music_vol; +local user_music_vol = GetCVar("Sound_MusicVolume") or 0; local musicIsPlaying; local PageData, OnClickData local SVUI_CLASS_COLORS = _G.SVUI_CLASS_COLORS @@ -587,14 +587,14 @@ function SV.Setup:EZDefault() self:Auralayout("default", true); SVLib:SaveSafeData("install_version", SV.Version) StopMusic() - SetCVar("Sound_MusicVolume", user_music_vol) + SetCVar("Sound_MusicVolume", user_music_vol or 0) ReloadUI() end function SV.Setup:Complete() SVLib:SaveSafeData("install_version", SV.Version) StopMusic() - SetCVar("Sound_MusicVolume", user_music_vol) + SetCVar("Sound_MusicVolume", user_music_vol or 0) okToResetMOVE = false; ReloadUI() end @@ -798,10 +798,6 @@ function SV.Setup:Reset() end function SV.Setup:Install(autoLoaded) - if(not user_music_vol) then - user_music_vol = GetCVar("Sound_MusicVolume") - end - local old = SVLib:GetSafeData() local media = old.mediastyle or "" local bars = old.barstyle or "" @@ -1161,7 +1157,7 @@ function SV.Setup:Install(autoLoaded) SVUI_InstallerFrame:SetScript("OnHide", function() StopMusic() - SetCVar("Sound_MusicVolume", user_music_vol) + SetCVar("Sound_MusicVolume", user_music_vol or 0) musicIsPlaying = nil; ShowLayout() ShowAuras() diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/ACP.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/ACP.lua index 43f80ff..271f1ec 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/addons/ACP.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/ACP.lua @@ -80,7 +80,9 @@ local function StyleACP() k.timeLapse = 0 k:SetScript("OnUpdate",cbResize) end - for c=1,20 do _G["ACP_AddonListEntry"..c.."Enabled"]:SetCheckboxTemplate(true)end + for c=1,20 do + _G["ACP_AddonListEntry"..c.."Enabled"]:SetCheckboxTemplate(true) + end ACP_AddonList_NoRecurse:SetCheckboxTemplate(true) PLUGIN:ApplyScrollFrameStyle(ACP_AddonList_ScrollFrameScrollBar) PLUGIN:ApplyDropdownStyle(ACP_AddonListSortDropDown) diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua index 5618868..a7ecacb 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua @@ -303,7 +303,7 @@ local function AchievementStyle() track:ClearAllPoints() track:Point("BOTTOMLEFT", 1, 1) track:RemoveTextures() - track:SetCheckboxTemplate(true, -3, -3) + track:SetCheckboxTemplate(true) track.ListParent = button end end diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua index ea70ce2..92adf04 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua @@ -76,8 +76,6 @@ local function StyleLootFrame(frame) if(not frame) then return end if(not frame.Panel) then - frame:SetAlpha(1) - frame.SetAlpha = AlphaBlock PLUGIN:ApplyItemAlertStyle(frame) if(frame.Background) then frame.Background:Die() end @@ -111,8 +109,6 @@ local function StyleUpgradeFrame(frame) if(not frame) then return end if(not frame.Panel) then - frame:SetAlpha(1) - frame.SetAlpha = AlphaBlock PLUGIN:ApplyItemAlertStyle(frame) frame.Background:Die() @@ -135,9 +131,7 @@ local function AchievementStyle() for i = 1, MAX_ACHIEVEMENT_ALERTS do local frameName = "AchievementAlertFrame"..i local frame = _G[frameName] - if(frame and (not frame.Panel)) then - frame:SetAlpha(1) - frame.SetAlpha = AlphaBlock + if(frame and (not frame.Panel)) then PLUGIN:ApplyItemAlertStyle(frame) @@ -165,8 +159,6 @@ local function DungeonCompletionStyle() local frameName = "DungeonCompletionAlertFrame1" local frame = _G[frameName] if(frame and (not frame.Panel)) then - frame:SetAlpha(1) - frame.SetAlpha = AlphaBlock PLUGIN:ApplyItemAlertStyle(frame) @@ -193,8 +185,6 @@ local function GuildChallengeStyle() local frameName = "GuildChallengeAlertFrame" local frame = _G[frameName]; if(frame and (not frame.Panel)) then - frame:SetAlpha(1) - frame.SetAlpha = AlphaBlock PLUGIN:ApplyItemAlertStyle(frame) @@ -219,8 +209,6 @@ local function ChallengeModeStyle() local frameName = "ChallengeModeAlertFrame1" local frame = _G[frameName]; if(frame and (not frame.Panel)) then - frame:SetAlpha(1) - frame.SetAlpha = AlphaBlock PLUGIN:ApplyItemAlertStyle(frame) @@ -247,8 +235,6 @@ local function ScenarioStyle() local frameName = "ScenarioAlertFrame1" local frame = _G[frameName]; if(frame and (not frame.Panel)) then - frame:SetAlpha(1) - frame.SetAlpha = AlphaBlock PLUGIN:ApplyItemAlertStyle(frame) @@ -274,9 +260,7 @@ local function CriteriaStyle() for i = 1, MAX_ACHIEVEMENT_ALERTS do local frameName = "CriteriaAlertFrame"..i local frame = _G[frameName] - if(frame and (not frame.Panel)) then - frame:SetAlpha(1) - frame.SetAlpha = AlphaBlock + if(frame and (not frame.Panel)) then PLUGIN:ApplyItemAlertStyle(frame) @@ -422,8 +406,6 @@ local function AlertStyle() frameName = "GarrisonMissionAlertFrame" frame = _G[frameName] if(frame and (not frame.Panel)) then - frame:SetAlpha(1) - frame.SetAlpha = AlphaBlock frame:DisableDrawLayer("BACKGROUND") PLUGIN:ApplyItemAlertStyle(frame) @@ -444,8 +426,6 @@ local function AlertStyle() frameName = "GarrisonBuildingAlertFrame" frame = _G[frameName] if(frame and (not frame.Panel)) then - frame:SetAlpha(1) - frame.SetAlpha = AlphaBlock frame:DisableDrawLayer("BACKGROUND") PLUGIN:ApplyItemAlertStyle(frame) @@ -465,8 +445,6 @@ local function AlertStyle() frame = _G[frameName] if(frame) then if(not frame.Panel) then - frame:SetAlpha(1) - frame.SetAlpha = AlphaBlock frame:DisableDrawLayer("BACKGROUND") PLUGIN:ApplyItemAlertStyle(frame) diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua index 4dd734e..ac7583b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua @@ -177,18 +177,18 @@ local function LFDFrameStyle() LFGDungeonReadyDialogRoleIconTexture:SetTexture("Interface\\LFGFrame\\UI-LFG-ICONS-ROLEBACKGROUNDS") LFGDungeonReadyDialogRoleIconTexture:SetAlpha(0.5) - hooksecurefunc("LFGDungeonReadyPopup_Update", function() - local b, c, d, e, f, g, h, i, j, k, l, m = GetLFGProposal() - if LFGDungeonReadyDialogRoleIcon:IsShown() then - if h == "DAMAGER" then - LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonDPS.background:GetTexCoord()) - elseif h == "TANK" then - LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonTank.background:GetTexCoord()) - elseif h == "HEALER" then - LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonHealer.background:GetTexCoord()) - end - end - end) + -- hooksecurefunc("LFGDungeonReadyPopup_Update", function() + -- local proposalExists, id, typeID, subtypeID, name, texture, role, hasResponded, totalEncounters, completedEncounters, numMembers, isLeader, isHoliday, proposalCategory = GetLFGProposal(); + -- if LFGDungeonReadyDialogRoleIcon:IsShown() then + -- if(role == "DAMAGER") then + -- LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonDPS.background:GetTexCoord()) + -- elseif(role == "TANK") then + -- LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonTank.background:GetTexCoord()) + -- elseif(role == "HEALER") then + -- LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonHealer.background:GetTexCoord()) + -- end + -- end + -- end) LFDQueueFrameRoleButtonTankIncentiveIcon:SetAlpha(0) LFDQueueFrameRoleButtonHealerIncentiveIcon:SetAlpha(0) @@ -208,7 +208,7 @@ local function LFDFrameStyle() for _,name in pairs(LFDFrameList) do local frame = _G[name]; - if frame then + if(frame) then frame:DisableDrawLayer("BACKGROUND") frame:DisableDrawLayer("OVERLAY") end @@ -228,7 +228,7 @@ local function LFDFrameStyle() hooksecurefunc('LFG_DisableRoleButton', function(self) local check = self.checkButton or self.CheckButton if(check) then - if check:GetChecked() then + if(check:GetChecked()) then check:SetAlpha(1) else check:SetAlpha(0)