Вопрос Lua ui

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
31 Май 2022
Сообщения
48
Реакции
3
В общем как сделать, чтобы когда у тебя активен допустим один из элементов selectable слева от него пишется active
 
1680423552289.png
 
Код:
Expand Collapse Copy
local sexlectable = ui.create("UID MENU BY RJUKO TOPCODER"):list("(◣_◢) select ur uid (◣_◢)", {
    "♛1♛4♛0♛3♛6♛",
    "♚1♚4♚1♚6♚9♚",
    "♔9♔1♔5♔0♔"
})

sexlectable:set_callback(function(self)
    local new_items = {
        "♛1♛4♛0♛3♛6♛",
        "♚1♚4♚1♚6♚9♚",
        "♔9♔1♔5♔0♔"
    }
    local index = self:get()

    new_items[index] = new_items[index] .. " is ur uid (◣_◢)"
   
    self:update(new_items)
end, true)
 
Код:
Expand Collapse Copy
local sexlectable = ui.create("UID MENU BY RJUKO TOPCODER"):list("(◣_◢) select ur uid (◣_◢)", {
    "♛1♛4♛0♛3♛6♛",
    "♚1♚4♚1♚6♚9♚",
    "♔9♔1♔5♔0♔"
})

sexlectable:set_callback(function(self)
    local new_items = {
        "♛1♛4♛0♛3♛6♛",
        "♚1♚4♚1♚6♚9♚",
        "♔9♔1♔5♔0♔"
    }
    local index = self:get()

    new_items[index] = new_items[index] .. " is ur uid (◣_◢)"
  
    self:update(new_items)
end, true)
Спасибо
Код:
Expand Collapse Copy
local sexlectable = ui.create("UID MENU BY RJUKO TOPCODER"):list("(◣_◢) select ur uid (◣_◢)", {
    "♛1♛4♛0♛3♛6♛",
    "♚1♚4♚1♚6♚9♚",
    "♔9♔1♔5♔0♔"
})

sexlectable:set_callback(function(self)
    local new_items = {
        "♛1♛4♛0♛3♛6♛",
        "♚1♚4♚1♚6♚9♚",
        "♔9♔1♔5♔0♔"
    }
    local index = self:get()

    new_items[index] = new_items[index] .. " is ur uid (◣_◢)"
  
    self:update(new_items)
end, true)
а если с listable, так же будет работать?
 
Последнее редактирование:
Код:
Expand Collapse Copy
local sexlectable = ui.create("UID MENU BY RJUKO TOPCODER"):list("(◣_◢) select ur uid (◣_◢)", {
    "♛1♛4♛0♛3♛6♛",
    "♚1♚4♚1♚6♚9♚",
    "♔9♔1♔5♔0♔"
})

sexlectable:set_callback(function(self)
    local new_items = {
        "♛1♛4♛0♛3♛6♛",
        "♚1♚4♚1♚6♚9♚",
        "♔9♔1♔5♔0♔"
    }
    local index = self:get()

    new_items[index] = new_items[index] .. " is ur uid (◣_◢)"
  
    self:update(new_items)
end, true)
а по кнопке знаешь как сделать?
 
???:button("lom4ik tap", function()
-- ...
end)
и все упоминания self заменяешь на нейм переменной с селектаблом
подскажи пожалуйста как с листаблом сделать
Код:
Expand Collapse Copy
local sexlectable = ui.create("UID MENU BY RJUKO TOPCODER"):list("(◣_◢) select ur uid (◣_◢)", {
    "♛1♛4♛0♛3♛6♛",
    "♚1♚4♚1♚6♚9♚",
    "♔9♔1♔5♔0♔"
})

sexlectable:set_callback(function(self)
    local new_items = {
        "♛1♛4♛0♛3♛6♛",
        "♚1♚4♚1♚6♚9♚",
        "♔9♔1♔5♔0♔"
    }
    local index = self:get()

    new_items[index] = new_items[index] .. " is ur uid (◣_◢)"
  
    self:update(new_items)
end, true)
листабл по другому гетается вроде?
 
Назад
Сверху Снизу