General development and bug fixes (see commit description).

- Fixed the deaths display, where the windows wasn't usig custom text scripts.
- Fixed an issue with custom displays, where it was unable to use class colors in their texts.
- More development and bug fixes on the new Mythic+ Run Completion panel.
- Framework Update.
This commit is contained in:
Tercio Jose
2024-02-13 13:24:28 -03:00
parent 18e7464cef
commit 2fd02eebb1
19 changed files with 5685 additions and 1758 deletions
+45
View File
@@ -722,6 +722,51 @@ function detailsFramework:NewTextEntry(parent, container, name, member, width, h
return newTextEntryObject, withLabel
end
---create a search box with no backdrop, a magnifying glass icon and a clear search button
---@param parent frame
---@param callback any
---@return df_textentry
function detailsFramework:CreateSearchBox(parent, callback)
local onSearchPressEnterCallback = function(_, _, text, self)
callback(self)
end
local searchBox = detailsFramework:CreateTextEntry(parent, onSearchPressEnterCallback, 220, 26)
searchBox:SetAsSearchBox()
searchBox:SetTextInsets(25, 5, 0, 0)
searchBox:SetBackdrop(nil)
searchBox:SetHook("OnTextChanged", callback)
local file, size, flags = searchBox:GetFont()
searchBox:SetFont(file, 12, flags)
searchBox.ClearSearchButton:SetAlpha(0)
searchBox.BottomLineTexture = searchBox:CreateTexture(nil, "border")
searchBox.BottomLineTexture:SetPoint("bottomleft", searchBox.widget, "bottomleft", -15, 0)
searchBox.BottomLineTexture:SetPoint("bottomright", searchBox.widget, "bottomright", 0, 0)
local bUseAtlasSize = false
searchBox.BottomLineTexture:SetAtlas("common-slider-track")
searchBox.BottomLineTexture:SetHeight(8)
--create the button to clear the search box
searchBox.ClearSearchButton = CreateFrame("button", nil, searchBox.widget, "UIPanelCloseButton")
searchBox.ClearSearchButton:SetPoint("right", searchBox.widget, "right", -3, 0)
searchBox.ClearSearchButton:SetSize(10, 10)
searchBox.ClearSearchButton:SetAlpha(0.3)
searchBox.ClearSearchButton:GetNormalTexture():SetAtlas("common-search-clearbutton")
searchBox.ClearSearchButton:GetHighlightTexture():SetAtlas("common-search-clearbutton")
searchBox.ClearSearchButton:GetPushedTexture():SetAtlas("common-search-clearbutton")
searchBox.ClearSearchButton:SetScript("OnClick", function()
searchBox:SetText("")
searchBox:PressEnter()
searchBox:ClearFocus()
end)
return searchBox
end
function detailsFramework:NewSpellEntry(parent, func, width, height, param1, param2, member, name)
local editbox = detailsFramework:NewTextEntry(parent, parent, name, member, width, height, func, param1, param2)
return editbox