Hi ive noticed something new with tables that i want to better understand, i can see it has its use.
layout = { ["alphaBTN"] = {100,100}, ["blueBTN"] = 2, ["bottomBar"] = 3, ["greenBTN"] = 4, ["hexBTN"] = 5, ["infodisplay"] = 6, ["palleteBTN-14"] = 7, ["palleteBTN"] = 8, ["pallettholder"] = 9, ["playBTN"] = 10, ["redBTN"] = 11, ["rightBar"] = 12, ["solidBTN"] = 13, ["topBar"] = 14, } print(#layout) -- will output zero ????????? print(layout["alphaBTN"][1]) -- will output 100, great :) print(layout[1][1]) -- will cause error and not find anything
I want to be able to use the above structure in the table as Texture Packer outputs and it will save time.
Is there a way I can cycle through the table with a for loop, i dont know how this could be done in a nice dynamic way without knowing the amount of fields/items in the table.
Anyone able to enlighten me on whats happening? Thx.