mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
lua binder improvments
This commit is contained in:
@@ -17,3 +17,4 @@ Module
|
||||
require 'dispatcher'
|
||||
require 'widget'
|
||||
require 'effects'
|
||||
require 'settings'
|
||||
|
@@ -16,11 +16,3 @@ end
|
||||
function string:trim()
|
||||
return self:match('^%s*(.*%S)') or ''
|
||||
end
|
||||
|
||||
function toboolean(str)
|
||||
str = str:trim()
|
||||
if str == '1' or str == 'true' then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
@@ -68,3 +68,11 @@ function resolvepath(filePath, depth)
|
||||
return filePath
|
||||
end
|
||||
end
|
||||
|
||||
function toboolean(str)
|
||||
str = str:trim():lower()
|
||||
if str == '1' or str == 'true' then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
Reference in New Issue
Block a user