diff --git a/SVUI_!Core/libs/_SVUI_Lib/Registry.lua b/SVUI_!Core/libs/_SVUI_Lib/Registry.lua index b961436..3164f0b 100644 --- a/SVUI_!Core/libs/_SVUI_Lib/Registry.lua +++ b/SVUI_!Core/libs/_SVUI_Lib/Registry.lua @@ -108,8 +108,8 @@ local debugPattern = '|cffFF2F00%s|r [|cff0affff%s|r]|cffFF2F00:|r @|cffFF0000(| local playerClass = select(2,UnitClass("player")); local playerRealm = GetRealmName(); local playerName = UnitName("player"); -local OLD_PROFILE_KEY = ("%s - Default"):format(playerName); -local DEFAULT_PROFILE_KEY = ("%s [%s] - Default"):format(playerName, playerRealm); +local DEFAULT_PROFILE_KEY = ("%s - Default"):format(playerName); +--local DEFAULT_PROFILE_KEY = ("%s [%s] - Default"):format(playerName, playerRealm); local PROFILE_KEY = DEFAULT_PROFILE_KEY; local DEFAULT_THEME_KEY = "Default"; local THEME_KEY = DEFAULT_THEME_KEY; @@ -548,10 +548,10 @@ local function UpdateProfileSources(newKey) if(specID) then local _, SOURCE_KEY, _, _, _, _ = GetSpecializationInfo(specID); if(not SOURCE_KEY) then SOURCE_KEY = "Default" end - PROFILE_KEY = ("%s [%s] - %s"):format(playerName, playerRealm, SOURCE_KEY) + --PROFILE_KEY = ("%s [%s] - %s"):format(playerName, playerRealm, SOURCE_KEY) + PROFILE_KEY = ("%s - %s"):format(playerName, SOURCE_KEY) PRIVATE_SV.SAFEDATA.CurrentProfile = PROFILE_KEY - local oldKey = ("%s - %s"):format(playerName, SOURCE_KEY) - CheckForDeprecated(oldKey) + --CheckForDeprecated(("%s - %s"):format(playerName, SOURCE_KEY)) elseif(newKey) then PROFILE_KEY = newKey PRIVATE_SV.SAFEDATA.CurrentProfile = newKey @@ -677,7 +677,7 @@ local function CorePreInitialize() if(not MEDIA_SV.profiles[THEME_KEY]) then MEDIA_SV.profiles[THEME_KEY] = {} end if(not MEDIA_SV.profiles[THEME_KEY][PROFILE_KEY]) then MEDIA_SV.profiles[THEME_KEY][PROFILE_KEY] = {} end - CheckForDeprecated(OLD_PROFILE_KEY); + --CheckForDeprecated(OLD_PROFILE_KEY); THEME_KEY = PRIVATE_SV.SAFEDATA.THEME; @@ -758,14 +758,14 @@ end local Library_OnEvent = function(self, event, arg, ...) if(event == "PLAYER_LOGOUT") then - local key = PRIVATE_SV.SAFEDATA.CurrentProfile - if(key) then - local export, saved - if(not GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = {} end; - export = rawget(CoreObject.db, "data"); - saved = GLOBAL_SV.profiles[key]; - tablecopy(saved, export); - end + -- local key = PRIVATE_SV.SAFEDATA.CurrentProfile + -- if(key) then + -- local export, saved + -- if(not GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = {} end; + -- export = rawget(CoreObject.db, "data"); + -- saved = GLOBAL_SV.profiles[key]; + -- tablecopy(saved, export); + -- end lib:CleanUpData() elseif(event == "ADDON_LOADED") then if(arg == CoreName) then diff --git a/SVUI_!Core/system/automations.lua b/SVUI_!Core/system/automations.lua index 47c8a14..28a32c5 100644 --- a/SVUI_!Core/system/automations.lua +++ b/SVUI_!Core/system/automations.lua @@ -275,7 +275,7 @@ QUEST AUTOMATONS ]]-- function SV:AutoQuestProxy() if(IsShiftKeyDown()) then return false; end - if((not QuestIsDaily() or not QuestIsWeekly()) and (self.db.Extras.autodailyquests)) then return false; end + if(((not QuestIsDaily()) or (not QuestIsWeekly())) and (self.db.Extras.autodailyquests)) then return false; end if(QuestFlagsPVP() and (not self.db.Extras.autopvpquests)) then return false; end return true end @@ -285,21 +285,31 @@ function SV:QUEST_GREETING() local active,available = GetNumActiveQuests(), GetNumAvailableQuests() if(active + available == 0) then return end if(available > 0) then - SelectAvailableQuest(1) + for i = 1, available do + SelectAvailableQuest(i) + end end if(active > 0) then - SelectActiveQuest(1) + for i = 1, active do + SelectActiveQuest(i) + end end end end function SV:GOSSIP_SHOW() if(self.db.Extras.autoquestaccept == true and self:AutoQuestProxy()) then - if GetGossipAvailableQuests() then - SelectGossipAvailableQuest(1) - elseif GetGossipActiveQuests() then - SelectGossipActiveQuest(1) - end + for i=1, select("#", GetGossipAvailableQuests()), 6 do + SelectGossipAvailableQuest(i) + end + for i=1, select("#", GetGossipActiveQuests()), 6 do + SelectGossipActiveQuest(i) + end + -- if GetGossipAvailableQuests() then + -- SelectGossipAvailableQuest(1) + -- elseif GetGossipActiveQuests() then + -- SelectGossipActiveQuest(1) + -- end end end diff --git a/SVUI_!Core/system/debug.lua b/SVUI_!Core/system/debug.lua index 48562c6..3f47d80 100644 --- a/SVUI_!Core/system/debug.lua +++ b/SVUI_!Core/system/debug.lua @@ -206,7 +206,7 @@ _G.DebugThisFrame = function(arg) outputString = outputString.."|cff00D1FF".."Alpha: |cffFFD100"..arg:GetAlpha().."\n" end - if(arg.GetText) then + if(arg.GetText and arg:GetText()) then outputString = outputString.."|cff00D1FF".."Text: |cffFFD100"..arg:GetText().."\n" local tr, tg, tb = arg:GetTextColor(); outputString = outputString.."|cff00D1FF".."Text Color: \n" diff --git a/SVUI_!Core/system/dock.lua b/SVUI_!Core/system/dock.lua index 47410ca..d409bcf 100644 --- a/SVUI_!Core/system/dock.lua +++ b/SVUI_!Core/system/dock.lua @@ -53,6 +53,10 @@ MOD.Border = {}; LOCALS ########################################################## ]]-- +-- SV.SpecialFX:Register("dragging_highlight", [[Spells\Warlock_bodyofflames_medium_state_shoulder_right_purple.m2]], -20, 50, 20, -50, 0.35, 0, 0.5) +SV.SpecialFX:Register("dragging_highlight_top", [[Spells\Creature_spellportal_blue_clickable.m2]], 0, 0, 0, -80, 0.8, 0, 2.5) +SV.SpecialFX:Register("dragging_highlight_bottom", [[Spells\Creature_spellportal_blue_clickable.m2]], 0, 80, 0, 0, 0.9, 0, -0.25) + local DOCK_CHECK; local ORDER_TEMP, ORDER_TEST, DOCK_REGISTRY, DOCK_DROPDOWN_OPTIONS = {}, {}, {}, {}; local DOCK_LOCATIONS = { @@ -173,39 +177,84 @@ end local function SaveCurrentPosition(button) if((not button) or (not MOD.private.Floating)) then return end - local name = button:GetName(); local anchor1, parent, anchor2, x, y = button:GetPoint(); - if((not anchor1) or (not anchor2) or (not x) or (not y)) then - result = "TBD"; - end - local parentName; - if(not parent or (parent and (not parent:GetName()))) then - parentName = "UIParent" - else - parentName = parent:GetName() + if(anchor1 and anchor2 and x and y) then + local parentName; + if(not parent or (not parent.GetName) or (not parent:GetName())) then + parentName = "UIParent" + else + parentName = parent:GetName() + end + + local name = button:GetName(); + local width, height = 0,0; + if(button.FrameLink) then + local frame = button.FrameLink; + frame:ClearAllPoints(); + frame:SetPoint("BOTTOMLEFT", button, "TOPLEFT", -3, 6); + if(frame.UpdateBackdrop) then + frame:UpdateBackdrop() + end + local saved = MOD.private.Floating[name]; + local currentWidth, currentHeight = frame:GetSize(); + if(saved) then + local _, _, _, _, _, w, h = split("|", saved); + width, height = w, h + if((currentWidth ~= w) or (currentHeight ~= h)) then + frame:SetSize(w, h) + end + else + width, height = currentWidth, currentHeight; + end + if((not width) or (not height)) then + width, height = 0,0; + end + end + local result = ("%s|%s|%s|%d|%d|%d|%d"):format(anchor1, parentName, anchor2, parsefloat(x), parsefloat(y), parsefloat(width), parsefloat(height)) + MOD.private.Floating[name] = result; end +end + +local function SaveCurrentDimensions(button) + if((not button) or (not MOD.private.Floating)) then return end if(button.FrameLink) then - local width, height = button:GetSize() + local name = button:GetName(); + local saved = MOD.private.Floating[name]; + local anchor1, parent, anchor2, x, y, width, height; + if(saved) then + anchor1, parent, anchor2, x, y = split("|", saved); + else + anchor1, parent, anchor2, x, y = button:GetPoint(); + end + local frame = button.FrameLink; + width, height = frame:GetSize() if((not width) or (not height)) then + -- print(frame:GetSize()) width, height = 0, 0 end - result = ("%s|%s|%s|%d|%d|%d|%d"):format(anchor1, parentName, anchor2, parsefloat(x), parsefloat(y), parsefloat(width), parsefloat(height)) + local parentName; + if(not parent or (not parent.GetName) or (not parent:GetName())) then + parentName = "UIParent" + else + parentName = parent:GetName() + end + local result = ("%s|%s|%s|%d|%d|%d|%d"):format(anchor1, parentName, anchor2, parsefloat(x), parsefloat(y), parsefloat(width), parsefloat(height)) + frame:ClearAllPoints(); + frame:SetPoint("BOTTOMLEFT", button, "TOPLEFT", -3, 6); if(frame.UpdateBackdrop) then frame:UpdateBackdrop() end - else - result = ("%s|%s|%s|%d|%d|%d|%d"):format(anchor1, parentName, anchor2, parsefloat(x), parsefloat(y), 0, 0) + MOD.private.Floating[name] = result; end - - MOD.private.Floating[name] = result; end local function LoadSavedPosition(button) if((not button) or (not MOD.private.Floating)) then return end local name = button:GetName(); local saved = MOD.private.Floating[name]; + --print(name .. ' loading...') if(saved and (type(saved) == "string") and (saved ~= 'TBD')) then local anchor1, anchorParent, anchor2, xPos, yPos, width, height = split("|", saved) button:ClearAllPoints() @@ -214,9 +263,10 @@ local function LoadSavedPosition(button) local frame = button.FrameLink; frame:ClearAllPoints(); frame:SetPoint("BOTTOMLEFT", button, "TOPLEFT", -3, 6); - if(width and height) then - frame:SetSize(width, height) + if((not width) or (not height)) then + width, height = frame:GetSize() end + frame:SetSize(width, height) if(frame.UpdateBackdrop) then frame:UpdateBackdrop() end @@ -238,6 +288,20 @@ local function ScreenBorderVisibility() end end +local function CreateDivider(parent, index) + local size = parent.ToolBar:GetHeight(); + local frame = CreateFrame("Frame", nil, parent); + frame:SetSize(1,size); + frame:SetStyle("!_Frame", "Transparent") + frame:SetBackdropColor(0, 0.5, 1) + frame:SetBackdropBorderColor(0, 1, 1) + frame:SetAlpha(0) + frame.activeWidth = 1; + frame.OrderIndex = index; + parent.Dividers[index] = frame; + return frame; +end + local function SetBasicBackdrop(frame) local backdrop = CreateFrame("Frame", nil, frame) backdrop:SetAllPoints(frame) @@ -245,7 +309,7 @@ local function SetBasicBackdrop(frame) local underlay = backdrop:CreateTexture(nil, "BORDER") underlay:InsetPoints(backdrop) - underlay:SetTexture(0, 0, 0, 1) + underlay:SetTexture(0, 0, 0, 0.5) local left = backdrop:CreateTexture(nil, "OVERLAY") left:SetTexture(0, 0, 0, 1) @@ -275,11 +339,11 @@ local function SetBasicBackdrop(frame) end local UpdateBackdrop = function(self) - local centerX, centerY = self:GetCenter() - local screenHeight = GetScreenHeight() - local heightTop = screenHeight * 0.75; - if(centerY and (centerY > heightTop)) then - self.backdrop.underlay:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 0.8) + local centerX, centerY = self:GetCenter() + local screenHeight = GetScreenHeight() + local heightTop = screenHeight * 0.75; + if(centerY and (centerY > heightTop)) then + self.backdrop.underlay:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 0.8) self.backdrop.left:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 1) self.backdrop.right:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 1) self.backdrop.bottom:SetTexture(0, 0, 0, 0) @@ -288,7 +352,7 @@ local UpdateBackdrop = function(self) self.backdrop.top:SetTexture(0, 0, 0, 1) self.backdrop.top:SetAlpha(1) self.backdrop.top:SetHeight(2) - else + else self.backdrop.underlay:SetGradientAlpha("VERTICAL", 0, 0, 0, 0.8, 0, 0, 0, 0) self.backdrop.left:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, 0, 0, 0, 0) self.backdrop.right:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, 0, 0, 0, 0) @@ -298,77 +362,52 @@ local UpdateBackdrop = function(self) self.backdrop.top:SetTexture(0, 0, 0, 0) self.backdrop.top:SetAlpha(0) self.backdrop.top:SetHeight(1) - end + end end -function MOD.SetThemedBackdrop(frame, isBottom) +function MOD.SetThemedBackdrop(frame) + local frameLevel = frame:GetFrameLevel() local backdrop = CreateFrame("Frame", nil, frame) backdrop:SetAllPoints(frame) backdrop:SetFrameStrata("BACKGROUND") - local underlay = backdrop:CreateTexture(nil, "BORDER") - underlay:InsetPoints(backdrop) - underlay:SetTexture(1, 1, 1, 1) - - if(isBottom) then - underlay:SetGradientAlpha("VERTICAL", 0, 0, 0, 0.8, 0, 0, 0, 0) + if(frameLevel > 0) then + backdrop:SetFrameLevel(frameLevel - 1) else - underlay:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 0.8) + backdrop:SetFrameLevel(0) end + local underlay = backdrop:CreateTexture(nil, "BACKGROUND") + underlay:InsetPoints(backdrop) + underlay:SetTexture(1, 1, 1, 1) + backdrop.underlay = underlay; - local left = backdrop:CreateTexture(nil, "OVERLAY") + local left = backdrop:CreateTexture(nil, "BORDER") left:SetTexture(1, 1, 1, 1) left:SetPoint("TOPLEFT", 1, -1) left:SetPoint("BOTTOMLEFT", -1, -1) left:SetWidth(2) - if(isBottom) then - left:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, 0, 0, 0, 0) - else - left:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 1) - end backdrop.left = left; - local right = backdrop:CreateTexture(nil, "OVERLAY") + local right = backdrop:CreateTexture(nil, "BORDER") right:SetTexture(1, 1, 1, 1) right:SetPoint("TOPRIGHT", -1, -1) right:SetPoint("BOTTOMRIGHT", -1, -1) right:SetWidth(2) - if(isBottom) then - right:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, 0, 0, 0, 0) - else - right:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 1) - end backdrop.right = right; - local bottom = backdrop:CreateTexture(nil, "OVERLAY") + local bottom = backdrop:CreateTexture(nil, "BORDER") bottom:SetPoint("BOTTOMLEFT", 1, -1) bottom:SetPoint("BOTTOMRIGHT", -1, -1) - if(isBottom) then - bottom:SetTexture(0, 0, 0, 1) - bottom:SetHeight(2) - else - bottom:SetTexture(0, 0, 0, 0) - bottom:SetAlpha(0) - bottom:SetHeight(1) - end backdrop.bottom = bottom; - local top = backdrop:CreateTexture(nil, "OVERLAY") + local top = backdrop:CreateTexture(nil, "BORDER") top:SetPoint("TOPLEFT", 1, -1) top:SetPoint("TOPRIGHT", -1, 1) - if(isBottom) then - top:SetTexture(0, 0, 0, 0) - top:SetAlpha(0) - top:SetHeight(1) - else - top:SetTexture(0, 0, 0, 1) - top:SetHeight(2) - end backdrop.top = top; @@ -581,6 +620,56 @@ end DRAGGING HIGHLIGHT FUNCTIONS ########################################################## ]]-- +local function UpdateDividers(self) + local location = self.Data.Location; + local anchor = upper(location); + local mod = self.Data.Modifier + local size = self.ToolBar:GetHeight(); + local orderList = self.Data.Order; + local buttonList = self.Data.Buttons; + local count = #orderList; + local offset = 2; + local afterTarget = false; + + if(count > 0) then + for i = 1, count do + local nextButton = buttonList[orderList[i]]; + if(nextButton) then + local modW = nextButton.widthMultiplier or 1; + local calcWidth = size * modW + if(not nextButton:IsDragging()) then + if(afterTarget) then + nextButton:ClearAllPoints(); + nextButton:SetSize(calcWidth, size); + nextButton:SetPoint(anchor, self.ToolBar, anchor, (offset * mod), 0); + offset = offset + (calcWidth + 2); + + local safeIndex = nextButton.OrderIndex; + local divider = self.Dividers[safeIndex] or CreateDivider(self, safeIndex); + divider:SetPoint(anchor, self.ToolBar, anchor, (offset * mod), 0); + offset = offset + (divider:GetWidth() + 2); + else + local safeIndex = nextButton.OrderIndex; + local divider = self.Dividers[safeIndex] or CreateDivider(self, safeIndex); + divider:SetPoint(anchor, self.ToolBar, anchor, (offset * mod), 0); + offset = offset + (divider:GetWidth() + 2); + + nextButton:ClearAllPoints(); + nextButton:SetSize(calcWidth, size); + nextButton:SetPoint(anchor, self.ToolBar, anchor, (offset * mod), 0); + offset = offset + (calcWidth + 2); + end + else + afterTarget = true; + offset = offset + (calcWidth + 2); + end + end + end + end +end + +local DRAG_ORDERINDEX; + local HighLight_OnUpdate = function(self) local highlight = self.Highlight; if(not highlight) then @@ -589,6 +678,30 @@ local HighLight_OnUpdate = function(self) end if(highlight:IsMouseOver(50, -50, -50, 50)) then highlight:SetAlpha(1) + local targeted = false; + for i = 1, #self.Data.Order do + local divider = self.Dividers[i] + if(divider) then + + if(divider:IsMouseOver(15, -10, -15, 10)) then + highlight:SetAlpha(0.5) + if((not divider.placeHolder) and (divider:GetAlpha() > 0)) then + DRAG_ORDERINDEX = i + else + divider:SetAlpha(1) + divider:SetWidth(divider.activeWidth) + end + elseif(divider.placeHolder) then + divider:SetAlpha(1) + divider:SetWidth(divider.activeWidth) + else + divider:SetAlpha(0) + divider:SetWidth(1) + end + end + end + --print(DRAG_ORDERINDEX) + UpdateDividers(self) else highlight:SetAlpha(0.2) end @@ -599,24 +712,56 @@ local function GetDragToTarget() local dock = MOD[location]; local dockbar = dock.Bar; if(dockbar and (dockbar.Highlight:IsMouseOver(50, -50, -50, 50))) then - return dockbar.Data.Location; + local newLocation = dockbar.Data.Location; + local newOrder = DRAG_ORDERINDEX; + --print(newLocation) + --print(newOrder) + DRAG_ORDERINDEX = nil + return newLocation, newOrder; end end end -local function ToggleBarHighlights(isShown) +local function ToggleBarHighlights(button) for location, settings in pairs(DOCK_LOCATIONS) do local dock = MOD[location]; local dockbar = dock.Bar; if(dockbar) then - if(isShown) then + if(button) then + local index = button.OrderIndex; dockbar.Highlight:Show() dockbar.Highlight:SetAlpha(0.2) dockbar:SetScript("OnUpdate", HighLight_OnUpdate) + for i = 1, #dockbar.Data.Order do + if(dockbar.Dividers[i]) then + dockbar.Dividers[i].activeWidth = button:GetWidth() + dockbar.Dividers[i]:SetAlpha(0) + dockbar.Dividers[i]:SetWidth(1) + if(i == index) then + dockbar.Dividers[i].placeHolder = true; + dockbar.Dividers[i]:SetBackdropColor(0, 0, 0, 0.5) + dockbar.Dividers[i]:SetBackdropBorderColor(0, 0, 0, 0.5) + else + dockbar.Dividers[i].placeHolder = nil; + dockbar.Dividers[i]:SetBackdropColor(0, 0.5, 1, 1) + dockbar.Dividers[i]:SetBackdropBorderColor(0, 1, 1, 1) + end + end + end else dockbar.Highlight:Hide() dockbar.Highlight:SetAlpha(0) dockbar:SetScript("OnUpdate", nil) + for i = 1, #dockbar.Data.Order do + if(dockbar.Dividers[i]) then + dockbar.Dividers[i].activeWidth = 1 + dockbar.Dividers[i]:SetAlpha(0) + dockbar.Dividers[i]:SetWidth(1) + dockbar.Dividers[i].placeHolder = nil; + dockbar.Dividers[i]:SetBackdropColor(0, 0.5, 1, 1) + dockbar.Dividers[i]:SetBackdropBorderColor(0, 1, 1, 1) + end + end end end end @@ -654,14 +799,14 @@ end local function ShowDockletWindow(button, location) if((not button) or (not button.FrameLink)) then return end local window = button.FrameLink - if((not window) or (not window.SetFrameLevel)) then return end - if(not window:IsShown()) then - if(not InCombatLockdown()) then - window:SetFrameLevel(10) - window:Show() - end - end - window:FadeIn() + -- if((not window) or (not window.SetFrameLevel)) then return end + -- if(not window:IsShown()) then + -- if(not InCombatLockdown()) then + -- -- window:SetFrameLevel(10) + -- window:Show() + -- end + -- end + window:FadeIn(0.1, 0, 1) if(window.PostShowCallback) then window:PostShowCallback() else @@ -673,11 +818,7 @@ end local function HideDockletWindow(button, location) if((not button) or (not button.FrameLink)) then return end local window = button.FrameLink - if((not window) or (not window.SetFrameLevel)) then return end - if(not InCombatLockdown()) then - window:SetFrameLevel(0) - window:Hide() - end + -- if((not window) or (not window.SetFrameLevel)) then return end window:FadeOut(0.1, 1, 0, true) if(window.PostHideCallback) then window:PostHideCallback() @@ -706,14 +847,18 @@ end local function EnableDockletFloating(button) if(button and button.FrameLink and button.CanFloat) then - button.isFloating = true; - local location = "Floating"; - local name = button:GetName(); - MOD.private.Locations[name] = location; - button.FrameLink:ClearAllPoints(); - button.FrameLink:SetPoint("BOTTOMLEFT", button, "TOPLEFT", -3, 6); - button.FrameLink:SetResizable(true); - button.FrameLink.resize:Show(); + if(not button.isFloating) then + button.isFloating = true; + local location = "Floating"; + local name = button:GetName(); + MOD.private.Locations[name] = location; + button.FrameLink:ClearAllPoints(); + button.FrameLink:SetPoint("BOTTOMLEFT", button, "TOPLEFT", -3, 6); + button.FrameLink:SetResizable(true); + button.FrameLink.resize:Show(); + else + + end end end @@ -743,6 +888,19 @@ local function UpdateDockletFloating(button) end end +local function LoadFloatingDocklet(button) + if(button and button.FrameLink) then + local location = "Floating"; + button:Show(); + local name = button:GetName(); + MOD.private.Locations[name] = location; + LoadSavedPosition(button) + if(ShowDockletWindow(button, location)) then + ActivateDockletButton(button); + end + end +end + local DockBar_ResetAll = function(self) ResetAllDockletWindows(self); DeactivateAllDockletButtons(self); @@ -805,12 +963,14 @@ local DockBar_NextDefault = function(self) end local DockBar_ChangeOrder = function(self, button, targetIndex) + --print('DockBar_ChangeOrder') + local location = self.Data.Location; local targetName = button:GetName(); local currentIndex = button.OrderIndex; wipe(ORDER_TEST); wipe(ORDER_TEMP); - for i = 1, #self.Data.Order do - local nextName = self.Data.Order[i]; + for i = 1, #MOD.private.Order[location] do + local nextName = MOD.private.Order[location][i]; if(i == targetIndex) then if(currentIndex > targetIndex) then tinsert(ORDER_TEMP, targetName) @@ -824,83 +984,57 @@ local DockBar_ChangeOrder = function(self, button, targetIndex) end end - wipe(self.Data.Order); + wipe(MOD.private.Order[location]); local safeIndex = 1; for i = 1, #ORDER_TEMP do local nextName = ORDER_TEMP[i]; - local nextButton = self.Data.Buttons[nextName]; - if(nextButton and (not ORDER_TEST[nextName])) then - ORDER_TEST[nextName] = true - tinsert(self.Data.Order, nextName); - nextButton.OrderIndex = safeIndex; - safeIndex = safeIndex + 1; - end + MOD.private.Order[location][i] = nextName; end self:Update() end local DockBar_UpdateOrder = function(self) + --print('DockBar_UpdateOrder') wipe(ORDER_TEST); - wipe(ORDER_TEMP); - for i = 1, #self.Data.Order do - local nextName = self.Data.Order[i]; - tinsert(ORDER_TEMP, nextName) - end wipe(self.Data.Order); + local location = self.Data.Location; local safeIndex = 1; - for i = 1, #ORDER_TEMP do - local nextName = ORDER_TEMP[i]; + for i = 1, #MOD.private.Order[location] do + local nextName = MOD.private.Order[location][i]; local nextButton = self.Data.Buttons[nextName]; - if(nextButton and (not ORDER_TEST[nextName])) then - ORDER_TEST[nextName] = true - tinsert(self.Data.Order, nextName); - nextButton.OrderIndex = safeIndex; - safeIndex = safeIndex + 1; + if(nextButton) then + if(not ORDER_TEST[nextName]) then + ORDER_TEST[nextName] = true; + nextButton.OrderIndex = safeIndex; + self.Data.Order[safeIndex] = nextName; + safeIndex = safeIndex + 1; + end end end end local DockBar_CheckOrder = function(self, targetName) local found = false; - for i = 1, #self.Data.Order do - if(self.Data.Order[i] == targetName) then + local location = self.Data.Location; + for i = 1, #MOD.private.Order[location] do + if(MOD.private.Order[location][i] == targetName) then found = true; end end if(not found) then - tinsert(self.Data.Order, targetName); - DockBar_UpdateOrder(self); + tinsert(MOD.private.Order[location], targetName); end end -local reverseAnchors = { - TOP = "BOTTOM", - BOTTOM = "TOP", - LEFT = "RIGHT", - RIGHT = "LEFT", - TOPRIGHT = "TOPLEFT", - TOPLEFT = "TOPRIGHT", - BOTTOMRIGHT = "BOTTOMLEFT", - BOTTOMLEFT = "BOTTOMRIGHT", -} - -local function CreateDivider(parent, index) - local size = parent.ToolBar:GetHeight(); - local frame = CreateFrame("Frame", nil, parent); - frame:SetSize(1,size); - parent.Dividers[index] = frame; - return frame; -end - local DockBar_UpdateLayout = function(self) + DockBar_UpdateOrder(self); local location = self.Data.Location; local anchor = upper(location); - local reverse = reverseAnchors[anchor]; local mod = self.Data.Modifier local size = self.ToolBar:GetHeight(); local count = #self.Data.Order; - local offset = 6; + local offset = 2; local safeIndex = 1; if(count > 0) then @@ -908,16 +1042,19 @@ local DockBar_UpdateLayout = function(self) local nextName = self.Data.Order[i]; local nextButton = self.Data.Buttons[nextName]; if(nextButton) then - if(not nextButton.isFloating) then - local modW = nextButton.widthMultiplier or 1; - local calcWidth = size * modW - nextButton:ClearAllPoints(); - nextButton:SetSize(calcWidth, size); - nextButton:SetPoint(anchor, self.ToolBar, anchor, (offset * mod), 0); - local divider = self.Dividers[i] or CreateDivider(self, i); - divider:SetPoint(anchor, nextButton, reverse, 2, 0); - offset = offset + (calcWidth + 6); - end + local modW = nextButton.widthMultiplier or 1; + local calcWidth = size * modW + + local divider = self.Dividers[safeIndex] or CreateDivider(self, safeIndex); + divider:Show() + divider:SetPoint(anchor, self.ToolBar, anchor, (offset * mod), 0); + offset = offset + (divider:GetWidth() + 2); + + nextButton:ClearAllPoints(); + nextButton:SetSize(calcWidth, size); + nextButton:SetPoint(anchor, self.ToolBar, anchor, (offset * mod), 0); + offset = offset + (calcWidth + 2); + if(not nextButton:IsShown()) then nextButton:Show(); end @@ -927,6 +1064,11 @@ local DockBar_UpdateLayout = function(self) end end + for j = safeIndex, #self.Dividers do + local divider = self.Dividers[j]; + divider:Hide() + end + local defaultButton = MOD.private.Active[location]; if(not self.Data.Buttons[defaultButton]) then MOD.private.Active[location] = nil @@ -942,8 +1084,10 @@ local DockBar_AddButton = function(self, button, forced) local registeredLocation = MOD.private.Locations[name]; + if(registeredLocation == 'Floating') then return end; + if(registeredLocation) then - if((registeredLocation ~= currentLocation) and (registeredLocation ~= 'Floating')) then + if(registeredLocation ~= currentLocation) then if(MOD[registeredLocation].Bar.Data.Buttons[name]) then MOD[registeredLocation].Bar:Remove(button, true); else @@ -958,7 +1102,6 @@ local DockBar_AddButton = function(self, button, forced) MOD.private.Locations[name] = currentLocation; button.Parent = self; - DisableDockletFloating(button) button:SetParent(self.ToolBar); if(button.FrameLink) then @@ -994,6 +1137,7 @@ local DockBar_RemoveButton = function(self, button, isMoving) for i = 1, #self.Data.Order do local nextName = self.Data.Order[i]; if(nextName == name) then + --print('Removing #' .. i .. ' = ' .. nextName) tremove(self.Data.Order, i); break; end @@ -1032,9 +1176,10 @@ DOCKBUTTON FUNCTIONS ]]-- local DockButton_OnDragStart = function(self) if(IsShiftKeyDown() and (not InCombatLockdown())) then + GameTooltip:Hide() self:SetMovable(true); self:StartMoving(); - ToggleBarHighlights(true); + ToggleBarHighlights(self); if(self.CanFloat and (not self.isFloating)) then EnableDockletFloating(self) end @@ -1043,11 +1188,14 @@ end local DockButton_OnDragStop = function(self) self:StopMovingOrSizing(); - ToggleBarHighlights(false); - local target = GetDragToTarget() + ToggleBarHighlights(); + local target, order = GetDragToTarget() if(target) then self:SetMovable(false); self:MoveTo(target); + if(order) then + DockBar_ChangeOrder(self.Parent, self, order) + end elseif(self.isFloating) then UpdateDockletFloating(self) else @@ -1067,6 +1215,7 @@ local DockButton_DefaultTip = function(self, ...) end local DockButton_OnEnter = function(self, ...) + if(self:IsDragging()) then return end MOD:EnterFade() self:SetPanelColor("highlight") self.Icon:SetGradient(unpack(SV.media.gradient.highlight)) @@ -1077,14 +1226,14 @@ local DockButton_OnEnter = function(self, ...) self:GeneralTip() GameTooltip:AddLine(" ", 1, 1, 1) end - if(self.PostRightClick) then + if(self.PostRightClick or self.GetMenuList) then GameTooltip:AddDoubleLine("Right-Click", "Options", 0, 1, 0, 0.5, 1, 0.5) end GameTooltip:AddDoubleLine("|cff0099FFSHIFT|r + Drag", "Relocate", 0, 1, 0, 0.5, 1, 0.5) - if(self:GetAttribute("hasDropDown") and self.GetMenuList) then - GameTooltip:AddDoubleLine("|cff0099FFSHIFT|r + Right-Click", "Docking Menu", 0, 1, 0, 0.5, 1, 0.5) - end - GameTooltip:AddDoubleLine("|cff0099FFALT|r + Right-Click", "Hide", 0, 1, 0, 0.5, 1, 0.5) + -- if(self:GetAttribute("hasDropDown") and self.GetMenuList) then + -- GameTooltip:AddDoubleLine("|cff0099FFSHIFT|r + Right-Click", "Docking Menu", 0, 1, 0, 0.5, 1, 0.5) + -- end + GameTooltip:AddDoubleLine("|cff0099FFSHIFT|r + Right-Click", "Hide", 0, 1, 0, 0.5, 1, 0.5) GameTooltip:Show() end @@ -1105,7 +1254,7 @@ local DockButton_OnClick = function(self, button) end MOD.ButtonSound() if(button and (button == "RightButton")) then - if(IsAltKeyDown()) then + if(IsShiftKeyDown()) then self.ActiveDocklet = false; self:SetPanelColor("default") if(self.Icon) then @@ -1115,9 +1264,9 @@ local DockButton_OnClick = function(self, button) local registeredLocation = MOD.private.Locations[self.LocationKey]; HideDockletWindow(self, registeredLocation) end - elseif(IsShiftKeyDown() and (not InCombatLockdown()) and self:GetAttribute("hasDropDown") and self.GetMenuList) then + elseif((not InCombatLockdown()) and self:GetAttribute("hasDropDown") and self.GetMenuList) then local list = self:GetMenuList(); - SV.Dropdown:Open(self, list, "Dock Options"); + SV.Dropdown:Open(self, list, "Options"); elseif(self.PostRightClick) then self:PostRightClick(); end @@ -1187,6 +1336,7 @@ end local DockButton_MoveTo = function(self, location) if(not MOD[location]) then return end local previousLocation = MOD.private.Locations[self.LocationKey]; + DisableDockletFloating(self); MOD[location].Bar:Add(self, true); SV.Events:Trigger("DOCKLET_LIST_DECREASED", previousLocation); SV.Events:Trigger("DOCKLET_LIST_INCREASED", location); @@ -1234,7 +1384,7 @@ local DockBar_CreateButton = function(self, displayName, globalName, texture, cl button.OrderIndex = 0; button.LocationKey = globalName; button.MoveTo = DockButton_MoveTo - button.GetMenuList = DockButton_GetMenuList + --button.GetMenuList = DockButton_GetMenuList button.SetDocked = DockButton_SetDocked if(clickFunction and type(clickFunction) == "function") then @@ -1277,7 +1427,7 @@ function MOD:SetDockCallbacks(frame, onhide, onshow, onrightclick) frame.PostShowCallback = onshow; end if(frame.Button and (onrightclick and (type(onrightclick) == 'function'))) then - frame.Button.PostRightClick = onrightclick; + frame.Button.GetMenuList = onrightclick; end end --[[ @@ -1312,17 +1462,17 @@ for location, settings in pairs(DOCK_LOCATIONS) do MOD[location] = _G["SVUI_Dock" .. location]; MOD[location].Bar = _G["SVUI_DockBar" .. location]; - MOD[location].Alert.Activate = DockAlert_Activate; + MOD[location].Alert.Activate = DockAlert_Activate; MOD[location].Alert.Deactivate = DockAlert_Deactivate; - MOD[location].Bar.Parent = MOD[location]; + MOD[location].Bar.Parent = MOD[location]; MOD[location].Bar.SetDefault = DockBar_SetDefault; - MOD[location].Bar.NextDefault = DockBar_NextDefault; - MOD[location].Bar.Reset = DockBar_ResetAll; - MOD[location].Bar.Update = DockBar_UpdateLayout; - MOD[location].Bar.Add = DockBar_AddButton; - MOD[location].Bar.Remove = DockBar_RemoveButton; - MOD[location].Bar.Create = DockBar_CreateButton; + MOD[location].Bar.NextDefault = DockBar_NextDefault; + MOD[location].Bar.Reset = DockBar_ResetAll; + MOD[location].Bar.Update = DockBar_UpdateLayout; + MOD[location].Bar.Add = DockBar_AddButton; + MOD[location].Bar.Remove = DockBar_RemoveButton; + MOD[location].Bar.Create = DockBar_CreateButton; MOD[location].Bar.Dividers = {}; MOD[location].Bar.Data = { Location = location, @@ -1377,12 +1527,22 @@ local Docklet_Relocate = function(self, location) end local DockletResize_OnMouseDown = function(self) + local centerX, centerY = self.parent:GetCenter(); + self.parent:ClearAllPoints() + self.parent:SetPoint("CENTER", UIParent, "BOTTOMLEFT", centerX, centerY) + self.parent.Button:ClearAllPoints() + self.parent.Button:SetPoint("TOPLEFT", self.parent, "BOTTOMLEFT", 3, -6) self.parent:StartSizing("BOTTOMRIGHT"); end local DockletResize_OnMouseUp = function(self) + local centerX, centerY = self.parent.Button:GetCenter(); self.parent:StopMovingOrSizing(); - SaveCurrentPosition(self.parent.Button); + self.parent.Button:ClearAllPoints() + self.parent.Button:SetPoint("CENTER", UIParent, "BOTTOMLEFT", centerX, centerY) + self.parent:ClearAllPoints() + self.parent:SetPoint("BOTTOMLEFT", self.parent.Button, "TOPLEFT", -3, 6) + SaveCurrentDimensions(self.parent.Button); end function MOD:NewDocklet(location, globalName, readableName, texture, onclick, onenter) @@ -1410,7 +1570,8 @@ function MOD:NewDocklet(location, globalName, readableName, texture, onclick, on frame.Relocate = Docklet_Relocate; frame.GetButtonSize = Docklet_ButtonSize; - frame.backdrop = self:SetThemedBackdrop(frame) + frame.backdrop = self.SetThemedBackdrop(frame) + frame:UpdateBackdrop() frame.resize = CreateFrame("Frame", nil, frame.backdrop); frame.resize:SetSize(16,16) frame.resize:SetPoint("BOTTOMRIGHT", frame.backdrop, "BOTTOMRIGHT", 0, 0) @@ -1599,22 +1760,26 @@ function MOD:Load() dock.Bar:SetPoint(anchor, SV.Screen, anchor, (2 * mod), (2 * vertMod)) local highlight = CreateFrame("Frame", nil, dock.Bar) + highlight:SetFrameStrata("BACKGROUND") + highlight:SetFrameLevel(1) if(location:find('Top')) then highlight:SetPoint("TOPLEFT", dock.Bar, "TOPLEFT", 0, 0) highlight:SetPoint("TOPRIGHT", dock.Bar, "TOPRIGHT", 0, 0) highlight:SetHeight(buttonsize * 2) - highlight.texture = highlight:CreateTexture(nil, "OVERLAY") + SV.SpecialFX:SetFXFrame(highlight, "dragging_highlight_top") + highlight.texture = highlight:CreateTexture(nil, "BACKGROUND") highlight.texture:SetAllPoints() highlight.texture:SetTexture(SV.media.statusbar.default); - highlight.texture:SetGradientAlpha("VERTICAL",0,0.3,0.3,0,0,1,1,0.8) + highlight.texture:SetGradientAlpha("VERTICAL",0,0,1,0,0,0.8,1,0.8) else highlight:SetPoint("BOTTOMLEFT", dock.Bar, "BOTTOMLEFT", 0, 0) highlight:SetPoint("BOTTOMRIGHT", dock.Bar, "BOTTOMRIGHT", 0, 0) highlight:SetHeight(buttonsize * 2) - highlight.texture = highlight:CreateTexture(nil, "OVERLAY") + SV.SpecialFX:SetFXFrame(highlight, "dragging_highlight_bottom") + highlight.texture = highlight:CreateTexture(nil, "BACKGROUND") highlight.texture:SetAllPoints() highlight.texture:SetTexture(SV.media.statusbar.default); - highlight.texture:SetGradientAlpha("VERTICAL",0,1,1,0.8,0,0.3,0.3,0) + highlight.texture:SetGradientAlpha("VERTICAL",0,0.8,1,0.8,0,0,1,0) end highlight:Hide() @@ -1624,7 +1789,7 @@ function MOD:Load() MOD.private.Order[location] = {} end - dock.Bar.Data.Order = MOD.private.Order[location]; + --dock.Bar.Data.Order = MOD.private.Order[location]; dock.Bar.ToolBar:ClearAllPoints() @@ -1708,17 +1873,18 @@ function MOD:Load() end local function UpdateAllDocks() - for location, settings in pairs(DOCK_LOCATIONS) do - local dock = MOD[location]; - DockBar_SetDefault(dock.Bar); - end - for name, location in pairs(MOD.private.Locations) do if(location == 'Floating') then - LoadSavedPosition(_G[name]) + LoadFloatingDocklet(_G[name]) end end + for location, settings in pairs(DOCK_LOCATIONS) do + local dock = MOD[location]; + DockBar_SetDefault(dock.Bar); + DockBar_UpdateOrder(dock.Bar); + end + MOD:UpdateDockBackdrops() end diff --git a/SVUI_!Core/system/dropdown.lua b/SVUI_!Core/system/dropdown.lua index bccb9d6..502ba7b 100644 --- a/SVUI_!Core/system/dropdown.lua +++ b/SVUI_!Core/system/dropdown.lua @@ -51,7 +51,7 @@ SV.Dropdown = _G["SVUI_DropdownFrame"]; local DropdownButton_OnClick = function(self) self.func(self.target) - self:GetParent():Hide() + --self:GetParent():Hide() ToggleFrame(SV.Dropdown); end diff --git a/SVUI_!Core/system/henchmen.lua b/SVUI_!Core/system/henchmen.lua index b7d5ca3..98e29b3 100644 --- a/SVUI_!Core/system/henchmen.lua +++ b/SVUI_!Core/system/henchmen.lua @@ -119,13 +119,13 @@ local Tooltip_Hide = function(self) end local Minion_OnMouseUp = function(self) - local current = self.setting() + local current = self.getval() if(not current) then self.indicator:SetTexCoord(0,1,0.5,1) - self.setting(true) + self.setval(true) else self.indicator:SetTexCoord(0,1,0,0.5) - self.setting(false) + self.setval(false) end end @@ -194,12 +194,12 @@ local function CreateMinionOptions(i) local setting = options[4]; local dbSet = SV.db.Extras[setting]; - option.setting = function(toggle) - if(toggle == nil) then - return SV.db.Extras[setting] - else - SV.db.Extras[setting] = toggle; - end + + option.getval = function() + return SV.db.Extras[setting] + end + option.setval = function(toggle) + SV.db.Extras[setting] = toggle; end SV.Animate:Slide(option,-500,-500) option:SetFrameStrata("DIALOG") @@ -412,26 +412,28 @@ local function CreateHenchmenFrame() m_option:SetScript("OnEnter", Tooltip_Show) m_option:SetScript("OnLeave", Tooltip_Hide) m_option:SetScript("OnMouseUp", Minion_OnMouseUp) - m_option.setting = function(toggle) - local baseToggle = SV.db.FunStuff.comix; + m_option.getval = function() + if(SV.db.FunStuff.comix == 'NONE') then + return false + else + return SV.db.FunStuff.comix + end + end + m_option.setval = function(toggle) local savedToggle = SV.db.FunStuff.comixLastState; - if(toggle == nil) then - if(baseToggle == 'NONE') then - return false - else - return baseToggle - end + if(toggle == true) then + SV.db.FunStuff.comix = savedToggle; else - if(toggle == true) then - if(baseToggle == 'NONE') then - SV.db.FunStuff.comix = savedToggle; - end - else - SV.db.FunStuff.comix = 'NONE'; - end + SV.db.FunStuff.comix = 'NONE'; end end + if(SV.db.FunStuff.comix == 'NONE') then + m_option.indicator:SetTexCoord(0,1,0,0.5) + else + m_option.indicator:SetTexCoord(0,1,0.5,1) + end + for i=1, 5 do CreateHenchmenOptions(i) CreateMinionOptions(i) @@ -583,7 +585,12 @@ function SV:ToggleHenchman() minion.anim:Finish() minion:Show() minion.anim:Play() - minion:setting() + local current = minion.getval() + if(not current) then + minion.indicator:SetTexCoord(0,1,0,0.5) + else + minion.indicator:SetTexCoord(0,1,0.5,1) + end end SV.HenchmenButton.Icon:SetGradient(unpack(SV.media.gradient.green)) else diff --git a/SVUI_!Core/system/utilities.lua b/SVUI_!Core/system/utilities.lua index 899f5d7..23c28c9 100644 --- a/SVUI_!Core/system/utilities.lua +++ b/SVUI_!Core/system/utilities.lua @@ -168,6 +168,17 @@ SV.PointIndexes = { } do + local _reversed = { + TOP = "BOTTOM", + BOTTOM = "TOP", + LEFT = "RIGHT", + RIGHT = "LEFT", + TOPRIGHT = "TOPLEFT", + TOPLEFT = "TOPRIGHT", + BOTTOMRIGHT = "BOTTOMLEFT", + BOTTOMLEFT = "BOTTOMRIGHT", + } + local _inverted = { TOP = "BOTTOM", BOTTOM = "TOP", diff --git a/SVUI_Chat/SVUI_Chat.lua b/SVUI_Chat/SVUI_Chat.lua index 44ed1cd..3d2418f 100644 --- a/SVUI_Chat/SVUI_Chat.lua +++ b/SVUI_Chat/SVUI_Chat.lua @@ -167,14 +167,15 @@ local HighLight_OnUpdate = function(self) end end do - local EmoteCount = 39; + local EmoteCount = 38; local EmotePatterns = { { "%:%-%@","%:%@","%:%-%)","%:%)","%:D","%:%-D","%;%-D","%;D","%=D", "xD","XD","%:%-%(","%:%(","%:o","%:%-o","%:%-O","%:O","%:%-0", "%:P","%:%-P","%:p","%:%-p","%=P","%=p","%;%-p","%;p","%;P","%;%-P", "%;%-%)","%;%)","%:S","%:%-S","%:%,%(","%:%,%-%(","%:%'%(", - "%:%'%-%(","%:%F","<3","</3" + "%:%'%-%(","<3","</3", + --"%:%F", }, { [[Interface\AddOns\SVUI_Chat\assets\Emoticons\angry.blp]], @@ -213,14 +214,14 @@ do [[Interface\AddOns\SVUI_Chat\assets\Emoticons\weepy.blp]], [[Interface\AddOns\SVUI_Chat\assets\Emoticons\weepy.blp]], [[Interface\AddOns\SVUI_Chat\assets\Emoticons\weepy.blp]], - [[Interface\AddOns\SVUI_Chat\assets\Emoticons\middle_finger.blp]], [[Interface\AddOns\SVUI_Chat\assets\Emoticons\heart.blp]], - [[Interface\AddOns\SVUI_Chat\assets\Emoticons\broken_heart.blp]] + [[Interface\AddOns\SVUI_Chat\assets\Emoticons\broken_heart.blp]], + --[[Interface\AddOns\SVUI_Chat\assets\Emoticons\middle_finger.blp]] } } local function GetEmoticon(pattern) - for i=1, EmoteCount do + for i=1, #EmotePatterns[1] do local emote,icon = EmotePatterns[1][i], EmotePatterns[2][i]; pattern = gsub(pattern, emote, "|T" .. icon .. ":16|t"); end @@ -699,9 +700,14 @@ do chat.Dock.Owner = chat; local ChatDock_RightClickCallback = function() - self = tab - CURRENT_CHAT_FRAME_ID = self:GetID(); - ToggleDropDownMenu(1, nil, _G[self:GetName().."DropDown"], self:GetName(), 0, 0); + return { + { title = " ", divider = true }, + { text = "Channel Settings", func = function() + CURRENT_CHAT_FRAME_ID = tab:GetID(); + ShowUIPanel(ChatConfigFrame); + end + } + }; end SV.Dock:SetDockCallbacks(chat.Dock, ChatDock_HideCallback, ChatDock_ShowCallback, ChatDock_RightClickCallback); @@ -1195,8 +1201,8 @@ do NewHook('FCF_SetChatWindowFontSize', _hook_ChatFontUpdate) NewHook(GeneralDockManager, 'SetPoint', _hook_GDMFrameSetPoint) NewHook(GeneralDockManagerScrollFrame, 'SetPoint', _hook_GDMScrollSetPoint) - NewHook("FCF_SetWindowColor", _hook_FCF_SetWindowColor) - NewHook("FCF_SetWindowAlpha", _hook_FCF_SetWindowAlpha) + --NewHook("FCF_SetWindowColor", _hook_FCF_SetWindowColor) + --NewHook("FCF_SetWindowAlpha", _hook_FCF_SetWindowAlpha) NewHook("FCF_Close", _hook_FCF_Close) --NewHook("FCF_Tab_OnClick", _hook_FCF_Tab_OnClick)