Hello. I'm trying to do simple loop table, but it doesn't quite work...
What i want? - Output value each time from my table through onclick function. For example:
We have some table like:
Lua Code:
value = "TWO", -- default
options = { "ONE", "TWO", "THREE", "FOUR" },
and ipairs this table:
Lua Code:
['onclick'] = function(self)
for k, v in ipairs(self.options) do
self.valueText:SetText(v)
self:set(v)
end
-- self.callback(self.check)
end,
but when i click it changes the value only once, to the latest one and stop.
How to make it change every time on click? (e.g if "TWO" --> set "THREE", or if "FOUR" then set "ONE" and loop again)