Overlaying UI Simply

You can overlay buttons or icons of a page to other pages with the external code that you can find in the following sample project

the project consists of 4 pages

overlay page

the buttons to go to next or previous page needs the external code lua.

each button loads the following external code. Notice if the current page is page1 or page3, it should not go beyond it.

page1, page2, page3

then add the overlay_show.lua for each page's external code

local composer = require("composer")

_K.curPage = UI.curPage
_K.curUI = UI
composer.showOverlay("views.page04Scene") -- overlay page

That's all

Publish and check it with Solar2D simulator.