Fixed getOption and rename to isOption
Fixed getOption who always return nil. Rename getOption to isOption.
This commit is contained in:
parent
47766685d9
commit
95ce65d8cc
|
@ -19,13 +19,14 @@ function UIComboBox:clearOptions()
|
||||||
self:clearText()
|
self:clearText()
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIComboBox:getOption(text)
|
function UIComboBox:isOption(text)
|
||||||
if not self.options then return nil end
|
if not self.options then return false end
|
||||||
for i,v in ipairs(self.options) do
|
for i,v in ipairs(self.options) do
|
||||||
if v.text == text then
|
if v.text == text then
|
||||||
return nil
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function UIComboBox:setOption(text, dontSignal)
|
function UIComboBox:setOption(text, dontSignal)
|
||||||
|
|
Loading…
Reference in New Issue