From 14b20c28450877a193be166dbd66765cf4dd17b3 Mon Sep 17 00:00:00 2001 From: RBGDEV <149433862+rbgdevx@users.noreply.github.com> Date: Sun, 22 Dec 2024 15:00:50 -0500 Subject: [PATCH] adjusting background size code --- .vscode/settings.json | 44 +++++++++++++++++++++++++---------- BattlegroundWinConditions.toc | 2 +- CHANGELOG.md | 6 ++++- core/changelog.lua | 12 ++++++++++ core/config.lua | 3 +-- core/helpers.lua | 2 +- core/options.lua | 2 +- interface/banner.lua | 6 ++--- interface/orbs.lua | 2 +- 9 files changed, 57 insertions(+), 22 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 24a1da9..1182299 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,30 +1,50 @@ { + "Lua.runtime.version": "Lua 5.1", "Lua.diagnostics.globals": [ - "LE_PARTY_CATEGORY_HOME", - "LE_PARTY_CATEGORY_INSTANCE", - "SlashCmdList", + "FrameUtil", "GetPlayerFactionGroup", + "GetClassColor", + "FACTION_ALLIANCE", + "FACTION_HORDE", "SECONDS_PER_MIN", "SECONDS_PER_DAY", "SECONDS_PER_HOUR", "HOURS_MINUTES_SECONDS", "MINUTES_SECONDS", - "FACTION_ALLIANCE", - "FACTION_HORDE", - "SELECTED_CHAT_FRAME", - "DEFAULT_CHAT_FRAME", + "CopyTable", + "SlashCmdList", + "LE_PARTY_CATEGORY_HOME", + "LE_PARTY_CATEGORY_INSTANCE", + "UIParent", + "BackdropTemplateMixin", + "CLOSE", + "GameFontHighlightSmall", + "GameFontDisableSmall", + "GameTooltip", + "GameFontNormalSmall", + "FONT_COLOR_CODE_CLOSE", + "GameFontNormal", + "NORMAL_FONT_COLOR", + "GameFontHighlight", "ACCEPT", "CANCEL", "Settings", - "CLOSE", - "FONT_COLOR_CODE_CLOSE", + "GameFontHighlightLarge", "SetDesaturation", + "WOW_PROJECT_ID", + "WOW_PROJECT_MAINLINE", "ColorPickerFrame", + "ChatFontNormal", "OKAY", + "GameFontNormalHuge", + "GameFontDisableHuge", + "GameFontDisable", + "ButtonFrameTemplate_HidePortrait", + "AuraUtil", + "SELECTED_CHAT_FRAME", + "DEFAULT_CHAT_FRAME", "NOT_BOUND" ], - "stylua.targetReleaseVersion": "latest", - "Lua.runtime.version": "Lua 5.1", "Lua.runtime.builtin": { "basic": "disable", "debug": "disable", @@ -37,6 +57,6 @@ "utf8": "disable" }, "Lua.workspace.library": [ - "~\\.vscode\\extensions\\ketho.wow-api-0.17.4\\Annotations" + "~\\.vscode\\extensions\\ketho.wow-api-0.18.1\\Annotations" ] } diff --git a/BattlegroundWinConditions.toc b/BattlegroundWinConditions.toc index acb5313..564bb44 100644 --- a/BattlegroundWinConditions.toc +++ b/BattlegroundWinConditions.toc @@ -1,6 +1,6 @@ ## Interface: 110007 ## Title: BattlegroundWinConditions -## Version: 9.7.0 +## Version: 9.7.1 ## Author: RBGDEV ## Notes: Real time win conditions for battlegrounds ## OptionalDeps: AceConfig-3.0, AceGUI-3.0, AceGUI-3.0-SharedMediaWidgets, CallbackHandler-1.0, LibChangelog, LibSharedMedia-3.0, LibStub diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c3bd47..de5e3a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Battleground Win Conditions -## [v9.7.0](https://github.com/rbgdevx/battleground-win-conditions/releases/tag/v9.7.0) (2024-12-20) +## [v9.7.1](https://github.com/rbgdevx/battleground-win-conditions/releases/tag/v9.7.1) (2024-12-22) + +- Updating info and banner size updates based on recent bugs and testing + +## [v9.7.0](https://github.com/rbgdevx/battleground-win-conditions/releases/tag/v9.7.0) (2024-12-21) - Complete overhaul of map controller managing entering/exiting bgs and their state - Adding Deephaul Ravine to the list of maps, but not yet completed diff --git a/core/changelog.lua b/core/changelog.lua index 774a057..6f992eb 100644 --- a/core/changelog.lua +++ b/core/changelog.lua @@ -8,6 +8,18 @@ local Changelog = {} NS.Changelog = Changelog local changelog = { + { + Version = "9.7.1", + General = "Fixing minor background bug", + Sections = { + { + Header = "Bugfixes", + Entries = { + "Updating info and banner size updates based on recent bugs and testing", + }, + }, + }, + }, { Version = "9.7.0", General = "Major overhaul and cleanup", diff --git a/core/config.lua b/core/config.lua index 4b3ace8..93b0351 100644 --- a/core/config.lua +++ b/core/config.lua @@ -142,10 +142,9 @@ NS.userClassHexColor = "|c" .. select(4, GetClassColor(NS.userClass)) NS.ADDON_PREFIX = "BGWC_VERSION" NS.FoundNewVersion = false -NS.VERSION = 970 +NS.VERSION = 971 NS.DefaultDatabase = { - lastReadVersion = "9.6.22", onlyShowWhenNewVersion = true, global = { general = { diff --git a/core/helpers.lua b/core/helpers.lua index b74420b..65fa561 100644 --- a/core/helpers.lua +++ b/core/helpers.lua @@ -484,7 +484,7 @@ NS.UpdateInfoSize = function(frame, banner) return end - local maxWidth, maxHeight = 175, 25 + local maxWidth, maxHeight = 1, 1 for i = 1, frame:GetNumChildren() do local child = select(i, frame:GetChildren()) if child and child:IsShown() and child:GetAlpha() > 0 then -- Check if the child is visible and not fully transparent diff --git a/core/options.lua b/core/options.lua index 6ed0567..d77ed36 100644 --- a/core/options.lua +++ b/core/options.lua @@ -486,7 +486,7 @@ NS.AceConfig = { end else Info.bg:SetAlpha(0) - Banner.frame:SetWidth(175) + NS.UpdateInfoSize(Info.frame, Banner) if NS.IN_GAME and NS.IS_TEMPLE then Orbs:SetAnchor(Info.frame, 0, 0, "TOPLEFT", "TOPLEFT") diff --git a/interface/banner.lua b/interface/banner.lua index 4395cdc..3bcbf8a 100644 --- a/interface/banner.lua +++ b/interface/banner.lua @@ -124,6 +124,8 @@ function Banner:Start(duration, text) self:SetBackgroundColor(self.bg, BGColor) self:SetTextColor(self.text, TextColor) self:SetFont(self.text) + BannerFrame:SetWidth(175) + BannerFrame:SetHeight(25) self:SetScale(BannerFrame) self.remaining = mmin(mmax(0, duration), 1500) @@ -176,9 +178,7 @@ function Banner:Create(anchor) Text:SetPoint("CENTER", BG, "CENTER", 0, 0) BannerFrame:SetPoint("TOP", anchor, "BOTTOM", 0, 0) - BannerFrame:SetWidth(175) - BannerFrame:SetHeight(25) - self:SetScale(BannerFrame) + BannerFrame:SetSize(1, 1) -- Start with a minimal size Banner.bg = BG Banner.text = Text diff --git a/interface/orbs.lua b/interface/orbs.lua index 5e507d0..7bca21a 100644 --- a/interface/orbs.lua +++ b/interface/orbs.lua @@ -163,7 +163,7 @@ local function animationUpdate(frame, text, animationGroup) end Orbs:SetText(frame.buffText, orbsformat2, text) - -- frame.buffText:Hide() + -- frame.buffText:Hide() else local time = frame.exp - t frame.remaining = time