Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions basicOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ local function newSlider(parent, cvar, minRange, maxRange, stepSize, getValue, s
slider.maxText:SetText(maxRange)
slider.text:SetText(label)

local valueBox = CreateFrame('editbox', nil, slider)
local valueBox = CreateFrame('editbox', nil, slider, BackdropTemplateMixin and "BackdropTemplate" or nil)
valueBox:SetPoint('TOP', slider, 'BOTTOM', 0, 0)
valueBox:SetSize(60, 14)
valueBox:SetFontObject(GameFontHighlightSmall)
Expand All @@ -292,7 +292,7 @@ local function newSlider(parent, cvar, minRange, maxRange, stepSize, getValue, s
local factor = 1 / stepSize
value = floor(value * factor + 0.5) / factor
value = max(minRange, min(maxRange, value))
slider:SetValue(value, true)
slider:SetValue(value)
self:SetText(value)
self:ClearFocus()
end)
Expand Down Expand Up @@ -844,8 +844,11 @@ SubText_NP:SetPoint('TOPLEFT', Title_NP, 'BOTTOMLEFT', 0, -8)
SubText_NP:SetPoint('RIGHT', -32, 0)
SubText_NP:SetText('These options allow you to modify Nameplate Options.')

local nameplateDistance = newSlider(AIO_NP, 'nameplateMaxDistance', 10, IsClassic() and 20 or 100)
nameplateDistance:SetPoint('TOPLEFT', SubText_NP, 'BOTTOMLEFT', 0, -20)

local nameplateAtBase = newCheckbox(AIO_NP, 'nameplateOtherAtBase')
nameplateAtBase:SetPoint("TOPLEFT", SubText_NP, "BOTTOMLEFT", 0, -20)
nameplateAtBase:SetPoint("TOPLEFT", nameplateDistance, "BOTTOMLEFT", 0, -16)
nameplateAtBase:SetScript('OnClick', function(self)
local checked = self:GetChecked()
PlaySound(checked and SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON or SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF)
Expand Down