Toc
TOC
Project Properties
Book Shelf Type

- Advanced Settings > Book Shelf Project
- template

Monetization > In-App Purchase

Firstly at In-App Purchase panel, choose unlock Bookshef Book and then clock + icon to add a new product

It opens the add new product window

Add book names with the following rule for ID
- Num Of Pages: 6
- Description: book’s short description
- Versions: book’s version like “jp”, “en”, “sp”
for instance, book01 consists of 6 pages and the description “book01 information test”. This description will be used in INFO page
Shelf page
Icons
{book name}Icon* layer will load {book name}’s thumbnail image and purchase/saving/saved/download buttons are attached dynamically when the app runs.

for instance, book01 and book02 are registered in In-App Purchase table in Project properties, book01Icon and book02Icon are created.
Buttons
Need to create the following layers with the names because store/UI.lua references each layer name by the name, don’t use another name of your own. The interactions are automatically attached by store/UI.lua

- purchaseBtn
- savingTxt
- savedBtn
- downloadBtn
Restore
create restoreBtn layer. The interactions are automatically attached by store/UI.lua

- restoreBtn
INFO page
the following layers are created. The interactions are automatically attached by store/UI.lua

- infoTxt to be text replacement
- bookXXIcon
- purchaseBtn
- savingTxt
- savedBtn
- downloadBtn
- hideOverlayBtn
text replacement
infoTxt layer needs to be text replacement.


Page Properties for pageA, pageB, pageC
The new attribute - Template Page is checked on. The images and audio files are loaded from the downloaded zip at the runtime. Static images, buttons, sync&audio interactions uses the assets in the zip.


Title page

- title
- bg
PageA

- Text1
- Shape2
- Shape1
- button: Play Sync action is attached. So this dims while sync text&audio is executed
- bg
Text1.mp3 and Text1.txt (audacity file) are used. These files are replaced for p{Num}_Text1.mp3 and p{Num}_Text1.txt
PageB

- Shape1
- rotation animation
- button to play the rotation animation
- bg
PageC
the goto buttons are created.

-
Go To TOC
-
Go To Title
-
Go To Previous Book
gotoPrevBook.lua as external code for the button action
local ui = require("components.store.UI") ui.gotoScenePreviousBook()
-
Go to Next Book
gotoNextBook.lua as external code for the button action
local ui = require("components.store.UI") ui.gotoSceneNextBook()