Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Merathilis committed Nov 8, 2023
2 parents efefb94 + e8fbb8f commit ff7b4c5
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 104 deletions.
6 changes: 3 additions & 3 deletions ElvUI_MerathilisUI/ElvUI_MerathilisUI.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 100107
## Interface: 100200
## Author: Merathilis
## Version: @project-version@
## Title: |cFF1784d1ElvUI|r |cffffffffMerathilis|r|cffff7d0aUI|r
Expand All @@ -12,13 +12,13 @@
## SavedVariablesPerCharacter: MERDataPerChar
## OptionalDeps: SharedMedia, BigWigs, ls_Toasts, WeakAuras, WeakAurasOptions
## X-Credits: Simpy, Benik, Azilroka, Darth Predator, fang2hou, fgprodigal, siweia, Solor, Elv, Blazeflack & all AddOn Authors who inspired me.
## X-ElvUIVersion: 13.46
## X-ElvUIVersion: 13.47
## X-Curse-Project-Name: MerathilisUI
## X-Curse-Project-ID: 97589
## X-WoWI-ID: 24117
## X-Wago-ID: VBNBZVNx

## X-Interface: 100107
## X-Interface: 100200
## X-Tukui-ProjectID: 1
## X-Tukui-ProjectFolders: ElvUI_MerathilisUI

Expand Down
1 change: 1 addition & 0 deletions ElvUI_MerathilisUI/Modules/LocPanel/LocPanel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ module.Hearthstones = {
{190237, nil, true}, -- Broker Translocation Matrix
{193588, nil, true}, -- Timewalker's Hearthstone
{200630, nil, true}, -- Ohn'ir Windsage's Hearthstone
{208704, nil, true}, -- Deepdweller's Earthen Hearthstone
}

module.PortItems = {
Expand Down
4 changes: 3 additions & 1 deletion ElvUI_MerathilisUI/Modules/MicroBar/MicroBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ local hearthstones = {
188952,
190237,
193588,
200630
200630,
208704
}

local hearthstoneAndToyIDList = {
Expand Down Expand Up @@ -129,6 +130,7 @@ local hearthstoneAndToyIDList = {
190237,
193588,
200630,
208704,
---------------------
48933,
87215,
Expand Down
172 changes: 78 additions & 94 deletions ElvUI_MerathilisUI/Modules/Skins/Extern/Auctionator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,15 @@ local function HandleTab(tab)
tab.Text.SetPoint = E.noop
end

local function SkinItem(item, info)
if not item.backdrop then
item:CreateBackdrop(nil, nil, nil, nil, nil, nil, nil, nil, true)
item:StyleButton()
item.backdrop:SetAllPoints()

S:HandleIconBorder(item.IconBorder, item.backdrop)
end

local p1, anchor, p2, x, y = item:GetPoint()
item:SetPoint(p1, anchor, p2, x+2, y+1)

if info and info.selected then
local r, g, b, a = item.IconBorder:GetVertexColor()
item.Icon.backdrop:SetBackdropBorderColor(r, g, b, a)
end
local function buyIconName(frame)
S:HandleIcon(frame.Icon, true)
S:HandleIconBorder(frame.QualityBorder, frame.Icon.backdrop)
end

local function viewGroup(frame)
if frame.GroupTitle then
frame.GroupTitle:StripTextures()
S:HandleButton(frame.GroupTitle)
S:HandleButton(frame.GroupTitle, true)
end
end

Expand Down Expand Up @@ -433,51 +420,77 @@ local function craftingInfoProfessionsFrame(frame)
S:HandleButton(frame.SearchButton)
end

local function tryPostHook(...)
local frame, method, hookFunc = ...
if frame and method and _G[frame] and _G[frame][method] then
hooksecurefunc(_G[frame], method, function(frame, ...)
if not frame.__MERSkin then
hookFunc(frame, ...)
frame.__MERSkin = true
end
end)
else
module:Log("debug", "Failed to hook: " .. tostring(frame) .. " " .. tostring(method))
local function buyCommodity(frame)
S:HandleButton(frame.BackButton)
frame:StripTextures()

local container = frame.DetailsContainer
if not container then
return
end

S:HandleButton(container.BuyButton)
S:HandleEditBox(container.Quantity)
container.Quantity:SetTextInsets(0, 0, 0, 0)

for _, child in pairs({ frame:GetChildren() }) do
if child:IsObjectType("Button") and child.iconAtlas and child.iconAtlas == "UI-RefreshButton" then
S:HandleButton(child)
break
end
end
end

local CustomizeElements = { 'FocusButton', 'DeleteButton', 'HideButton', 'RenameButton', 'ShiftDownButton', 'ShiftUpButton', 'NewGroupButton' }
local function HandleCustomiseElements(frame)
for i, name in next, CustomizeElements do
local button = frame[name]
if button then
S:HandleButton(button)
local function groupsCustomiseDuration(frame)
for _, child in pairs({ frame.Short, frame.Medium, frame.Long, frame.Default }) do
if child then
S:HandleRadioButton(child)
end
end
end

local function groupsCustomise(frame)
frame:StripTextures()
frame:SetTemplate("Transparent")
module:CreateShadow(frame)
frame:Styling()

S:HandleCloseButton(frame.CloseButton)
S:HandleButton(frame.BackButton)
S:HandleButton(frame.NewGroupButton)
S:HandleTrimScrollBar(frame.View.ScrollBar)
frame.View.ScrollBox:CreateBackdrop("Transparent")
end

local function groupsCustomiseGroup(frame)
for i, child in pairs(
{
frame.FocusButton,
frame.RenameButton,
frame.DeleteButton,
frame.HideButton,
frame.ShiftUpButton,
frame.ShiftDownButton
}
) do
if child then
S:HandleButton(child)

if i == 1 then
-- adjust the points
local p1, anchor, p2, x, y = button:GetPoint()
button:SetPoint(p1, anchor, p2, x, y+1)
local p1, anchor, p2, x, y = child:GetPoint()
child:SetPoint(p1, anchor, p2, x, y + 1)
end
end
end

local durations = frame.Durations
if durations then
S:HandleRadioButton(durations.Default)
S:HandleRadioButton(durations.Long)
S:HandleRadioButton(durations.Medium)
S:HandleRadioButton(durations.Short)
end

local quanity = frame.Quantity
if quanity then
S:HandleEditBox(quanity.Quantity)
if frame.DividerContainer then
frame.DividerContainer:StripTextures()
end

local dividerContainer = frame.DividerContainer
if dividerContainer then
dividerContainer.Divider:StripTextures()
if frame.Quantity and frame.Quantity.Quantity then
S:HandleEditBox(frame.Quantity.Quantity)
frame.Quantity.Quantity:SetTextInsets(0, 0, 0, 0)
end

local focused = frame.FocussedBackground
Expand All @@ -491,50 +504,20 @@ local function HandleCustomiseElements(frame)
end
end

local function GroupsCustomise_UpdateFromExisting(view)
for _, frame in next, view.groups do
if not frame.template then
frame:SetTemplate('Transparent')

HandleCustomiseElements(frame)
end

for _, button in next, frame.buttons do
if button.itemInfo then
SkinItem(button, button.itemInfo)
local function tryPostHook(...)
local frame, method, hookFunc = ...
if frame and method and _G[frame] and _G[frame][method] then
hooksecurefunc(_G[frame], method, function(frame, ...)
if not frame.__MERSkin then
hookFunc(frame, ...)
frame.__MERSkin = true
end
end
end

local groups = _G.Auctionator.Groups
if groups.viewFirstShow then
groups.viewFirstShow = nil

view:UpdateGroupHeights()
end)
else
module:Log("debug", "Failed to hook: " .. tostring(frame) .. " " .. tostring(method))
end
end

local function OpenCustomiseView()
local customize = _G.AuctionatorGroupsCustomiseFrame
customize.NineSlice:StripTextures()
customize:SetTemplate('Transparent')
module:CreateShadow(customize)
customize:Styling()

customize.Bg:StripTextures()
customize.TopTileStreaks:StripTextures()

customize.BackButton:Point('TOPRIGHT', -25, -28)
customize.NewGroupButton:Point('TOPLEFT', 7, -28)

S:HandleButton(customize.BackButton)
S:HandleButton(customize.NewGroupButton)
S:HandleCloseButton(customize.CloseButton)
S:HandleTrimScrollBar(customize.View.ScrollBar)

hooksecurefunc(customize.View, 'UpdateFromExisting', GroupsCustomise_UpdateFromExisting)
end

function module:Auctionator()
if not E.private.mui.skins.addonSkins.enable or not E.private.mui.skins.addonSkins.au then
return
Expand All @@ -543,6 +526,8 @@ function module:Auctionator()
module:DisableAddOnSkins("Auctionator", false)

-- widgets
tryPostHook("GroupsCustomiseDurationMixin", "OnLoad", groupsCustomiseDuration)
tryPostHook("AuctionatorBuyIconNameTemplateMixin", "SetItem", buyIconName)
tryPostHook("AuctionatorGroupsViewGroupMixin", "SetName", viewGroup)
tryPostHook("AuctionatorGroupsViewItemMixin", "SetItemInfo", viewItem)
tryPostHook("AuctionatorConfigCheckboxMixin", "OnLoad", configCheckbox)
Expand Down Expand Up @@ -581,10 +566,9 @@ function module:Auctionator()
tryPostHook("AuctionatorCraftingInfoProfessionsFrameMixin", "OnLoad", craftingInfoProfessionsFrame)
tryPostHook("AuctionatorShoppingItemMixin", "OnLoad", shoppingItem)
tryPostHook("AuctionatorSplashScreenMixin", "OnLoad", splashFrame)

local groups = _G.Auctionator.Groups
groups.viewFirstShow = true -- fixes the page bugging out on first show
hooksecurefunc(groups, 'OpenCustomiseView', OpenCustomiseView)
tryPostHook("AuctionatorBuyCommodityFrameTemplateMixin", "OnLoad", buyCommodity)
tryPostHook("AuctionatorGroupsCustomiseMixin", "OnLoad", groupsCustomise)
tryPostHook("AuctionatorGroupsCustomiseGroupMixin", "OnLoad", groupsCustomiseGroup)
end

module:AddCallbackForAddon("Auctionator")
4 changes: 2 additions & 2 deletions ElvUI_MerathilisUI/Modules/Skins/FrameXML/GossipFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ local function ReplaceGossipText(button, text)
end
end

local function LoadSkin()
function module:GossipFrame()
if not module:CheckDB("gossip", "gossip") then
return
end
Expand Down Expand Up @@ -79,4 +79,4 @@ local function LoadSkin()
MER.NPC:Register(GossipFrame)
end

S:AddCallback("GossipFrame", LoadSkin)
module:AddCallback("GossipFrame")
4 changes: 2 additions & 2 deletions ElvUI_MerathilisUI/Modules/Tooltip/GradientName.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ local T = MER:GetModule('MER_Tooltip')
local TT = E:GetModule('Tooltip')

local _G = _G
local gsub = string.gsub

local UnitClass = UnitClass
local UnitIsPlayer = UnitIsPlayer
Expand Down Expand Up @@ -61,9 +60,10 @@ end
function T:ApplyTooltipStyle(tt)
if not tt then return end
local db = E.db.mui.gradient
if not db.enable then
if not db.enable or not E.db.mui.tooltip.gradientName then
return
end

if _G.GameTooltip and _G.GameTooltip:IsForbidden() then return end

local _, unitId = _G.GameTooltip:GetUnit()
Expand Down
4 changes: 2 additions & 2 deletions ElvUI_MerathilisUI/Settings/Profile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,7 @@ P.locPanel = {
cdFormat = "DEFAULT",
ignoreMissingInfo = false,
showHearthstones = true,
hsPrio =
"54452,200630,193588,190237,64488,93672,142542,162973,163045,165669,165670,165802,166746,166747,168907,172179,180290,182773,184353,183716,188952,140192,110560",
hsPrio = "54452,200630,193588,190237,64488,93672,142542,162973,163045,165669,165670,165802,166746,166747,168907,172179,180290,182773,184353,183716,188952,140192,110560,208704",
showToys = true,
showSpells = true,
showEngineer = true,
Expand Down Expand Up @@ -1663,6 +1662,7 @@ P.tooltip = {
factionIcon = true,
petIcon = true,
petId = true,
gradientName = false,
}

P.itemLevel = {
Expand Down

0 comments on commit ff7b4c5

Please sign in to comment.