Fix scale number check
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
## Interface: 70300
|
||||
## Title: Heimdall
|
||||
## Version: 3.2.0
|
||||
## Version: 3.2.1
|
||||
## Notes: Watches over areas and alerts when hostiles spotted
|
||||
## Author: Cyka
|
||||
## SavedVariables: Heimdall_Data
|
||||
|
BIN
Heimdall.zip
(Stored with Git LFS)
BIN
Heimdall.zip
(Stored with Git LFS)
Binary file not shown.
@@ -519,9 +519,12 @@ function shared.Config.Init()
|
||||
local scale = CreateBasicSmallEditBox("HeimdallConfigScale", configFrame.frame, "Scale", Heimdall_Data.config.scale,
|
||||
function(self)
|
||||
local text = self:GetText()
|
||||
if string.match(text, "%d+") then
|
||||
if string.match(text, "^%d+%.*%d*$") then
|
||||
Heimdall_Data.config.scale = tonumber(text)
|
||||
configFrame.frame:SetScale(Heimdall_Data.config.scale)
|
||||
else
|
||||
print(string.format("Invalid scale: %s, please use numbers", text))
|
||||
self:SetText(Heimdall_Data.config.scale)
|
||||
end
|
||||
end)
|
||||
configFrame:Add(scale, 2, 2)
|
||||
|
Reference in New Issue
Block a user