Pet modifier

This commit is contained in:
Gonçalo Correia 2026-05-09 02:11:24 +01:00
parent 0d9ec1913d
commit ed1e696eb5
4 changed files with 67 additions and 6 deletions

25
UI.lua
View file

@ -5,7 +5,7 @@
AltSystem = AltSystem or {}
local WINDOW_WIDTH = 300
local WINDOW_HEIGHT = 440
local WINDOW_HEIGHT = 478
local PADDING = 12
local ROW_HEIGHT = 30
local LABEL_WIDTH = 80
@ -191,6 +191,29 @@ function AltSystem:CreateMainFrame()
yPos = yPos - ROW_HEIGHT - 8
-------------------------
-- Pet/Summon checkbox
-------------------------
local petLabel = f:CreateFontString(nil, "OVERLAY", "GameFontNormal")
petLabel:SetPoint("TOPLEFT", f, "TOPLEFT", PADDING, yPos)
petLabel:SetText("Pet:")
petLabel:SetWidth(LABEL_WIDTH)
petLabel:SetJustifyH("LEFT")
local petCheck = CreateFrame("CheckButton", "AltSystemPetSummonCheck", f, "UICheckButtonTemplate")
petCheck:SetPoint("LEFT", petLabel, "RIGHT", -6, 0)
petCheck:SetChecked(AltSystem.State.petSummonEnabled)
local petText = petCheck:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
petText:SetPoint("LEFT", petCheck, "RIGHT", 2, 0)
petText:SetText("+d5 modifier")
petCheck:SetScript("OnClick", function(self)
AltSystem.State.petSummonEnabled = self:GetChecked()
end)
yPos = yPos - ROW_HEIGHT - 8
-------------------------
-- Announce checkbox + channel dropdown
-------------------------