Jump to content
Vince

UI multiple button.

Recommended Posts

So would I be able to connect a MouseDown function to each button I add for a list of items or a set up.

 

like so:

function CreateLayout()

local ui

--make ui frame and items

--set pos in scrolling ui

return ui

end

 

for i,v in pairs(player_invy) do

local ui = CreateLayout()

ui.ItemName = v.name

ui.itemImage = v.image

ui.itemqty = v.qty

end

 

 

function Script:MouseDown(button,x,y)

 

Not quite sure what the button variable does as I can't seem to find a section for it.

If it's what button it pressed then I can just catalog the buttons in an array and loop though?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...