diff --git a/BasicConfig.lua b/BasicConfig.lua index 0483212..4412006 100644 --- a/BasicConfig.lua +++ b/BasicConfig.lua @@ -495,6 +495,7 @@ BCM.modules[#BCM.modules+1] = function() fontSizeSlider:SetValueStep(1) fontSizeSlider:SetWidth(110) fontSizeSlider:SetScript("OnValueChanged", function(_, v) + v = floor(v) BCM_FontSizeText:SetFormattedText(FONT_SIZE.." "..FONT_SIZE_TEMPLATE, v) bcmDB.fontsize = v for i=1, BCM.chatFrames do @@ -582,6 +583,7 @@ BCM.modules[#BCM.modules+1] = function() chatFrameSlider:SetValue(1) chatFrameSlider:SetValueStep(1) chatFrameSlider:SetScript("OnValueChanged", function(_, v) + v = floor(v) local cF = ("ChatFrame%d"):format(v) BCM_History_GetText:SetFormattedText("%s: %s", cF, _G[cF].name) BCM_History_Set:SetValue(bcmDB.lines and bcmDB.lines[cF] or _G[cF]:GetMaxLines()) @@ -598,6 +600,7 @@ BCM.modules[#BCM.modules+1] = function() linesSetSlider:SetValueStep(10) linesSetSlider:SetWidth(200) linesSetSlider:SetScript("OnValueChanged", function(_, v) + v = floor(v) BCM_History_SetText:SetFormattedText("%s: %d", HISTORY, v) local cF = ("ChatFrame%d"):format(BCM_History_Get:GetValue()) if v == _G[cF]:GetMaxLines() then return end -- No value changed, don't save anything @@ -622,6 +625,7 @@ BCM.modules[#BCM.modules+1] = function() chatFrameSlider:SetValue(1) chatFrameSlider:SetValueStep(1) chatFrameSlider:SetScript("OnValueChanged", function(_, v) + v = floor(v) local cF = ("ChatFrame%d"):format(v) BCM_Justify_GetText:SetFormattedText("%s: %s", cF, _G[cF].name) BCM_Justify_Set:SetValue(bcmDB.justify and ((bcmDB.justify[cF] == "RIGHT" and 3) or (bcmDB.justify[cF] == "CENTER" and 2)) or 1) @@ -637,6 +641,7 @@ BCM.modules[#BCM.modules+1] = function() justifyPosition:SetValue(bcmDB.justify and ((bcmDB.justify.ChatFrame1 == "RIGHT" and 3) or (bcmDB.justify.ChatFrame1 == "CENTER" and 2)) or 1) justifyPosition:SetValueStep(1) justifyPosition:SetScript("OnValueChanged", function(_, v) + v = floor(v) if not bcmDB.justify then bcmDB.justify = {} end local cF = ("ChatFrame%d"):format(BCM_Justify_Get:GetValue()) local justify = v == 1 and "LEFT" or v == 2 and "CENTER" or v == 3 and "RIGHT"