diff --git a/Titan/Titan.toc b/Titan/Titan.toc index 33859fe..451084a 100644 --- a/Titan/Titan.toc +++ b/Titan/Titan.toc @@ -1,7 +1,7 @@ ## Interface: 80000 -## Title: Titan Panel |cff00aa005.14.3.80000|r +## Title: Titan Panel |cff00aa005.14.4.80000|r ## Author: Titan Development Team -## Version: 5.14.3.80000 +## Version: 5.14.4.80000 ## SavedVariables: TitanAll, TitanSettings, TitanSkins, ServerTimeOffsets, ServerHourFormat ## OptionalDeps: Ace3, AceGUI-3.0-SharedMediaWidgets, LibSharedMedia-3.0, LibQTip-1.0, !LibUIDropDownMenu ## Notes: Adds a display bar on the top and/or bottom of the screen. Allows users to show and control information/launcher plugins. diff --git a/Titan/TitanMovable.lua b/Titan/TitanMovable.lua index 88a4779..ca5ab23 100755 --- a/Titan/TitanMovable.lua +++ b/Titan/TitanMovable.lua @@ -299,6 +299,16 @@ function TitanMovableFrame_MoveFrames(position) -- move them... if not InCombatLockdown() then +--[[ Urnati - A bit of a kludge by DDCorkum. This scales the WorldMapFrame but will not +fix the issue if there are two bars at the top. There should be a programatic solution +to this rather than simple scaling.]] + -- modification by DDCorkum to shrink the maximized world map in WoW 8.0 Battle for Azeroth + if (WorldMapFrame:IsShown() and WorldMapFrame:IsMaximized()) then + WorldMapFrame:ClearAllPoints(); + WorldMapFrame:SetScale(0.94) + WorldMapFrame:SetPoint("CENTER",UIParent,"CENTER",0,0); + end + -- end modification by DDCorkum local adj_frame = true for index, value in pairs(TitanMovable) do adj_frame = true -- assume the frame is to be adjusted @@ -759,6 +769,11 @@ function TitanMovable_SecureFrames() -- TitanPanelAce:SecureHook(OverrideActionBar, "Hide", Titan_ManageFramesTest1) -- HelpFrame.xml TitanPanelAce:SecureHook("UpdateContainerFrameAnchors", Titan_ContainerFrames_Relocate) -- ContainerFrame.lua TitanPanelAce:SecureHook(WorldMapFrame, "Hide", Titan_Hook_Adjust_Both) -- WorldMapFrame.lua +--[[ Urnati - Another quick kludge by DDCorkum. This hooks the WorldMapFrame.]] + -- modification by DDCorkum to shrink the maximized world map in WoW 8.0 Battle for Azeroth + TitanPanelAce:SecureHook(WorldMapFrame.BorderFrame.MaximizeMinimizeFrame.MinimizeButton, "Show", Titan_Hook_Adjust_Both) -- WorldMapFrame.lua + TitanPanelAce:SecureHook(WorldMapFrame, "Show", Titan_Hook_Adjust_Both) -- WorldMapFrame.lua + -- end modification by DDCorkum TitanPanelAce:SecureHook("BuffFrame_Update", Titan_Hook_Adjust_Both) -- BuffFrame.lua end diff --git a/Titan/libs/!LibUIDropDownMenu/!LibUIDropDownMenu.toc b/Titan/libs/!LibUIDropDownMenu/!LibUIDropDownMenu.toc index 424a0b0..1570f6e 100755 --- a/Titan/libs/!LibUIDropDownMenu/!LibUIDropDownMenu.toc +++ b/Titan/libs/!LibUIDropDownMenu/!LibUIDropDownMenu.toc @@ -1,7 +1,7 @@ -## Interface: 70300 +## Interface: 80000 ## Title: Lib: UIDropDownMenu ## Notes: A Replacement for standard UIDropDownMenu -## Version: v1.07.7030525961 +## Version: v1.08.80001273226 ## X-Category: Libraries ## X-Website: https://www.wowace.com/projects/libuidropdownmenu ## OptionalDeps: LibStub diff --git a/Titan/libs/!LibUIDropDownMenu/Docs/Readme.txt b/Titan/libs/!LibUIDropDownMenu/Docs/Readme.txt index 60289db..7e23b95 100755 --- a/Titan/libs/!LibUIDropDownMenu/Docs/Readme.txt +++ b/Titan/libs/!LibUIDropDownMenu/Docs/Readme.txt @@ -43,6 +43,7 @@ and functions renamed to: * L_UIDropDownMenu_OnUpdate * L_UIDropDownMenu_StartCounting * L_UIDropDownMenu_StopCounting +* L_UIDropDownMenu_CheckAddCustomFrame * L_UIDropDownMenu_CreateInfo * L_UIDropDownMenu_CreateFrames * L_UIDropDownMenu_AddSeparator @@ -52,6 +53,7 @@ and functions renamed to: * L_UIDropDownMenu_GetButtonWidth * L_UIDropDownMenu_Refresh * L_UIDropDownMenu_RefreshAll +* L_UIDropDownMenu_RegisterCustomFrame * L_UIDropDownMenu_SetIconImage * L_UIDropDownMenu_SetSelectedName * L_UIDropDownMenu_SetSelectedValue @@ -85,3 +87,40 @@ and functions renamed to: * L_UIDropDownMenu_IsEnabled * L_UIDropDownMenu_GetValue +== List of button attributes == +* info.text = [STRING] -- The text of the button +* info.value = [ANYTHING] -- The value that L_UIDROPDOWNMENU_MENU_VALUE is set to when the button is clicked +* info.func = [function()] -- The function that is called when you click the button +* info.checked = [nil, true, function] -- Check the button if true or function returns true +* info.isNotRadio = [nil, true] -- Check the button uses radial image if false check box image if true +* info.isTitle = [nil, true] -- If it's a title the button is disabled and the font color is set to yellow +* info.disabled = [nil, true] -- Disable the button and show an invisible button that still traps the mouseover event so menu doesn't time out +* info.tooltipWhileDisabled = [nil, 1] -- Show the tooltip, even when the button is disabled. +* info.hasArrow = [nil, true] -- Show the expand arrow for multilevel menus +* info.hasColorSwatch = [nil, true] -- Show color swatch or not, for color selection +* info.r = [1 - 255] -- Red color value of the color swatch +* info.g = [1 - 255] -- Green color value of the color swatch +* info.b = [1 - 255] -- Blue color value of the color swatch +* info.colorCode = [STRING] -- "|cAARRGGBB" embedded hex value of the button text color. Only used when button is enabled +* info.swatchFunc = [function()] -- Function called by the color picker on color change +* info.hasOpacity = [nil, 1] -- Show the opacity slider on the colorpicker frame +* info.opacity = [0.0 - 1.0] -- Percentatge of the opacity, 1.0 is fully shown, 0 is transparent +* info.opacityFunc = [function()] -- Function called by the opacity slider when you change its value +* info.cancelFunc = [function(previousValues)] -- Function called by the colorpicker when you click the cancel button (it takes the previous values as its argument) +* info.notClickable = [nil, 1] -- Disable the button and color the font white +* info.notCheckable = [nil, 1] -- Shrink the size of the buttons and don't display a check box +* info.owner = [Frame] -- Dropdown frame that "owns" the current dropdownlist +* info.keepShownOnClick = [nil, 1] -- Don't hide the dropdownlist after a button is clicked +* info.tooltipTitle = [nil, STRING] -- Title of the tooltip shown on mouseover +* info.tooltipText = [nil, STRING] -- Text of the tooltip shown on mouseover +* info.tooltipOnButton = [nil, 1] -- Show the tooltip attached to the button instead of as a Newbie tooltip. +* info.justifyH = [nil, "CENTER"] -- Justify button text +* info.arg1 = [ANYTHING] -- This is the first argument used by info.func +* info.arg2 = [ANYTHING] -- This is the second argument used by info.func +* info.fontObject = [FONT] -- font object replacement for Normal and Highlight +* info.menuTable = [TABLE] -- This contains an array of info tables to be displayed as a child menu +* info.noClickSound = [nil, 1] -- Set to 1 to suppress the sound when clicking the button. The sound only plays if .func is set. +* info.padding = [nil, NUMBER] -- Number of pixels to pad the text on the right side +* info.leftPadding = [nil, NUMBER] -- Number of pixels to pad the button on the left side +* info.minWidth = [nil, NUMBER] -- Minimum width for this line +* info.customFrame = frame -- Allows this button to be a completely custom frame, should inherit from L_UIDropDownCustomMenuEntryTemplate and override appropriate methods. \ No newline at end of file diff --git a/Titan/libs/!LibUIDropDownMenu/Docs/Revision.txt b/Titan/libs/!LibUIDropDownMenu/Docs/Revision.txt index 0b8401c..1b99a8d 100755 --- a/Titan/libs/!LibUIDropDownMenu/Docs/Revision.txt +++ b/Titan/libs/!LibUIDropDownMenu/Docs/Revision.txt @@ -1,7 +1,40 @@ -$Id: Revision.txt 27 2018-04-23 07:52:36Z arith $ +$Id: Revision.txt 36 2018-08-11 13:29:16Z arith $ Revision History: ================= +v1.08.8000127326 (2018/08/11) +----------------------------- +- Workaround to get rid of addons which are still using old version of this library + (thanks to ddcorkum) + +v1.08.8000127165 (2018/07/25) +----------------------------- +- Sync with WoW 8.0.1.27165 + - Added L_UIDropDownMenu_SetDisplayMode() + - Added L_UIDropDownMenuButtonInvisibleButton_OnEnter() + - Added L_UIDropDownMenuButtonInvisibleButton_OnLeave() + - Added L_UIDropDownMenuButton_OnEnter() + - Added L_UIDropDownMenuButton_OnLeave() + +v1.08.8000126433 (2018/04/24) +----------------------------- +- Sync with WoW 8.0.1.26433 + - Added LibUIDropDownMenuTemplates.lua + - Added frame template: L_UIDropDownCustomMenuEntryTemplate + - Added local function GetChild() + - New custom frame functions: + - L_UIDropDownMenu_CheckAddCustomFrame() + - L_UIDropDownMenu_RegisterCustomFrame() + - New button attribute: info.customFrame + - Changes of L_UIDropDownMenu_AddSeparator() is to be reflected only on WoW 8.x.x + - L_UIDropDownMenu_AddSeparator(info, level) == > L_UIDropDownMenu_AddSeparator(level) + No need to specify info there to prevent from messing up other menu items if info is to be re-used. +- Fixed the lib's major version. + Previously with the wrong major version which also has the release version, it makes all the different versions of lib to be presented + as different entities, which means newer version won't replace the older version. The latest loaded one will replace all the constants + and functions. + This change will take effect until all the addons which embed this lib to replace with latest version. + v1.07.7030525961 (2018/04/23) ----------------------------- - Remove external diff --git a/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibEasyMenu.lua b/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibEasyMenu.lua index fafe9f7..5cf69f6 100755 --- a/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibEasyMenu.lua +++ b/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibEasyMenu.lua @@ -1,4 +1,4 @@ ---$Id: LibEasyMenu.lua 25 2017-08-31 14:21:05Z arith $ +--$Id: LibEasyMenu.lua 30 2018-04-24 06:44:39Z arith $ -- Simplified Menu Display System -- This is a basic system for displaying a menu from a structure table. -- @@ -19,8 +19,8 @@ -- ---------------------------------------------------------------------------- local _G = getfenv(0) -- ---------------------------------------------------------------------------- -local MAJOR_VERSION = "LibEasyMenu-1.07.7030024931" -local MINOR_VERSION = 90000 + tonumber(("$Rev: 25 $"):match("%d+")) +local MAJOR_VERSION = "LibEasyMenu" +local MINOR_VERSION = 90000 + tonumber(("$Rev: 30 $"):match("%d+")) local LibStub = _G.LibStub if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end diff --git a/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibUIDropDownMenu.lua b/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibUIDropDownMenu.lua index d5db7a1..de3b658 100755 --- a/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibUIDropDownMenu.lua +++ b/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibUIDropDownMenu.lua @@ -1,4 +1,4 @@ --- $Id: LibUIDropDownMenu.lua 27 2018-04-23 07:52:36Z arith $ +-- $Id: LibUIDropDownMenu.lua 36 2018-08-11 13:29:16Z arith $ -- ---------------------------------------------------------------------------- -- Localized Lua globals. -- ---------------------------------------------------------------------------- @@ -12,11 +12,13 @@ local wipe = table.wipe local CreateFrame, GetCursorPosition, GetCVar, GetScreenHeight, GetScreenWidth, OpenColorPicker, PlaySound = CreateFrame, GetCursorPosition, GetCVar, GetScreenHeight, GetScreenWidth, OpenColorPicker, PlaySound -- ---------------------------------------------------------------------------- -local MAJOR_VERSION = "LibUIDropDownMenu-1.07.7030024931" -local MINOR_VERSION = 90000 + tonumber(("$Rev: 27 $"):match("%d+")) +local WRONG_VERSION = "LibUIDropDownMenu-1.07.7030024931" +local MAJOR_VERSION = "LibUIDropDownMenu" +local MINOR_VERSION = 90000 + tonumber(("$Rev: 36 $"):match("%d+")) local LibStub = _G.LibStub if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end +local wronglib = LibStub:NewLibrary(WRONG_VERSION, MINOR_VERSION) local lib = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) if not lib then return end @@ -81,6 +83,15 @@ function L_UIDropDownMenu_InitializeHelper (frame) frame:SetHeight(L_UIDROPDOWNMENU_BUTTON_HEIGHT * 2); end +-- added since 8.0.1.26433 +local function GetChild(frame, name, key) + if (frame[key]) then + return frame[key]; + else + return _G[name..key]; + end +end + function L_UIDropDownMenu_Initialize(frame, initFunction, displayMode, level, menuList) frame.menuList = menuList; @@ -97,33 +108,40 @@ function L_UIDropDownMenu_Initialize(frame, initFunction, displayMode, level, me level = 1; end - local dropDownList = _G["L_DropDownList"..level] + local dropDownList = _G["L_DropDownList"..level]; dropDownList.dropdown = frame; dropDownList.shouldRefresh = true; + L_UIDropDownMenu_SetDisplayMode(frame, displayMode); +end + +function L_UIDropDownMenu_SetInitializeFunction(frame, initFunction) + frame.initialize = initFunction; +end + +function L_UIDropDownMenu_SetDisplayMode(frame, displayMode) -- Change appearance based on the displayMode + -- Note: this is a one time change based on previous behavior. if ( displayMode == "MENU" ) then local name = frame:GetName(); - _G[name.."Left"]:Hide(); - _G[name.."Middle"]:Hide(); - _G[name.."Right"]:Hide(); - _G[name.."ButtonNormalTexture"]:SetTexture(""); - _G[name.."ButtonDisabledTexture"]:SetTexture(""); - _G[name.."ButtonPushedTexture"]:SetTexture(""); - _G[name.."ButtonHighlightTexture"]:SetTexture(""); - - local button = _G[name.."Button"] + GetChild(frame, name, "Left"):Hide(); + GetChild(frame, name, "Middle"):Hide(); + GetChild(frame, name, "Right"):Hide(); + local button = GetChild(frame, name, "Button"); + local buttonName = button:GetName(); + GetChild(button, buttonName, "NormalTexture"):SetTexture(nil); + GetChild(button, buttonName, "DisabledTexture"):SetTexture(nil); + GetChild(button, buttonName, "PushedTexture"):SetTexture(nil); + GetChild(button, buttonName, "HighlightTexture"):SetTexture(nil); + local text = GetChild(frame, name, "Text"); + button:ClearAllPoints(); - button:SetPoint("LEFT", name.."Text", "LEFT", -9, 0); - button:SetPoint("RIGHT", name.."Text", "RIGHT", 6, 0); + button:SetPoint("LEFT", text, "LEFT", -9, 0); + button:SetPoint("RIGHT", text, "RIGHT", 6, 0); frame.displayMode = "MENU"; end end -function L_UIDropDownMenu_SetInitializeFunction(frame, initFunction) - frame.initialize = initFunction; -end - function L_UIDropDownMenu_RefreshDropDownSize(self) self.maxWidth = L_UIDropDownMenu_GetMaxButtonWidth(self); self:SetWidth(self.maxWidth + 25); @@ -174,6 +192,80 @@ function L_UIDropDownMenu_StopCounting(frame) end end +function L_UIDropDownMenuButtonInvisibleButton_OnEnter(self) + L_UIDropDownMenu_StopCounting(self:GetParent():GetParent()); + L_CloseDropDownMenus(self:GetParent():GetParent():GetID() + 1); + local parent = self:GetParent(); + if ( parent.tooltipTitle and parent.tooltipWhileDisabled) then + if ( parent.tooltipOnButton ) then + GameTooltip:SetOwner(parent, "ANCHOR_RIGHT"); + GameTooltip_SetTitle(GameTooltip, parent.tooltipTitle); + if parent.tooltipInstruction then + GameTooltip_AddInstructionLine(GameTooltip, parent.tooltipInstruction); + end + if parent.tooltipText then + GameTooltip_AddNormalLine(GameTooltip, parent.tooltipText, true); + end + if parent.tooltipWarning then + GameTooltip_AddColoredLine(GameTooltip, parent.tooltipWarning, RED_FONT_COLOR, true); + end + GameTooltip:Show(); + else + GameTooltip_AddNewbieTip(parent, parent.tooltipTitle, 1.0, 1.0, 1.0, parent.tooltipText, 1); + end + end +end + +function L_UIDropDownMenuButtonInvisibleButton_OnLeave(self) + L_UIDropDownMenu_StartCounting(self:GetParent():GetParent()); + GameTooltip:Hide(); +end + +function L_UIDropDownMenuButton_OnEnter(self) + if ( self.hasArrow ) then + local level = self:GetParent():GetID() + 1; + local listFrame = _G["L_DropDownList"..level]; + if ( not listFrame or not listFrame:IsShown() or select(2, listFrame:GetPoint()) ~= self ) then + L_ToggleDropDownMenu(self:GetParent():GetID() + 1, self.value, nil, nil, nil, nil, self.menuList, self); + end + else + L_CloseDropDownMenus(self:GetParent():GetID() + 1); + end + self.Highlight:Show(); + L_UIDropDownMenu_StopCounting(self:GetParent()); + if ( self.tooltipTitle and not self.noTooltipWhileEnabled ) then + if ( self.tooltipOnButton ) then + GameTooltip:SetOwner(self, "ANCHOR_RIGHT"); + GameTooltip_SetTitle(GameTooltip, self.tooltipTitle); + if self.tooltipText then + GameTooltip_AddNormalLine(GameTooltip, self.tooltipText, true); + end + GameTooltip:Show(); + else + GameTooltip_AddNewbieTip(self, self.tooltipTitle, 1.0, 1.0, 1.0, self.tooltipText, 1); + end + end + + if ( self.mouseOverIcon ~= nil ) then + self.Icon:SetTexture(self.mouseOverIcon); + self.Icon:Show(); + end +end + +function L_UIDropDownMenuButton_OnLeave(self) + self.Highlight:Hide(); + L_UIDropDownMenu_StartCounting(self:GetParent()); + GameTooltip:Hide(); + + if ( self.mouseOverIcon ~= nil ) then + if ( self.icon ~= nil ) then + self.Icon:SetTexture(self.icon); + else + self.Icon:Hide(); + end + end +end + --[[ List of button attributes ====================================================== @@ -212,6 +304,9 @@ info.noClickSound = [nil, 1] -- Set to 1 to suppress the sound when clicking t info.padding = [nil, NUMBER] -- Number of pixels to pad the text on the right side info.leftPadding = [nil, NUMBER] -- Number of pixels to pad the button on the left side info.minWidth = [nil, NUMBER] -- Minimum width for this line +info.customFrame = frame -- Allows this button to be a completely custom frame, should inherit from L_UIDropDownCustomMenuEntryTemplate and override appropriate methods. +info.icon = [TEXTURE] -- An icon for the button. +info.mouseOverIcon = [TEXTURE] -- An override icon when a button is moused over. ]] local L_UIDropDownMenu_ButtonInfo = {}; @@ -258,31 +353,38 @@ function L_UIDropDownMenu_CreateFrames(level, index) end end -function L_UIDropDownMenu_AddSeparator(info, level) - info.text = nil; - info.hasArrow = false; - info.dist = 0; - info.isTitle = true; - info.isUninteractable = true; - info.notCheckable = true; - info.iconOnly = true; - info.icon = "Interface\\Common\\UI-TooltipDivider-Transparent"; - info.tCoordLeft = 0; - info.tCoordRight = 1; - info.tCoordTop = 0; - info.tCoordBottom = 1; - info.tSizeX = 0; - info.tSizeY = 8; - info.tFitDropDownSizeX = true; - info.iconInfo = { tCoordLeft = info.tCoordLeft, - tCoordRight = info.tCoordRight, - tCoordTop = info.tCoordTop, - tCoordBottom = info.tCoordBottom, - tSizeX = info.tSizeX, - tSizeY = info.tSizeY, - tFitDropDownSizeX = info.tFitDropDownSizeX }; - - L_UIDropDownMenu_AddButton(info, level); +local separatorInfo; + +function L_UIDropDownMenu_AddSeparator(level) + if not separatorInfo then + separatorInfo = { + hasArrow = false; + dist = 0; + isTitle = true; + isUninteractable = true; + notCheckable = true; + iconOnly = true; + icon = "Interface\\Common\\UI-TooltipDivider-Transparent"; + tCoordLeft = 0; + tCoordRight = 1; + tCoordTop = 0; + tCoordBottom = 1; + tSizeX = 0; + tSizeY = 8; + tFitDropDownSizeX = true; + iconInfo = { + tCoordLeft = 0, + tCoordRight = 1, + tCoordTop = 0, + tCoordBottom = 1, + tSizeX = 0, + tSizeY = 8, + tFitDropDownSizeX = true + }, + }; + end + + L_UIDropDownMenu_AddButton(separatorInfo, level); end function L_UIDropDownMenu_AddButton(info, level) @@ -356,7 +458,7 @@ function L_UIDropDownMenu_AddButton(info, level) end -- Set icon - if ( info.icon ) then + if ( info.icon or info.mouseOverIcon ) then icon:SetSize(16,16); icon:SetTexture(info.icon); icon:ClearAllPoints(); @@ -415,6 +517,8 @@ function L_UIDropDownMenu_AddButton(info, level) button.keepShownOnClick = info.keepShownOnClick; button.tooltipTitle = info.tooltipTitle; button.tooltipText = info.tooltipText; + button.tooltipInstruction = info.tooltipInstruction; + button.tooltipWarning = info.tooltipWarning; button.arg1 = info.arg1; button.arg2 = info.arg2; button.hasArrow = info.hasArrow; @@ -422,9 +526,12 @@ function L_UIDropDownMenu_AddButton(info, level) button.notCheckable = info.notCheckable; button.menuList = info.menuList; button.tooltipWhileDisabled = info.tooltipWhileDisabled; + button.noTooltipWhileEnabled = info.noTooltipWhileEnabled; button.tooltipOnButton = info.tooltipOnButton; button.noClickSound = info.noClickSound; button.padding = info.padding; + button.icon = info.icon; + button.mouseOverIcon = info.mouseOverIcon; if ( info.value ) then button.value = info.value; @@ -434,13 +541,9 @@ function L_UIDropDownMenu_AddButton(info, level) button.value = nil; end - -- Show the expand arrow if it has one - if ( info.hasArrow ) then - _G[listFrameName.."Button"..index.."ExpandArrow"]:Show(); - else - _G[listFrameName.."Button"..index.."ExpandArrow"]:Hide(); - end - button.hasArrow = info.hasArrow; + local expandArrow = _G[listFrameName.."Button"..index.."ExpandArrow"]; + expandArrow:SetShown(info.hasArrow); + expandArrow:SetEnabled(not info.disabled); -- If not checkable move everything over to the left to fill in the gap where the check would be local xPos = 5; @@ -497,26 +600,42 @@ function L_UIDropDownMenu_AddButton(info, level) end end - if not info.notCheckable then + local check = _G[listFrameName.."Button"..index.."Check"]; + local uncheck = _G[listFrameName.."Button"..index.."UnCheck"]; if ( info.disabled ) then - _G[listFrameName.."Button"..index.."Check"]:SetDesaturated(true); - _G[listFrameName.."Button"..index.."Check"]:SetAlpha(0.5); - _G[listFrameName.."Button"..index.."UnCheck"]:SetDesaturated(true); - _G[listFrameName.."Button"..index.."UnCheck"]:SetAlpha(0.5); + check:SetDesaturated(true); + check:SetAlpha(0.5); + uncheck:SetDesaturated(true); + uncheck:SetAlpha(0.5); else - _G[listFrameName.."Button"..index.."Check"]:SetDesaturated(false); - _G[listFrameName.."Button"..index.."Check"]:SetAlpha(1); - _G[listFrameName.."Button"..index.."UnCheck"]:SetDesaturated(false); - _G[listFrameName.."Button"..index.."UnCheck"]:SetAlpha(1); + check:SetDesaturated(false); + check:SetAlpha(1); + uncheck:SetDesaturated(false); + uncheck:SetAlpha(1); end - - if info.isNotRadio then - _G[listFrameName.."Button"..index.."Check"]:SetTexCoord(0.0, 0.5, 0.0, 0.5); - _G[listFrameName.."Button"..index.."UnCheck"]:SetTexCoord(0.5, 1.0, 0.0, 0.5); + + if info.customCheckIconAtlas or info.customCheckIconTexture then + check:SetTexCoord(0, 1, 0, 1); + uncheck:SetTexCoord(0, 1, 0, 1); + + if info.customCheckIconAtlas then + check:SetAtlas(info.customCheckIconAtlas); + uncheck:SetAtlas(info.customUncheckIconAtlas or info.customCheckIconAtlas); + else + check:SetTexture(info.customCheckIconTexture); + uncheck:SetTexture(info.customUncheckIconTexture or info.customCheckIconTexture); + end + elseif info.isNotRadio then + check:SetTexCoord(0.0, 0.5, 0.0, 0.5); + check:SetTexture("Interface\\Common\\UI-DropDownRadioChecks"); + uncheck:SetTexCoord(0.5, 1.0, 0.0, 0.5); + uncheck:SetTexture("Interface\\Common\\UI-DropDownRadioChecks"); else - _G[listFrameName.."Button"..index.."Check"]:SetTexCoord(0.0, 0.5, 0.5, 1.0); - _G[listFrameName.."Button"..index.."UnCheck"]:SetTexCoord(0.5, 1.0, 0.5, 1.0); + check:SetTexCoord(0.0, 0.5, 0.5, 1.0); + check:SetTexture("Interface\\Common\\UI-DropDownRadioChecks"); + uncheck:SetTexCoord(0.5, 1.0, 0.5, 1.0); + uncheck:SetTexture("Interface\\Common\\UI-DropDownRadioChecks"); end -- Checked can be a function now @@ -528,12 +647,12 @@ function L_UIDropDownMenu_AddButton(info, level) -- Show the check if checked if ( checked ) then button:LockHighlight(); - _G[listFrameName.."Button"..index.."Check"]:Show(); - _G[listFrameName.."Button"..index.."UnCheck"]:Hide(); + check:Show(); + uncheck:Hide(); else button:UnlockHighlight(); - _G[listFrameName.."Button"..index.."Check"]:Hide(); - _G[listFrameName.."Button"..index.."UnCheck"]:Show(); + check:Hide(); + uncheck:Show(); end else _G[listFrameName.."Button"..index.."Check"]:Hide(); @@ -553,6 +672,12 @@ function L_UIDropDownMenu_AddButton(info, level) colorSwatch:Hide(); end + L_UIDropDownMenu_CheckAddCustomFrame(listFrame, button, info); + + button:SetShown(button.customFrame == nil); + + button.minWidth = info.minWidth; + width = max(L_UIDropDownMenu_GetButtonWidth(button), info.minWidth or 0); --Set maximum button width if ( width > listFrame.maxWidth ) then @@ -561,25 +686,48 @@ function L_UIDropDownMenu_AddButton(info, level) -- Set the height of the listframe listFrame:SetHeight((index * L_UIDROPDOWNMENU_BUTTON_HEIGHT) + (L_UIDROPDOWNMENU_BORDER_HEIGHT * 2)); +end + +function L_UIDropDownMenu_CheckAddCustomFrame(self, button, info) + local customFrame = info.customFrame; + button.customFrame = customFrame; + if customFrame then + customFrame:SetOwningButton(button); + customFrame:ClearAllPoints(); + customFrame:SetPoint("TOPLEFT", button, "TOPLEFT", 0, 0); + customFrame:Show(); - button:Show(); + L_UIDropDownMenu_RegisterCustomFrame(self, customFrame); + end +end + +function L_UIDropDownMenu_RegisterCustomFrame(self, customFrame) + self.customFrames = self.customFrames or {} + table.insert(self.customFrames, customFrame); end function L_UIDropDownMenu_GetMaxButtonWidth(self) local maxWidth = 0; for i=1, self.numButtons do local button = _G[self:GetName().."Button"..i]; - if ( button:IsShown() ) then - local width = L_UIDropDownMenu_GetButtonWidth(button); - if ( width > maxWidth ) then - maxWidth = width; - end + local width = L_UIDropDownMenu_GetButtonWidth(button); + if ( width > maxWidth ) then + maxWidth = width; end end return maxWidth; end function L_UIDropDownMenu_GetButtonWidth(button) + local minWidth = button.minWidth or 0; + if button.customFrame and button.customFrame:IsShown() then + return math.max(minWidth, button.customFrame:GetPreferredEntryWidth()); + end + + if not button:IsShown() then + return 0; + end + local width; local buttonName = button:GetName(); local icon = _G[buttonName.."Icon"]; @@ -595,7 +743,7 @@ function L_UIDropDownMenu_GetButtonWidth(button) width = width + 10; end else - return 0; + return minWidth; end -- Add padding if has and expand arrow or color swatch @@ -609,7 +757,7 @@ function L_UIDropDownMenu_GetButtonWidth(button) width = width + button.padding; end - return width; + return math.max(minWidth, width); end function L_UIDropDownMenu_Refresh(frame, useValue, dropdownLevel) @@ -653,7 +801,7 @@ function L_UIDropDownMenu_Refresh(frame, useValue, dropdownLevel) uncheckImage = _G["L_DropDownList"..dropdownLevel.."Button"..i.."UnCheck"]; if ( checked ) then somethingChecked = true; - local icon = _G[frame:GetName().."Icon"]; + local icon = GetChild(frame, frame:GetName(), "Icon"); if (button.iconOnly and icon and button.icon) then L_UIDropDownMenu_SetIconImage(icon, button.icon, button.iconInfo); elseif ( useValue ) then @@ -885,7 +1033,7 @@ function L_ToggleDropDownMenu(level, value, dropDownFrame, anchorName, xOffset, if ( dropDownFrame.relativeTo ) then relativeTo = dropDownFrame.relativeTo; else - relativeTo = L_UIDROPDOWNMENU_OPEN_MENU:GetName().."Left"; + relativeTo = GetChild(L_UIDROPDOWNMENU_OPEN_MENU, L_UIDROPDOWNMENU_OPEN_MENU:GetName(), "Left"); end if ( dropDownFrame.relativePoint ) then relativePoint = dropDownFrame.relativePoint; @@ -1069,10 +1217,19 @@ function L_UIDropDownMenu_OnHide(self) if (id == 1) then L_UIDROPDOWNMENU_OPEN_MENU = nil; end + + if self.customFrames then + for index, frame in ipairs(self.customFrames) do + frame:Hide(); + end + + self.customFrames = nil; + end end function L_UIDropDownMenu_SetWidth(frame, width, padding) - _G[frame:GetName().."Middle"]:SetWidth(width); + local frameName = frame:GetName(); + GetChild(frame, frameName, "Middle"):SetWidth(width); local defaultPadding = 25; if ( padding ) then frame:SetWidth(width + padding); @@ -1080,30 +1237,31 @@ function L_UIDropDownMenu_SetWidth(frame, width, padding) frame:SetWidth(width + defaultPadding + defaultPadding); end if ( padding ) then - _G[frame:GetName().."Text"]:SetWidth(width); + GetChild(frame, frameName, "Text"):SetWidth(width); else - _G[frame:GetName().."Text"]:SetWidth(width - defaultPadding); + GetChild(frame, frameName, "Text"):SetWidth(width - defaultPadding); end frame.noResize = 1; end function L_UIDropDownMenu_SetButtonWidth(frame, width) + local frameName = frame:GetName(); if ( width == "TEXT" ) then - width = _G[frame:GetName().."Text"]:GetWidth(); + width = GetChild(frame, frameName, "Text"):GetWidth(); end - _G[frame:GetName().."Button"]:SetWidth(width); + GetChild(frame, frameName, "Button"):SetWidth(width); frame.noResize = 1; end function L_UIDropDownMenu_SetText(frame, text) - local filterText = _G[frame:GetName().."Text"]; - filterText:SetText(text); + local frameName = frame:GetName(); + GetChild(frame, frameName, "Text"):SetText(text); end function L_UIDropDownMenu_GetText(frame) - local filterText = _G[frame:GetName().."Text"]; - return filterText:GetText(); + local frameName = frame:GetName(); + return GetChild(frame, frameName, "Text"):GetText(); end function L_UIDropDownMenu_ClearAll(frame) @@ -1126,16 +1284,17 @@ function L_UIDropDownMenu_ClearAll(frame) end function L_UIDropDownMenu_JustifyText(frame, justification) - local text = _G[frame:GetName().."Text"]; + local frameName = frame:GetName(); + local text = GetChild(frame, frameName, "Text"); text:ClearAllPoints(); if ( justification == "LEFT" ) then - text:SetPoint("LEFT", frame:GetName().."Left", "LEFT", 27, 2); + text:SetPoint("LEFT", GetChild(frame, frameName, "Left"), "LEFT", 27, 2); text:SetJustifyH("LEFT"); elseif ( justification == "RIGHT" ) then - text:SetPoint("RIGHT", frame:GetName().."Right", "RIGHT", -43, 2); + text:SetPoint("RIGHT", GetChild(frame, frameName, "Right"), "RIGHT", -43, 2); text:SetJustifyH("RIGHT"); elseif ( justification == "CENTER" ) then - text:SetPoint("CENTER", frame:GetName().."Middle", "CENTER", -5, 2); + text:SetPoint("CENTER", GetChild(frame, frameName, "Middle"), "CENTER", -5, 2); text:SetJustifyH("CENTER"); end end @@ -1199,22 +1358,24 @@ function L_UIDropDownMenu_SetButtonClickable(level, id) end function L_UIDropDownMenu_DisableDropDown(dropDown) - local label = _G[dropDown:GetName().."Label"]; + local dropDownName = dropDown:GetName(); + local label = GetChild(dropDown, dropDownName, "Label"); if ( label ) then label:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b); end - _G[dropDown:GetName().."Text"]:SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b); - _G[dropDown:GetName().."Button"]:Disable(); + GetChild(dropDown, dropDownName, "Text"):SetVertexColor(GRAY_FONT_COLOR.r, GRAY_FONT_COLOR.g, GRAY_FONT_COLOR.b); + GetChild(dropDown, dropDownName, "Button"):Disable(); dropDown.isDisabled = 1; end function L_UIDropDownMenu_EnableDropDown(dropDown) - local label = _G[dropDown:GetName().."Label"]; + local dropDownName = dropDown:GetName(); + local label = GetChild(dropDown, dropDownName, "Label"); if ( label ) then label:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b); end - _G[dropDown:GetName().."Text"]:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b); - _G[dropDown:GetName().."Button"]:Enable(); + GetChild(dropDown, dropDownName, "Text"):SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b); + GetChild(dropDown, dropDownName, "Button"):Enable(); dropDown.isDisabled = nil; end diff --git a/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibUIDropDownMenuTemplates.lua b/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibUIDropDownMenuTemplates.lua new file mode 100755 index 0000000..ca74b3d --- /dev/null +++ b/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibUIDropDownMenuTemplates.lua @@ -0,0 +1,57 @@ +-- $Id: LibUIDropDownMenuTemplates.lua 30 2018-04-24 06:44:39Z arith $ +-- ---------------------------------------------------------------------------- +-- Localized Lua globals. +-- ---------------------------------------------------------------------------- +local _G = getfenv(0) +-- ---------------------------------------------------------------------------- +local MAJOR_VERSION = "LibUIDropDownMenuTemplates" +local MINOR_VERSION = 90000 + tonumber(("$Rev: 30 $"):match("%d+")) + +local LibStub = _G.LibStub +if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end +local Lib = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) +if not Lib then return end + +-- Custom dropdown buttons are instantiated by some external system. +-- When calling L_UIDropDownMenu_AddButton that system sets info.customFrame to the instance of the frame it wants to place on the menu. +-- The dropdown menu creates its button for the entry as it normally would, but hides all elements. The custom frame is then anchored +-- to that button and assumes responsibility for all relevant dropdown menu operations. +-- The hidden button will request a size that it should become from the custom frame. + + +L_UIDropDownCustomMenuEntryMixin = {}; + +function L_UIDropDownCustomMenuEntryMixin:GetPreferredEntryWidth() + -- NOTE: Only width is currently supported, dropdown menus size vertically based on how many buttons are present. + return self:GetWidth(); +end + +function L_UIDropDownCustomMenuEntryMixin:OnSetOwningButton() + -- for derived objects to implement +end + +function L_UIDropDownCustomMenuEntryMixin:SetOwningButton(button) + self:SetParent(button:GetParent()); + self.owningButton = button; + self:OnSetOwningButton(); +end + +function L_UIDropDownCustomMenuEntryMixin:GetOwningDropdown() + return self.owningButton:GetParent(); +end + +function L_UIDropDownCustomMenuEntryMixin:SetContextData(contextData) + self.contextData = contextData; +end + +function L_UIDropDownCustomMenuEntryMixin:GetContextData() + return self.contextData; +end + +function L_UIDropDownCustomMenuEntryMixin:OnEnter() + L_UIDropDownMenu_StopCounting(self:GetOwningDropdown()); +end + +function L_UIDropDownCustomMenuEntryMixin:OnLeave() + L_UIDropDownMenu_StartCounting(self:GetOwningDropdown()); +end diff --git a/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibUIDropDownMenuTemplates.xml b/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibUIDropDownMenuTemplates.xml index 338ae33..2ab55e6 100755 --- a/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibUIDropDownMenuTemplates.xml +++ b/Titan/libs/!LibUIDropDownMenu/LibUIDropDownMenu/LibUIDropDownMenuTemplates.xml @@ -1,11 +1,19 @@ -<!-- $Id: LibUIDropDownMenuTemplates.xml 25 2017-08-31 14:21:05Z arith $ --> +<!-- $Id: LibUIDropDownMenuTemplates.xml 34 2018-07-25 13:26:33Z arith $ --> <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> + <Include file="LibUIDropDownMenuTemplates.lua"/> + <Frame name="L_UIDropDownCustomMenuEntryTemplate" enableMouse="true" hidden="true" mixin="L_UIDropDownCustomMenuEntryMixin" virtual="true"> + <Scripts> + <OnEnter method="OnEnter"/> + <OnLeave method="OnLeave"/> + </Scripts> + </Frame> + <Button name="L_UIDropDownMenuButtonTemplate" virtual="true"> <Size x="100" y="16"/> <Layers> <Layer level="BACKGROUND"> - <Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" setAllPoints="true" hidden="true"/> + <Texture name="$parentHighlight" parentKey="Highlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" setAllPoints="true" hidden="true"/> </Layer> <Layer level="ARTWORK"> <Texture name="$parentCheck" file="Interface\Common\UI-DropDownRadioChecks"> @@ -26,7 +34,7 @@ </Anchors> <TexCoords left="0.5" right="1.0" top="0.5" bottom="1.0"/> </Texture> - <Texture name="$parentIcon" hidden="true"> + <Texture parentKey="Icon" name="$parentIcon" hidden="true"> <Size> <AbsDimension x="16" y="16"/> </Size> @@ -69,7 +77,7 @@ </Layers> <Scripts> <OnClick> - securecall("CloseMenus"); + CloseMenus(); L_UIDropDownMenuButton_OpenColorPicker(self:GetParent()); </OnClick> <OnEnter> @@ -84,7 +92,7 @@ </Scripts> <NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\ChatFrameColorSwatch"/> </Button> - <Button name="$parentExpandArrow" hidden="true"> + <Button name="$parentExpandArrow" hidden="true" motionScriptsWhileDisabled="true"> <Size> <AbsDimension x="16" y="16"/> </Size> @@ -101,10 +109,16 @@ </OnClick> <OnEnter> local level = self:GetParent():GetParent():GetID() + 1; - local listFrame = _G["L_DropDownList"..level]; - if ( not listFrame or not listFrame:IsShown() or select(2, listFrame:GetPoint()) ~= self ) then - L_ToggleDropDownMenu(level, self:GetParent().value, nil, nil, nil, nil, self:GetParent().menuList, self); + + L_CloseDropDownMenus(level); + + if self:IsEnabled() then + local listFrame = _G["L_DropDownList"..level]; + if ( not listFrame or not listFrame:IsShown() or select(2, listFrame:GetPoint()) ~= self ) then + L_ToggleDropDownMenu(level, self:GetParent().value, nil, nil, nil, nil, self:GetParent().menuList, self); + end end + L_UIDropDownMenu_StopCounting(self:GetParent():GetParent()); </OnEnter> <OnLeave> @@ -124,25 +138,8 @@ </Anchor> </Anchors> <Scripts> - <OnEnter> - L_UIDropDownMenu_StopCounting(self:GetParent():GetParent()); - L_CloseDropDownMenus(self:GetParent():GetParent():GetID() + 1); - local parent = self:GetParent(); - if ( parent.tooltipTitle and parent.tooltipWhileDisabled) then - if ( parent.tooltipOnButton ) then - GameTooltip:SetOwner(parent, "ANCHOR_RIGHT"); - GameTooltip:AddLine(parent.tooltipTitle, 1.0, 1.0, 1.0); - GameTooltip:AddLine(parent.tooltipText, nil, nil, nil, true); - GameTooltip:Show(); - else - GameTooltip_AddNewbieTip(parent, parent.tooltipTitle, 1.0, 1.0, 1.0, parent.tooltipText, 1); - end - end - </OnEnter> - <OnLeave> - L_UIDropDownMenu_StartCounting(self:GetParent():GetParent()); - GameTooltip:Hide(); - </OnLeave> + <OnEnter function="L_UIDropDownMenuButtonInvisibleButton_OnEnter"/> + <OnLeave function="L_UIDropDownMenuButtonInvisibleButton_OnLeave"/> </Scripts> </Button> </Frames> @@ -153,34 +150,8 @@ <OnClick> L_UIDropDownMenuButton_OnClick(self, button, down); </OnClick> - <OnEnter> - if ( self.hasArrow ) then - local level = self:GetParent():GetID() + 1; - local listFrame = _G["L_DropDownList"..level]; - if ( not listFrame or not listFrame:IsShown() or select(2, listFrame:GetPoint()) ~= self ) then - L_ToggleDropDownMenu(self:GetParent():GetID() + 1, self.value, nil, nil, nil, nil, self.menuList, self); - end - else - L_CloseDropDownMenus(self:GetParent():GetID() + 1); - end - _G[self:GetName().."Highlight"]:Show(); - L_UIDropDownMenu_StopCounting(self:GetParent()); - if ( self.tooltipTitle ) then - if ( self.tooltipOnButton ) then - GameTooltip:SetOwner(self, "ANCHOR_RIGHT"); - GameTooltip:AddLine(self.tooltipTitle, 1.0, 1.0, 1.0); - GameTooltip:AddLine(self.tooltipText, nil, nil, nil, true); - GameTooltip:Show(); - else - GameTooltip_AddNewbieTip(self, self.tooltipTitle, 1.0, 1.0, 1.0, self.tooltipText, 1); - end - end - </OnEnter> - <OnLeave> - _G[self:GetName().."Highlight"]:Hide(); - L_UIDropDownMenu_StartCounting(self:GetParent()); - GameTooltip:Hide(); - </OnLeave> + <OnEnter function="L_UIDropDownMenuButton_OnEnter"/> + <OnLeave function="L_UIDropDownMenuButton_OnLeave"/> <OnEnable> self.invisibleButton:Hide(); </OnEnable> @@ -205,7 +176,7 @@ <Frame name="$parentBackdrop" setAllPoints="true"> <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background-Dark" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true"> <BackgroundInsets> - <AbsInset left="11" right="12" top="12" bottom="9"/> + <AbsInset left="11" right="11" top="11" bottom="9"/> </BackgroundInsets> <TileSize> <AbsValue val="32"/> @@ -224,7 +195,7 @@ <AbsValue val="16"/> </TileSize> <BackgroundInsets> - <AbsInset left="5" right="5" top="5" bottom="4"/> + <AbsInset left="5" right="4" top="4" bottom="4"/> </BackgroundInsets> </Backdrop> <Scripts> @@ -282,7 +253,7 @@ </Size> <Layers> <Layer level="ARTWORK"> - <Texture name="$parentLeft" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame"> + <Texture name="$parentLeft" parentKey="Left" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame"> <Size> <AbsDimension x="25" y="64"/> </Size> @@ -295,21 +266,21 @@ </Anchors> <TexCoords left="0" right="0.1953125" top="0" bottom="1"/> </Texture> - <Texture name="$parentMiddle" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame"> + <Texture name="$parentMiddle" parentKey="Middle" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame"> <Size> <AbsDimension x="115" y="64"/> </Size> <Anchors> - <Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/> + <Anchor point="LEFT" relativeKey="$parent.Left" relativePoint="RIGHT"/> </Anchors> <TexCoords left="0.1953125" right="0.8046875" top="0" bottom="1"/> </Texture> - <Texture name="$parentRight" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame"> + <Texture name="$parentRight" parentKey="Right" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame"> <Size> <AbsDimension x="25" y="64"/> </Size> <Anchors> - <Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/> + <Anchor point="LEFT" relativeKey="$parent.Middle" relativePoint="RIGHT"/> </Anchors> <TexCoords left="0.8046875" right="1" top="0" bottom="1"/> </Texture> @@ -318,7 +289,7 @@ <AbsDimension x="0" y="10"/> </Size> <Anchors> - <Anchor point="RIGHT" relativeTo="$parentRight"> + <Anchor point="RIGHT" relativeKey="$parent.Right"> <Offset> <AbsDimension x="-43" y="2"/> </Offset> @@ -345,7 +316,7 @@ <AbsDimension x="24" y="24"/> </Size> <Anchors> - <Anchor point="TOPRIGHT" relativeTo="$parentRight"> + <Anchor point="TOPRIGHT" relativeKey="$parent.Right"> <Offset> <AbsDimension x="-16" y="-18"/> </Offset> @@ -371,7 +342,7 @@ PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON); </OnClick> </Scripts> - <NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up"> + <NormalTexture name="$parentNormalTexture" parentKey="NormalTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up"> <Size> <AbsDimension x="24" y="24"/> </Size> @@ -379,7 +350,7 @@ <Anchor point="RIGHT"/> </Anchors> </NormalTexture> - <PushedTexture name="$parentPushedTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down"> + <PushedTexture name="$parentPushedTexture" parentKey="PushedTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down"> <Size> <AbsDimension x="24" y="24"/> </Size> @@ -387,7 +358,7 @@ <Anchor point="RIGHT"/> </Anchors> </PushedTexture> - <DisabledTexture name="$parentDisabledTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled"> + <DisabledTexture name="$parentDisabledTexture" parentKey="DisabledTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled"> <Size> <AbsDimension x="24" y="24"/> </Size> @@ -395,7 +366,7 @@ <Anchor point="RIGHT"/> </Anchors> </DisabledTexture> - <HighlightTexture name="$parentHighlightTexture" file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"> + <HighlightTexture name="$parentHighlightTexture" parentKey="HighlightTexture" file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"> <Size> <AbsDimension x="24" y="24"/> </Size> diff --git a/TitanBag/TitanBag.toc b/TitanBag/TitanBag.toc index 0168c7a..755d270 100644 --- a/TitanBag/TitanBag.toc +++ b/TitanBag/TitanBag.toc @@ -1,10 +1,10 @@ ## Interface: 80000 -## Title: Titan Panel [|cffeda55fBag|r] |cff00aa005.14.3.80000|r +## Title: Titan Panel [|cffeda55fBag|r] |cff00aa005.14.4.80000|r ## Notes: Adds bag and free slot information to Titan Panel ## Author: Titan Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 5.14.3.80000 +## Version: 5.14.4.80000 ## X-Child-Of: Titan TitanBag.xml diff --git a/TitanClock/TitanClock.toc b/TitanClock/TitanClock.toc index d7f3ea6..9d75151 100644 --- a/TitanClock/TitanClock.toc +++ b/TitanClock/TitanClock.toc @@ -1,10 +1,10 @@ ## Interface: 80000 -## Title: Titan Panel [|cffeda55fClock|r] |cff00aa005.14.3.80000|r +## Title: Titan Panel [|cffeda55fClock|r] |cff00aa005.14.4.80000|r ## Notes: Adds a clock to Titan Panel ## Author: Titan Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 5.14.3.80000 +## Version: 5.14.4.80000 ## X-Child-Of: Titan TitanClock.xml diff --git a/TitanGold/TitanGold.toc b/TitanGold/TitanGold.toc index 728fc6b..1190c7b 100644 --- a/TitanGold/TitanGold.toc +++ b/TitanGold/TitanGold.toc @@ -1,10 +1,10 @@ ## Interface: 80000 -## Title: Titan Panel [|cffeda55fGold|r] |cff00aa005.14.3.80000|r +## Title: Titan Panel [|cffeda55fGold|r] |cff00aa005.14.4.80000|r ## Notes: Keeps track of all gold held by a player's toons on a per server/faction basis. ## Author: Titan Development Team (http://www.titanpanel.org) ## SavedVariables: GoldSave ## OptionalDeps: ## Dependencies: Titan -## Version: 5.14.3.80000 +## Version: 5.14.4.80000 ## X-Child-Of: Titan TitanGold.xml diff --git a/TitanLocation/TitanLocation.toc b/TitanLocation/TitanLocation.toc index f5f241e..6b558aa 100644 --- a/TitanLocation/TitanLocation.toc +++ b/TitanLocation/TitanLocation.toc @@ -1,10 +1,10 @@ ## Interface: 80000 -## Title: Titan Panel [|cffeda55fLocation|r] |cff00aa005.14.3.80000|r +## Title: Titan Panel [|cffeda55fLocation|r] |cff00aa005.14.4.80000|r ## Notes: Adds coordinates and location information to Titan Panel ## Author: Titan Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 5.14.3.80000 +## Version: 5.14.4.80000 ## X-Child-Of: Titan TitanLocation.xml diff --git a/TitanLootType/TitanLootType.toc b/TitanLootType/TitanLootType.toc index 0364a3c..b8b5986 100644 --- a/TitanLootType/TitanLootType.toc +++ b/TitanLootType/TitanLootType.toc @@ -1,10 +1,10 @@ ## Interface: 80000 -## Title: Titan Panel [|cffeda55fLootType|r] |cff00aa005.14.3.80000|r +## Title: Titan Panel [|cffeda55fLootType|r] |cff00aa005.14.4.80000|r ## Notes: Adds group loot and instance difficulty information to Titan Panel ## Author: Titan Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 5.14.3.80000 +## Version: 5.14.4.80000 ## X-Child-Of: Titan TitanLootType.xml diff --git a/TitanPerformance/TitanPerformance.lua b/TitanPerformance/TitanPerformance.lua index b0589ac..7317d5e 100644 --- a/TitanPerformance/TitanPerformance.lua +++ b/TitanPerformance/TitanPerformance.lua @@ -103,6 +103,13 @@ function TitanPanelPerformanceButton_OnEvent(self, event, ...) local count = GetNumAddOns(); local ActiveAddons = 0; local NumOfAddons = TitanGetVar(TITAN_PERFORMANCE_ID, "NumOfAddons"); +--[[ +Urnati - This was a kludge as I believe there was a conflict with other addons Ace3 +libraries as TitanGetVar is misbehaving. As such, I added the local NumOfAddons above +and added the following four lines of code looking for a nil when it shouldn't return +as the value defaults to 5. +I also added NumOfAddons below the TitanDebug to avoid the problem later on. +]] if NumOfAddons == nil then NumOfAddons = 5; TitanSetVar(TITAN_PERFORMANCE_ID, "NumOfAddons", 5); diff --git a/TitanPerformance/TitanPerformance.toc b/TitanPerformance/TitanPerformance.toc index 4652c87..26895bf 100644 --- a/TitanPerformance/TitanPerformance.toc +++ b/TitanPerformance/TitanPerformance.toc @@ -1,10 +1,10 @@ ## Interface: 80000 -## Title: Titan Panel [|cffeda55fPerformance|r] |cff00aa005.14.3.80000|r +## Title: Titan Panel [|cffeda55fPerformance|r] |cff00aa005.14.4.80000|r ## Notes: Adds FPS and Garbage collection information to Titan Panel ## Author: Titan Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 5.14.3.80000 +## Version: 5.14.4.80000 ## X-Child-Of: Titan TitanPerformance.xml diff --git a/TitanRepair/TitanRepair.toc b/TitanRepair/TitanRepair.toc index 860c312..5afbc76 100644 --- a/TitanRepair/TitanRepair.toc +++ b/TitanRepair/TitanRepair.toc @@ -1,10 +1,10 @@ ## Interface: 80000 -## Title: Titan Panel [|cffeda55fRepair|r] |cff00aa005.14.3.80000|r +## Title: Titan Panel [|cffeda55fRepair|r] |cff00aa005.14.4.80000|r ## Notes: Provides a configurable durability display. Also adds the ability to auto repair items and inventory at vendors ## Author: Titan Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 5.14.3.80000 +## Version: 5.14.4.80000 ## X-Child-Of: Titan TitanRepair.xml diff --git a/TitanVolume/TitanVolume.toc b/TitanVolume/TitanVolume.toc index 7e7c1f4..e9c1b3d 100644 --- a/TitanVolume/TitanVolume.toc +++ b/TitanVolume/TitanVolume.toc @@ -1,10 +1,10 @@ ## Interface: 80000 -## Title: Titan Panel [|cffeda55fVolume|r] |cff00aa005.14.3.80000|r +## Title: Titan Panel [|cffeda55fVolume|r] |cff00aa005.14.4.80000|r ## Notes: Adds a volume control icon on your Titan Bar ## Author: Titan Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 5.14.3.80000 +## Version: 5.14.4.80000 ## X-Child-Of: Titan TitanVolume.xml diff --git a/TitanXP/TitanXP.toc b/TitanXP/TitanXP.toc index fc51584..87b4e22 100644 --- a/TitanXP/TitanXP.toc +++ b/TitanXP/TitanXP.toc @@ -1,10 +1,10 @@ ## Interface: 80000 -## Title: Titan Panel [|cffeda55fXP|r] |cff00aa005.14.3.80000|r +## Title: Titan Panel [|cffeda55fXP|r] |cff00aa005.14.4.80000|r ## Notes: Adds information to Titan Panel about XP earned and time to level ## Author: Titan Development Team (http://www.titanpanel.org) ## SavedVariables: ## OptionalDeps: ## Dependencies: Titan -## Version: 5.14.3.80000 +## Version: 5.14.4.80000 ## X-Child-Of: Titan TitanXP.xml