Don’t Stop Moving

It’s a toss up between S Club 7 and The Outhere Brothers as to which song is stuck in your head right now – provided, of course, that you were a teenager in the 90’s. Anyway…

I’m keen on implementing non-stop moving backgrounds in the app. Currently, you click a node and it highlights that node whilst the screen pauses – and all the pre-processing is being done for the next screen – before showing the new screen and the background starts moving again.

Feels amateurish.

Here’s a brief outline on what needs doing:

No longer kill off moving background by default when you successfully click a node. Here is the code to determine if kill off is required (it will return “true” if currentMenuIndex is not in list of moving background screens, or infoPaneVisible, or !menuActive)

if (killOffBackgroundRequired(currentMenuIndex)){
    // kill it off

Place all “pre-processing” code required to set up new menu screen into a Thread, and hold back change of globalMenuIndex until we are ready to show the new screen

while (t < pauseAfterClickTime && preProcessingInProgress){
    // sleep
// NOW flip the menu change

Or, instead of holding back the globalMenuIndex change, we just use tempGlobalMenuIndex during refresh method, in conjunction with the preProcessingInProgress boolean…

if (preProcessingInProgress){
    menuIndex = tempGlobalMenuIndex;
else {
    menuIndex = globalMenuIndex;

… or summat similar.

Right, I reckon that covers it in enough detail. Now, whether I get a chance to have a crack at this tonight – whilst minding the kids on my own so that m’lady can re-live her teen years watching Ocean Colour Scene – remains to be seen…




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s