npcui.ui = FGUI:ui_delegate(self.component) url = "ui://acb/lay" self.addxyflist = npcui.ui.n14 FGUI:GList_itemRenderer(self.addxyflist,handler(npcui, npcui.ListViewCellsItemRenderer)) FGUI:GList_setDefaultItem(self.ad
🤖 回答引擎: 热血江湖Lua
|
🕒 时间: 2026-03-20 16:41:57
|
👁️ 阅读: 3
要实现只让按钮触发点击事件,图片不触发,可以这样设置: ```lua FGUI:GList_addOnClickItemEvent(self.addxyflist, function(context) local button = FGUI:GetChild(context.data, "Button3") if button then -- 这里处理按钮点击逻辑 end end) ``` 这样设置后,只有点击列表项中的"Button3"按钮才会触发事件,点击图片或其他部分不会触发。
要实现只让按钮触发点击事件,图片不触发,可以这样设置: ```lua FGUI:GList_addOnClickItemEvent(self.addxyflist, function(context) local button = FGUI:GetChild(context.data, "Button3") if button then -- 这里处理按钮点击逻辑 end end) ``` 这样设置后,只有点击列表项中的"Button3"按钮才会触发事件,点击图片或其他部分不会触发。
← 返回问答库