From 95ce65d8cc3610073be5b5a3a4252ce90d7cb47d Mon Sep 17 00:00:00 2001 From: EgzoT Date: Sat, 9 Jun 2018 18:08:56 +0200 Subject: [PATCH] Fixed getOption and rename to isOption Fixed getOption who always return nil. Rename getOption to isOption. --- modules/corelib/ui/uicombobox.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/corelib/ui/uicombobox.lua b/modules/corelib/ui/uicombobox.lua index f6c94e9a..a9f54f4c 100644 --- a/modules/corelib/ui/uicombobox.lua +++ b/modules/corelib/ui/uicombobox.lua @@ -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)