local namePrefix = "Tutorial_" local layoutName = namePrefix .. "Layout" LYTLayout.Setup { name = layoutName, layoutName = "SCRN_tutorial_book" } LYTTextPane.Setup { name = namePrefix .. "HeaderText", paneName = "header_FL", maxNumCharacters = 100, layoutCmp = layoutName } LYTTextPane.Setup { name = namePrefix .. "TitleText", paneName = "title_FL", maxNumCharacters = 100, layoutCmp = layoutName } LYTTextPane.Setup { name = namePrefix .. "PageText", paneName = "numbers_FL", maxNumCharacters = 100, layoutCmp = layoutName } LYTTextPane.Setup { name = namePrefix .. "DescriptionText", paneName = "description_FL", maxNumCharacters = 512, layoutCmp = layoutName } LYTTextPane.Setup { name = namePrefix .. "DescriptionMiniText", paneName = "descrip_mini_FL", maxNumCharacters = 512, layoutCmp = layoutName } local i for i = 1, 9 do LYTPane.Setup { name = namePrefix .. string.format( "Page%02d", i ), paneName = string.format( "Page_%02d", i ), layoutCmp = layoutName } if i < 8 then LYTPicturePane.Setup { name = namePrefix .. string.format( "Image%02d", ( i - 1 ) * 2 + 1 ), paneName = string.format( "image_%02d", ( i - 1 ) * 2 + 1 ), layoutCmp = layoutName } LYTPicturePane.Setup { name = namePrefix .. string.format( "Image%02d", ( i - 1 ) * 2 + 2 ), paneName = string.format( "image_%02d", ( i - 1 ) * 2 + 2 ), layoutCmp = layoutName } else LYTPicturePane.Setup { name = namePrefix .. string.format( "Image%02d", ( i - 1 ) * 2 + 1 ), paneName = string.format( "image_%02d", 14 + ( i - 7 ) ), layoutCmp = layoutName } end end