Fixed getOption and rename to isOption

Fixed getOption who always return nil.
Rename getOption to isOption.
master
EgzoT 6 years ago committed by GitHub
parent 47766685d9
commit 95ce65d8cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,13 +19,14 @@ function UIComboBox:clearOptions()
self:clearText()
end
function UIComboBox:getOption(text)
if not self.options then return nil end
function UIComboBox:isOption(text)
if not self.options then return false end
for i,v in ipairs(self.options) do
if v.text == text then
return nil
return true
end
end
return false
end
function UIComboBox:setOption(text, dontSignal)

Loading…
Cancel
Save