Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tCoords = {
- [1] = {1, 2, 3, 4, "Login", func = login}, -- hooks up "login" function to this button
- [2] = {10, 20 , 30 , 40, "Create Account", func = setup}, -- hooks up "setup" function to this button
- }
- for i = 1, #tCoords do
- if x >= tCoords[i][1] and x <= tCoords[i][2] and y >= tCoords[i][3] and y <= tCoords[i][4] then
- tCoords[i].func() -- executes the function hooked to the button
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement