Properly sync octave with the slider

This commit is contained in:
StyledStrike 2022-10-16 11:53:21 -03:00
parent c664ead2c9
commit c183d3d465

View File

@ -348,7 +348,12 @@ function HUD:Init()
self.rowOctave:SetValue(MKeyboard.Settings.octave)
self.rowOctave.DataChanged = function(_, val)
MKeyboard.Settings.octave = math.ceil(val)
if val < 0 then
MKeyboard.Settings.octave = math.ceil(val)
else
MKeyboard.Settings.octave = math.floor(val)
end
MKeyboard:SaveSettings()
end