From bbe4459be868e9d12cca02d95b3dec74436b6add Mon Sep 17 00:00:00 2001 From: wutname1 Date: Mon, 12 Aug 2024 00:40:37 -0500 Subject: [PATCH] BugFix for GameMenu --- Core/Skins/Blizzard/Base.lua | 4 +--- Core/Skins/Blizzard/GameMenu.lua | 4 +++- Core/Skins/Core.lua | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Core/Skins/Blizzard/Base.lua b/Core/Skins/Blizzard/Base.lua index c9ade500..c7549569 100644 --- a/Core/Skins/Blizzard/Base.lua +++ b/Core/Skins/Blizzard/Base.lua @@ -36,9 +36,7 @@ local function OnEnable() if not SUI.Skins.DB.Blizzard.GameMenu then SUI.Skins.DB.Blizzard.GameMenu = {} end if not SUI.Skins.DB.Blizzard.GameMenu.Scale then SUI.Skins.DB.Blizzard.GameMenu.Scale = 0.8 end - if SUI:IsAddonDisabled('Skinner') and SUI:IsAddonDisabled('ConsolePort') then - GameMenuFrame:SetScale(SUI.Skins.DB.Blizzard.GameMenu.Scale) - else + if SUI:IsAddonEnabled('Skinner') or SUI:IsAddonEnabled('ConsolePort') then if GameMenuFrame.SUI then return end local button = CreateFrame('Button', 'SUI_GameMenuButton', GameMenuFrame, 'MainMenuFrameButtonTemplate') diff --git a/Core/Skins/Blizzard/GameMenu.lua b/Core/Skins/Blizzard/GameMenu.lua index 1587fa26..c02f93fe 100644 --- a/Core/Skins/Blizzard/GameMenu.lua +++ b/Core/Skins/Blizzard/GameMenu.lua @@ -45,6 +45,7 @@ function SUIGameMenu:IsDisabled() end function SUIGameMenu:OnEnable() + if SUIGameMenu:IsDisabled() then return end -- Set up hooks GameMenuFrame:HookScript('OnShow', function() if SUIGameMenu:IsDisabled() then return end @@ -70,6 +71,7 @@ function SUIGameMenu:OnEnable() MenuSkin.BottomLine:SetAlpha(0.5) hooksecurefunc(GameMenuFrame, 'Layout', function() + if SUIGameMenu:IsDisabled() then return end MenuSkin:OnFrameShown(GameMenuFrame:IsShown()) end) end @@ -198,7 +200,7 @@ end function MenuSkin:OnFrameShown(showMenu) if showMenu then - GameMenuFrame:SetScale(SUI.Skins.DB.Blizzard.GameMenu.Scale) + GameMenuFrame:SetScale(SUI.Skins.DB.Blizzard.GameMenu.Scale or 0.8) self:ResetAnimation() self:OnDataLoaded() self:InterpolatePoints(GameMenuFrame) diff --git a/Core/Skins/Core.lua b/Core/Skins/Core.lua index a69a90c6..e4ac80b5 100644 --- a/Core/Skins/Core.lua +++ b/Core/Skins/Core.lua @@ -5,6 +5,11 @@ local module = SUI:NewModule('Handler.Skins') ---@class SkinDB local DBDefaults = { + Blizzard = { + GameMenu = { + Scale = 0.8, + }, + }, components = { ['**'] = { enabled = true,