I have several tables for different text styles, like:
local p = { -- Paragraph x = \_W, width = display.contentWidth - margin\*2, font = "brandon\_reg", fontSize = 14, text = "" }
I don’t wanna declare these tables at the top of every scene, so I’ve put them in a module (is this a good idea btw?)
local M = { -- Paragraph p = { x = \_W, width = display.contentWidth - margin\*2, font = "brandon\_reg", fontSize = 14, text = "" }, } return M
Then in my scene I need to get the table back - what’s the syntax for this?
Really I’m looking to get the subtable like (this doesn’t work)
local myData = require ("myData") local p = myData.p
Then later in the scene I can
local text = display.newText (p)
Thanks for any help! I really appreciate it