gui: add animation speed dropdown menu

This commit is contained in:
shagu
2017-07-29 15:06:06 +02:00
parent c1ca648fdd
commit 95a611a46d
2 changed files with 29 additions and 1 deletions
+19
View File
@@ -637,5 +637,24 @@ function pfUI:MigrateConfig()
end
end
-- migrating animation_speed (> 3.1.2)
if checkversion(3, 1, 2) then
if tonumber(pfUI_config.unitframes.animation_speed) >= 13 then
pfUI_config.unitframes.animation_speed = "13"
elseif tonumber(pfUI_config.unitframes.animation_speed) >= 8 then
pfUI_config.unitframes.animation_speed = "8"
elseif tonumber(pfUI_config.unitframes.animation_speed) >= 5 then
pfUI_config.unitframes.animation_speed = "5"
elseif tonumber(pfUI_config.unitframes.animation_speed) >= 3 then
pfUI_config.unitframes.animation_speed = "3"
elseif tonumber(pfUI_config.unitframes.animation_speed) >= 2 then
pfUI_config.unitframes.animation_speed = "2"
elseif tonumber(pfUI_config.unitframes.animation_speed) >= 1 then
pfUI_config.unitframes.animation_speed = "1"
else
pfUI_config.unitframes.animation_speed = "5"
end
end
pfUI_config.version = pfUI.version.string
end