Skip to content

Commit

Permalink
Merge branch 'ptr'
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Oct 29, 2024
2 parents 5571aa1 + 4807191 commit 9ae2f1f
Show file tree
Hide file tree
Showing 31 changed files with 377 additions and 379 deletions.
8 changes: 5 additions & 3 deletions ElvUI/Cata/Modules/Skins/Achievement.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ local select = select
local bitband = bit.band

local hooksecurefunc = hooksecurefunc
local IsInGuild = IsInGuild
local GetAchievementCriteriaInfo = GetAchievementCriteriaInfo
local GetAchievementNumCriteria = GetAchievementNumCriteria

Expand Down Expand Up @@ -273,9 +274,9 @@ function S:Blizzard_AchievementUI()

S:HandleCloseButton(_G.AchievementFrameCloseButton, AchievementFrame.backdrop)

S:HandleDropDownBox(_G.AchievementFrameFilterDropDown)
_G.AchievementFrameFilterDropDown:ClearAllPoints()
_G.AchievementFrameFilterDropDown:Point('TOPLEFT', _G.AchievementFrameAchievements, 'TOPLEFT', -18, 24)
S:HandleDropDownBox(_G.AchievementFrameFilterDropdown)
_G.AchievementFrameFilterDropdown:ClearAllPoints()
_G.AchievementFrameFilterDropdown:Point('TOPLEFT', _G.AchievementFrameAchievements, 'TOPLEFT', -18, 24)

-- ScrollBars
local scrollBars = {
Expand All @@ -302,6 +303,7 @@ function S:Blizzard_AchievementUI()
_G.AchievementFrameTab1:ClearAllPoints()
_G.AchievementFrameTab1:Point('TOPLEFT', _G.AchievementFrame, 'BOTTOMLEFT', -10, 0)
_G.AchievementFrameTab2:Point('TOPLEFT', _G.AchievementFrameTab1, 'TOPRIGHT', -19, 0)
_G.AchievementFrameTab3:Point('TOPLEFT', IsInGuild() and _G.AchievementFrameTab2 or _G.AchievementFrameTab1, 'TOPRIGHT', -19, 0)

SkinStatusBar(_G.AchievementFrameSummaryCategoriesStatusBar)

Expand Down
2 changes: 1 addition & 1 deletion ElvUI/Cata/Modules/Skins/AddonManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function S:AddonList()
S:HandleButton(AddonList.OkayButton, true)
S:HandleButton(AddonList.CancelButton, true)
S:HandleScrollBar(_G.AddonListScrollFrameScrollBar)
S:HandleDropDownBox(_G.AddonCharacterDropDown)
S:HandleDropDownBox(AddonList.Dropdown, 165)
S:HandleCheckBox(_G.AddonListForceLoad)

_G.AddonListForceLoad:Size(26)
Expand Down
6 changes: 3 additions & 3 deletions ElvUI/Cata/Modules/Skins/Archaeology.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ function S:Blizzard_ArchaeologyUI()
S:HandleButton(ArchaeologyFrame.artifactPage.solveFrame.solveButton, true)
S:HandleButton(ArchaeologyFrame.artifactPage.backButton, true)

S:HandleDropDownBox(_G.ArchaeologyFrame.raceFilterDropDown)
_G.ArchaeologyFrame.raceFilterDropDown.Text:ClearAllPoints()
_G.ArchaeologyFrame.raceFilterDropDown.Text:Point('LEFT', _G.ArchaeologyFrame.raceFilterDropDown.backdrop, 'LEFT', 4, 0)
S:HandleDropDownBox(_G.ArchaeologyFrameRaceFilter)
_G.ArchaeologyFrameRaceFilter.Text:ClearAllPoints()
_G.ArchaeologyFrameRaceFilter.Text:Point('LEFT', _G.ArchaeologyFrameRaceFilter.backdrop, 'LEFT', 4, 0)

if E.private.skins.parchmentRemoverEnable then
_G.ArchaeologyFrameBgLeft:Kill()
Expand Down
6 changes: 2 additions & 4 deletions ElvUI/Cata/Modules/Skins/AuctionHouse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,8 @@ function S:Blizzard_AuctionUI()

_G.BrowseCloseButton:Point('BOTTOMRIGHT', 66, 6)
_G.BrowseBuyoutButton:Point('RIGHT', _G.BrowseCloseButton, 'LEFT', -4, 0)
_G.BrowseBidButton:Point('RIGHT', _G.BrowseBuyoutButton, 'LEFT', -4, 0)

_G.BrowseBidPrice:Point('BOTTOM', 25, 10)
_G.BrowseBidPrice:Point('BOTTOM', -102, 10)

S:HandleScrollBar(_G.BrowseFilterScrollFrameScrollBar)
S:HandleScrollBar(_G.BrowseScrollFrameScrollBar)
Expand Down Expand Up @@ -233,8 +232,7 @@ function S:Blizzard_AuctionUI()
S:HandleRadioButton(_G.AuctionsMediumAuctionButton)
S:HandleRadioButton(_G.AuctionsLongAuctionButton)

S:HandleDropDownBox(_G.BrowseDropDown, 155)
S:HandleDropDownBox(_G.PriceDropDown)
S:HandleDropDownBox(_G.BrowseDropdown, 155)

-- Progress Frame
_G.AuctionProgressFrame:StripTextures()
Expand Down
122 changes: 3 additions & 119 deletions ElvUI/Cata/Modules/Skins/BlizzardOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,87 +5,10 @@ local _G = _G
local ipairs, pairs, next = ipairs, pairs, next

local hooksecurefunc = hooksecurefunc
local InCombatLockdown = InCombatLockdown

local function HandlePushToTalkButton(button)
button:Size(button:GetSize())

button.TopLeft:Hide()
button.TopRight:Hide()
button.BottomLeft:Hide()
button.BottomRight:Hide()
button.TopMiddle:Hide()
button.MiddleLeft:Hide()
button.MiddleRight:Hide()
button.BottomMiddle:Hide()
button.MiddleMiddle:Hide()
button:SetHighlightTexture(E.ClearTexture)

button:SetTemplate(nil, true)
button:HookScript('OnEnter', S.SetModifiedBackdrop)
button:HookScript('OnLeave', S.SetOriginalBackdrop)
end

local function Skin_InterfaceOptions_Buttons()
for i = 1, #_G.INTERFACEOPTIONS_ADDONCATEGORIES do
local button = _G['InterfaceOptionsFrameAddOnsButton'..i..'Toggle']
if button and not button.IsSkinned then
S:HandleCollapseTexture(button, true)
button.IsSkinned = true
end
end
end

local function ReskinPickerOptions(self)
local scrollTarget = self.ScrollBox.ScrollTarget
if scrollTarget then
for _, child in next, { scrollTarget:GetChildren() } do
if not child.IsSkinned then
child.UnCheck:SetTexture(nil)
child.Highlight:SetColorTexture(1, .82, 0, 0.4)

local check = child.Check
if check then
check:SetColorTexture(1, .82, 0, 0.8)
check:SetSize(10, 10)
check:Point('LEFT', 2, 0)
check:CreateBackdrop('Transparent')
end

child.IsSkinned = true
end
end
end
end

local function HandleVoicePicker(voicePicker)
local customFrame = voicePicker:GetChildren()
customFrame:StripTextures()
customFrame:CreateBackdrop('Transparent')
voicePicker:HookScript('OnShow', ReskinPickerOptions)
end

function S.AudioOptionsVoicePanel_InitializeCommunicationModeUI(btn)
HandlePushToTalkButton(btn.PushToTalkKeybindButton)
end

function S:BlizzardOptions()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.blizzardOptions) then return end

_G.InterfaceOptionsFrame:SetClampedToScreen(true)
_G.InterfaceOptionsFrame:SetMovable(true)
_G.InterfaceOptionsFrame:EnableMouse(true)
_G.InterfaceOptionsFrame:RegisterForDrag('LeftButton', 'RightButton')
_G.InterfaceOptionsFrame:SetScript('OnDragStart', function(frame)
if InCombatLockdown() then return end
frame:StartMoving()
frame.isMoving = true
end)
_G.InterfaceOptionsFrame:SetScript('OnDragStop', function(frame)
frame:StopMovingOrSizing()
frame.isMoving = false
end)

--Chat Config
local ChatConfigFrame = _G.ChatConfigFrame

Expand Down Expand Up @@ -213,7 +136,7 @@ function S:BlizzardOptions()
return
end
for index in ipairs(frame.checkBoxTable) do
local checkBoxNameString = frame:GetName()..'CheckBox'
local checkBoxNameString = frame:GetName()..'Checkbox'
local checkBoxName = checkBoxNameString..index
local checkBox = _G[checkBoxName]
local check = _G[checkBoxName..'Check']
Expand All @@ -230,13 +153,13 @@ function S:BlizzardOptions()

hooksecurefunc('ChatConfig_UpdateTieredCheckboxes', function(frame, index)
local group = frame.checkBoxTable[index]
local checkBox = _G[frame:GetName()..'CheckBox'..index]
local checkBox = _G[frame:GetName()..'Checkbox'..index]
if checkBox then
S:HandleCheckBox(checkBox)
end
if group.subTypes then
for k in ipairs(group.subTypes) do
S:HandleCheckBox(_G[frame:GetName()..'CheckBox'..index..'_'..k])
S:HandleCheckBox(_G[frame:GetName()..'Checkbox'..index..'_'..k])
end
end
end)
Expand Down Expand Up @@ -332,22 +255,12 @@ function S:BlizzardOptions()
end
end

_G.InterfaceOptionsFrameTab1:Point('BOTTOMLEFT', _G.InterfaceOptionsFrameCategories, 'TOPLEFT', 6, 1)
S:HandleButton(_G.InterfaceOptionsFrameTab1)
_G.InterfaceOptionsFrameTab2:Point('TOPLEFT', _G.InterfaceOptionsFrameTab1, 'TOPRIGHT', 1, 0)
S:HandleButton(_G.InterfaceOptionsFrameTab2)

-- Plus minus buttons in addons category
hooksecurefunc('InterfaceOptions_AddCategory', Skin_InterfaceOptions_Buttons)
Skin_InterfaceOptions_Buttons()

-- Create New Raid Profle
local newProfileDialog = _G.CompactUnitFrameProfilesNewProfileDialog
if newProfileDialog then
newProfileDialog:StripTextures()
newProfileDialog:CreateBackdrop('Transparent')

S:HandleDropDownBox(_G.CompactUnitFrameProfilesNewProfileDialogBaseProfileSelector)
S:HandleButton(_G.CompactUnitFrameProfilesNewProfileDialogCreateButton)
S:HandleButton(_G.CompactUnitFrameProfilesNewProfileDialogCancelButton)

Expand All @@ -367,27 +280,6 @@ function S:BlizzardOptions()
S:HandleButton(_G.CompactUnitFrameProfilesDeleteProfileDialogCancelButton)
end

-- Colorblind Submenu
S:HandleDropDownBox(_G.InterfaceOptionsColorblindPanelColorFilterDropDown, 260)
S:HandleSliderFrame(_G.InterfaceOptionsColorblindPanelColorblindStrengthSlider)

-- Toggle Test Audio Button
S:HandleButton(_G.AudioOptionsVoicePanel.TestInputDevice.ToggleTest)

local VUMeter = _G.AudioOptionsVoicePanelTestInputDevice.VUMeter
VUMeter.NineSlice:Hide()
VUMeter.Status:CreateBackdrop()
VUMeter.Status:SetStatusBarTexture(E.media.normTex)
E:RegisterStatusBar(VUMeter.Status)

-- PushToTalk KeybindButton
hooksecurefunc('AudioOptionsVoicePanel_InitializeCommunicationModeUI', S.AudioOptionsVoicePanel_InitializeCommunicationModeUI)

-- New Voice Sliders
S:HandleSliderFrame(_G.UnitPopupVoiceSpeakerVolume.Slider)
S:HandleSliderFrame(_G.UnitPopupVoiceMicrophoneVolume.Slider)
S:HandleSliderFrame(_G.UnitPopupVoiceUserVolume.Slider)

-- TextToSpeech
_G.TextToSpeechButton:StripTextures()

Expand All @@ -396,11 +288,6 @@ function S:BlizzardOptions()
S:HandleButton(_G.TextToSpeechDefaultButton)
S:HandleCheckBox(_G.TextToSpeechCharacterSpecificButton)

S:HandleDropDownBox(_G.TextToSpeechFrameTtsVoiceDropdown)
S:HandleDropDownBox(_G.TextToSpeechFrameTtsVoiceAlternateDropdown)
S:HandleSliderFrame(_G.TextToSpeechFrameAdjustRateSlider)
S:HandleSliderFrame(_G.TextToSpeechFrameAdjustVolumeSlider)

for _, checkbox in pairs({ -- check boxes
'PlayActivitySoundWhenNotFocusedCheckButton',
'PlaySoundSeparatingChatLinesCheckButton',
Expand All @@ -424,9 +311,6 @@ function S:BlizzardOptions()
end
end
end)

HandleVoicePicker(_G.TextToSpeechFrameTtsVoicePicker)
HandleVoicePicker(_G.TextToSpeechFrameTtsVoiceAlternatePicker)
end

S:AddCallback('BlizzardOptions')
Loading

0 comments on commit 9ae2f1f

Please sign in to comment.