mirror of
https://github.com/edubart/otclient.git
synced 2025-04-29 17:19:20 +02:00
Merge pull request #972 from EgzoT/EgzoT-UIComboBox_fix_getOption_to_isOption
Fixed getOption and rename to isOption
This commit is contained in:
commit
70a95b2f04
@ -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…
x
Reference in New Issue
Block a user