Add files via upload
This commit is contained in:
@@ -341,7 +341,7 @@ function addon.GUI:BuildSettings(parent)
|
||||
|
||||
local slider = CreateFrame("Slider", "RelationshipsThreatPlatesSlider_" .. configKey, parent, "OptionsSliderTemplate")
|
||||
slider:SetWidth(W - 60)
|
||||
slider:SetHeight(16)
|
||||
slider:SetHeight(10)
|
||||
slider:SetPoint("TOPLEFT", parent, "TOPLEFT", MARGIN, -y)
|
||||
slider:SetOrientation("HORIZONTAL")
|
||||
slider:SetMinMaxValues(minVal, maxVal)
|
||||
@@ -364,6 +364,8 @@ function addon.GUI:BuildSettings(parent)
|
||||
if thumbTexture then
|
||||
thumbTexture:SetTexture(C.SOLID)
|
||||
thumbTexture:SetVertexColor(unpack(C.ACCENT))
|
||||
thumbTexture:SetWidth(8)
|
||||
thumbTexture:SetHeight(14)
|
||||
end
|
||||
|
||||
local lowText = getglobal(sliderName .. "Low")
|
||||
@@ -403,7 +405,9 @@ function addon.GUI:BuildSettings(parent)
|
||||
-- ==============================================================
|
||||
SectionLabel("General")
|
||||
CheckBox("Enable Threat Plates", "enabled", "Show threat bars above nameplates")
|
||||
CheckBox("Show Threat Text", "showText", "Display percentage in the bar")
|
||||
CheckBox("Show Threat Text", "showText", "Display value in the bar")
|
||||
CheckBox("Tank Mode", "tankMode", "Show raw threat lead over 2nd place instead of %")
|
||||
CheckBox("Snap to 100% when Targeted", "targetSnap100", "Force 100% while a mob is focused on you")
|
||||
CheckBox("Smooth Colours", "smoothColors", "Gradient colour transition")
|
||||
|
||||
-- ==============================================================
|
||||
@@ -412,7 +416,7 @@ function addon.GUI:BuildSettings(parent)
|
||||
SectionLabel("Appearance")
|
||||
Slider("Bar Height", "barHeight", 2, 20, 1, "px")
|
||||
Slider("Bar Width Scale", "barWidthScale", 0.3, 1.0, 0.05, "")
|
||||
Slider("Bar Offset Y", "barOffsetY", 0, 20, 1, "px")
|
||||
Slider("Bar Offset Y", "barOffsetY", 0, 50, 1, "px")
|
||||
Slider("Bar Offset X", "barOffsetX", -50, 50, 0.1, "px")
|
||||
Slider("Bar Alpha", "barAlpha", 0.1, 1.0, 0.1, "")
|
||||
Slider("Font Size", "fontSize", 6, 16, 1, "pt")
|
||||
@@ -437,6 +441,44 @@ function addon.GUI:BuildSettings(parent)
|
||||
CheckBox("Show on Neutral", "showOnNeutral", "Show threat bars on neutral units")
|
||||
CheckBox("Show on Friendly", "showOnFriendly", "Show threat bars on friendly units")
|
||||
|
||||
-- ==============================================================
|
||||
-- Reset button at bottom
|
||||
-- ==============================================================
|
||||
y = y + 10
|
||||
local resetBtn = CreateFrame("Button", nil, parent)
|
||||
resetBtn:SetWidth(W - MARGIN * 2)
|
||||
resetBtn:SetHeight(22)
|
||||
resetBtn:SetPoint("TOPLEFT", parent, "TOPLEFT", MARGIN, -y)
|
||||
SafeSetBackdrop(resetBtn, {
|
||||
bgFile = C.SOLID,
|
||||
edgeFile = C.SOLID,
|
||||
tile = false, tileSize = 0,
|
||||
edgeSize = 1,
|
||||
})
|
||||
resetBtn:SetBackdropColor(unpack(C.BUTTON_BG))
|
||||
resetBtn:SetBackdropBorderColor(unpack(C.BORDER))
|
||||
|
||||
local resetText = resetBtn:CreateFontString(nil, "OVERLAY")
|
||||
resetText:SetFont(FONT_NORMAL, FONT_SIZE, "OUTLINE")
|
||||
resetText:SetPoint("CENTER", resetBtn, "CENTER", 0, 0)
|
||||
resetText:SetTextColor(unpack(C.BUTTON_TEXT))
|
||||
resetText:SetText("Reset to Defaults")
|
||||
resetBtn:SetFontString(resetText)
|
||||
|
||||
resetBtn:SetScript("OnEnter", function()
|
||||
this:SetBackdropColor(unpack(C.BUTTON_HOVER))
|
||||
end)
|
||||
resetBtn:SetScript("OnLeave", function()
|
||||
this:SetBackdropColor(unpack(C.BUTTON_BG))
|
||||
end)
|
||||
resetBtn:SetScript("OnClick", function()
|
||||
SlashCmdList["THREATPLATES"]("reset")
|
||||
if addon.Nameplates and addon.Nameplates.RecreateAll then
|
||||
addon.Nameplates:RecreateAll()
|
||||
end
|
||||
end)
|
||||
y = y + 22 + 8
|
||||
|
||||
-- Return total content height for scroll setup
|
||||
return y
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user