Development 22 Dec 2017

Started setting up Page Navigation with NextPage Button. Created String List for storing ArticleContent in Pages (as per List's Index). Now figuring out the logic behind pressing NextPage Button.

Next Page Button have 2 function:
1. Instantly create a new empty page
2. Load the next 16k segment of ArticleContent.

Currently this is the pseudo code that I have conjured:

/* What to do?
* 1. Press NextPage_Button:
* 2. Check to proceed only if ContentInputField have some content!!
* 3. Add Contents in 1st page to ContentInPages
* 4A. If no more page, create a new page
* 4B. Else Load Next 16k char
*        a) Find how many chars for next page (X = ArticleContent.Length - 16k)
* if ( X > 16k ) X = 16k;
*        b) Load ContentInputField:
* ContentInputField.GetComponent<InputField> ().text =
* ArticleContent.SubString((ContentInPages.Length + 1)*16k, X) */

Reminder after this still have to add another check to my original load article code to only load 1st 16k as 1st page's content. Currently no issue because all new articles are below 16k character counts.

Comments

Popular Posts