From c25974ffc3d507f1782b3b6b8722708e2b789631 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 21 Mar 2022 18:11:08 -0300 Subject: [PATCH] Bug fixes --- Libs/DF/auras.lua | 2 +- Libs/DF/fw.lua | 2 +- Libs/DF/panel.lua | 9 +++++++-- boot.lua | 6 +++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Libs/DF/auras.lua b/Libs/DF/auras.lua index d11877756..63ddf7650 100644 --- a/Libs/DF/auras.lua +++ b/Libs/DF/auras.lua @@ -70,7 +70,7 @@ function DF:LoadAllSpells (hashMap, indexTable, allSpellsSameName) DF.LoadingAuraAlertFrame:Show() - C_Timer.After (0.1, function() + C_Timer.After (0, function() if (hashMap and not indexTable) then for i = 1, CONST_MAX_SPELLS do local spellName = GetSpellInfo (i) diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index dbaa5397f..77db3afbd 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 292 +local dversion = 294 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary (major, minor) diff --git a/Libs/DF/panel.lua b/Libs/DF/panel.lua index ff5195e14..294fcdad6 100644 --- a/Libs/DF/panel.lua +++ b/Libs/DF/panel.lua @@ -3972,6 +3972,10 @@ DF.TabContainerFunctions.SelectIndex = function (self, fixedParam, menuIndex) mainFrame.AllButtons[menuIndex].selectedUnderlineGlow:Show() end mainFrame.CurrentIndex = menuIndex + + if (mainFrame.hookList.OnSelectIndex) then + DF:QuickDispatch(mainFrame.hookList.OnSelectIndex, mainFrame, mainFrame.AllButtons[menuIndex]) + end end DF.TabContainerFunctions.SetIndex = function (self, index) @@ -3983,7 +3987,7 @@ local tab_container_on_show = function (self) self.SelectIndex (self.AllButtons[index], nil, index) end -function DF:CreateTabContainer (parent, title, frame_name, frameList, options_table) +function DF:CreateTabContainer (parent, title, frame_name, frameList, options_table, hookList) local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE") local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE") @@ -4004,6 +4008,7 @@ function DF:CreateTabContainer (parent, title, frame_name, frameList, options_ta local mainFrame = CreateFrame ("frame", frame_name, parent.widget or parent, "BackdropTemplate") mainFrame:SetAllPoints() DF:Mixin (mainFrame, DF.TabContainerFunctions) + mainFrame.hookList = hookList local mainTitle = DF:CreateLabel (mainFrame, title, 24, "white") mainTitle:SetPoint ("topleft", mainFrame, "topleft", 10, -30 + y_offset) @@ -4032,7 +4037,7 @@ function DF:CreateTabContainer (parent, title, frame_name, frameList, options_ta local title = DF:CreateLabel (f, frame.title, 16, "silver") title:SetPoint ("topleft", mainTitle, "bottomleft", 0, 0) - local tabButton = DF:CreateButton (mainFrame, DF.TabContainerFunctions.SelectIndex, button_width, button_height, frame.title, i, nil, nil, nil, nil, false, button_tab_template) + local tabButton = DF:CreateButton (mainFrame, DF.TabContainerFunctions.SelectIndex, button_width, button_height, frame.title, i, nil, nil, nil, "$parentTabButton" .. frame.name, false, button_tab_template) PixelUtil.SetSize (tabButton, button_width, button_height) tabButton:SetFrameLevel (220) tabButton.textsize = button_text_size diff --git a/boot.lua b/boot.lua index 904790173..f47406d75 100644 --- a/boot.lua +++ b/boot.lua @@ -6,8 +6,8 @@ local version, build, date, tocversion = GetBuildInfo() - _detalhes.build_counter = 9720 - _detalhes.alpha_build_counter = 9720 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 9721 + _detalhes.alpha_build_counter = 9721 --if this is higher than the regular counter, use it instead _detalhes.bcc_counter = 31 _detalhes.dont_open_news = true _detalhes.game_version = version @@ -424,7 +424,7 @@ do _detalhes.playerdetailwindow_skins = {} _detalhes.BitfieldSwapDebuffsIDs = {265646, 272407, 269691, 273401, 269131, 260900, 260926, 284995, 292826, 311367, 310567, 308996, 307832, 327414, 337253, - 36797, 37122} + 36797, 37122, 362397} --> auto run code _detalhes.RunCodeTypes = {