Skip to content

Commit

Permalink
adjusting background size code
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgdevx committed Dec 22, 2024
1 parent 2f78d95 commit 14b20c2
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 22 deletions.
44 changes: 32 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
]
}
2 changes: 1 addition & 1 deletion BattlegroundWinConditions.toc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 12 additions & 0 deletions core/changelog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions core/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion core/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions interface/banner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion interface/orbs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 14b20c2

Please sign in to comment.