Browse Source

Merge pull request #972 from EgzoT/EgzoT-UIComboBox_fix_getOption_to_isOption

Fixed getOption and rename to isOption
Konrad Kuśnierz 1 year ago
parent
commit
70a95b2f04
No account linked to committer's email address
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      modules/corelib/ui/uicombobox.lua

+ 4
- 3
modules/corelib/ui/uicombobox.lua View File

@@ -19,13 +19,14 @@ function UIComboBox:clearOptions()
19 19
   self:clearText()
20 20
 end
21 21
 
22
-function UIComboBox:getOption(text)
23
-  if not self.options then return nil end
22
+function UIComboBox:isOption(text)
23
+  if not self.options then return false end
24 24
   for i,v in ipairs(self.options) do
25 25
     if v.text == text then
26
-      return nil
26
+      return true
27 27
     end
28 28
   end
29
+  return false
29 30
 end
30 31
 
31 32
 function UIComboBox:setOption(text, dontSignal)

Loading…
Cancel
Save