Jump to content

UI multiple button.


Vince
 Share

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

 Share

×
×
  • Create New...