Merge Two Pages

  • TBI merge page tool

this is a copy tool to make a new page from existing two pages.

merge is done by reading index table from two pages

  • components/page1/index.lua
  • components/page2/index.lua

then user select which layers, events, audio, groups are mergerd in a tool.

the tool creates a copy.commnad(mac) or .bat(win) to make a new page with new index.lua. All the files and images in asset folders are copied to new folders of the page.

You may manully merge the two index.lua into one

copied lua files of page1, page2 in components/pageNew/layres are referencing assets/images/page1, page2/*.png

collection sample

  • controller/sceneCollection.lua

  • controller/bookCollection.lua

    require("controller.bookCollection").new{ books = {
      {name="book", image="landscape.png"},
      {name="keyboard", image="page1.png"},
      {name="kwikTheCat", image="page1.png"},
      {name="lingualSample", image="page1.png"},
      }
    }
    local composer = require("composer")
    composer.gotoScene("bookCollection")