Skip to content

Commit

Permalink
Merge pull request #59 from caboyd/classic-4379
Browse files Browse the repository at this point in the history
Add font size slider for buff with stacks
  • Loading branch information
caboyd authored Nov 23, 2024
2 parents 9e25147 + aa00c52 commit 0c66a5d
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 9 deletions.
3 changes: 2 additions & 1 deletion LunaUnitFrames.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Luna Unit Frames 4.0 by Aviana

LUF = select(2, ...)
LUF.version = 4378
LUF.version = 4379

local L = LUF.L
local ACR = LibStub("AceConfigRegistry-3.0", true)
Expand Down Expand Up @@ -848,6 +848,7 @@ function LUF.ApplySettings(frame)
Auras.debuffFilter = AuraConfig.filterdebuffs
Auras.debuffSize = AuraConfig.debuffsize
Auras.largeDebuffSize = AuraConfig.enlargeddebuffsize
Auras.buffcountfontsize = AuraConfig.buffcountfontsize
Auras.wrapDebuffSide = AuraConfig.wrapdebuffside
Auras.wrapDebuff = AuraConfig.wrapdebuff
Auras.debuffOffset = AuraConfig.debuffOffset
Expand Down
4 changes: 2 additions & 2 deletions LunaUnitFrames.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Interface: 11504
## Interface: 11505
## Title: Luna Unit Frames
## Notes:
## Author: Aviana
## Version: 4378
## Version: 4379

## SavedVariables: LunaUFDB
## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, Clique
Expand Down
3 changes: 2 additions & 1 deletion libs/oUF_Plugins/oUF_SimpleAuras/oUF_SimpleAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ local function updateIcon(element, unit, index, position, filter, isDebuff)

if(button.icon) then button.icon:SetTexture(texture) end
button.count:SetText(count > 1 and count or "")

button.count:SetFont(button.count:GetFont(), element.buffcountfontsize or 10, "OUTLINE")

local size
local preventBuffGrowth, preventDebuffGrowth = (element.buffAnchor == "INFRAME" or element.buffAnchor == "INFRAMECENTER"), (element.debuffAnchor == "INFRAME" or element.debuffAnchor == "INFRAMECENTER")
if isDebuff then
Expand Down
2 changes: 2 additions & 0 deletions locales/deDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ local L = {
["Color of cast bar when cast not interruptible"] = "Color of cast bar when cast not interruptible",
["Not interruptible cast text"] = "Not interruptible cast text",
["Color of cast bar text when cast not interruptible"] = "Color of cast bar text when cast not interruptible",
["BuffCountFontSize"] = "Buff Count Font Size",
["BuffCountFontSizeText"] = "Set the font size of the count for buffs with mutiple stacks",
}

local LUF = select(2, ...)
Expand Down
2 changes: 2 additions & 0 deletions locales/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ local L = {
["Color of cast bar when cast not interruptible"] = "Color of cast bar when cast not interruptible",
["Not interruptible cast text"] = "Not interruptible cast text",
["Color of cast bar text when cast not interruptible"] = "Color of cast bar text when cast not interruptible",
["BuffCountFontSize"] = "Buff Count Font Size",
["BuffCountFontSizeText"] = "Set the font size of the count for buffs with mutiple stacks",
}

LUF.L = L
2 changes: 2 additions & 0 deletions locales/koKR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ local L = {
["Color of cast bar when cast not interruptible"] = "Color of cast bar when cast not interruptible",
["Not interruptible cast text"] = "Not interruptible cast text",
["Color of cast bar text when cast not interruptible"] = "Color of cast bar text when cast not interruptible",
["BuffCountFontSize"] = "Buff Count Font Size",
["BuffCountFontSizeText"] = "Set the font size of the count for buffs with mutiple stacks",
}

local LUF = select(2, ...)
Expand Down
2 changes: 2 additions & 0 deletions locales/zhCN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ local L = {
["Color of cast bar when cast not interruptible"] = "Color of cast bar when cast not interruptible",
["Not interruptible cast text"] = "Not interruptible cast text",
["Color of cast bar text when cast not interruptible"] = "Color of cast bar text when cast not interruptible",
["BuffCountFontSize"] = "Buff Count Font Size",
["BuffCountFontSizeText"] = "Set the font size of the count for buffs with mutiple stacks",
}

local LUF = select(2, ...)
Expand Down
2 changes: 2 additions & 0 deletions locales/zhTW.lua
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ local L = {
["Color of cast bar when cast not interruptible"] = "Color of cast bar when cast not interruptible",
["Not interruptible cast text"] = "Not interruptible cast text",
["Color of cast bar text when cast not interruptible"] = "Color of cast bar text when cast not interruptible",
["BuffCountFontSize"] = "Buff Count Font Size",
["BuffCountFontSizeText"] = "Set the font size of the count for buffs with mutiple stacks",
}

local LUF = select(2, ...)
Expand Down
19 changes: 14 additions & 5 deletions modules/Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1058,29 +1058,38 @@ function LUF:CreateConfig()
order = 5,
values = {["all"] = ACHIEVEMENTFRAME_FILTER_ALL, ["self"] = L["Own"], ["none"] = NONE},
},
buffcountfontsize = {
name = L["BuffCountFontSize"],
desc = L["BuffCountFontSizeText"],
type = "range",
order = 6,
min = 4,
max = 40,
step = 1,
},
buffheader = {
name = L["Buffs"],
type = "header",
order = 6,
order = 7,
},
buffs = {
name = L["Buffs"],
desc = string.format(L["Enable or disable the %s."],L["Buffs"]),
type = "toggle",
order = 7,
order = 8,
},
filterbuffs = {
name = string.format(L["Filter %s"],L["Buffs"]),
desc = L["Show only buffs that you or everyone of your class can apply"],
type = "select",
order = 8,
order = 9,
values = {[1] = OFF, [2] = L["Your own"], [3] = CLASS},
},
buffsize = {
name = L["Size"],
desc = L["Set the buffsize."],
type = "range",
order = 9,
order = 10,
min = 4,
max = 50,
step = 1,
Expand All @@ -1089,7 +1098,7 @@ function LUF:CreateConfig()
name = L["Bigger buffs"],
desc = EMPHASIZE_MY_SPELLS_TEXT,
type = "range",
order = 10,
order = 11,
min = 0,
max = 20,
step = 1,
Expand Down
16 changes: 16 additions & 0 deletions modules/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ function LUF:LoadDefaults()
weaponbuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 4,
enlargeddebuffsize = 4,
buffOffset = 0,
Expand Down Expand Up @@ -326,6 +327,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -484,6 +486,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -628,6 +631,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -774,6 +778,7 @@ function LUF:LoadDefaults()
debuffs = true,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 4,
enlargeddebuffsize = 4,
buffOffset = 0,
Expand Down Expand Up @@ -937,6 +942,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -1085,6 +1091,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -1234,6 +1241,7 @@ function LUF:LoadDefaults()
debuffs = true,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -1408,6 +1416,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -1561,6 +1570,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -2057,6 +2067,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -2232,6 +2243,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -2391,6 +2403,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -2551,6 +2564,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -2726,6 +2740,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down Expand Up @@ -2885,6 +2900,7 @@ function LUF:LoadDefaults()
debuffs = false,
buffsize = 18,
debuffsize = 18,
buffcountfontsize = 10,
enlargedbuffsize = 0,
enlargeddebuffsize = 0,
buffOffset = 0,
Expand Down

0 comments on commit 0c66a5d

Please sign in to comment.