Page 1 of 1

Help creating activity subpage cycle

Posted: Fri Sep 14, 2012 4:16 pm
by jerran
I'm trying to create a series of sub pages that will assist is the cycling between activities. I have the following setup:

Subpage: Activity-guide
This only has two arrows on it a left and right arrow that will cycle between the 2 pages.
Subpage: Activity-P1
This has the first set of activities on it.
Subpage: Activity-P2
This has the second set of activities on it.

So my goal is to have the Activity-guide page come up on the Home-Page and then Activity-P1 with it, displaying the left and right arrows with 3 activities between them from P1. This part works. Now I want to switch to P2, the second set of activities, so I set some flags and P1 goes away because it's flag is set to OFF and P2 shows up because I set P2 flag to ON.

Let's say that that all happened when I pushed the "Right" arrow. I could just setup something on the "Left" arrow to go back to P1. I have that working now. How can I setup the arrows such that I can push the "Left" arrow once to get me to P2 and another time to get me back to P1. I want the arrows to add/subtract a number and then base that number on which page should be showing. That way I could push either arrow and cycle between the Activity Pages.

Thanks,

Re: Help creating activity subpage cycle

Posted: Mon Sep 17, 2012 1:56 pm
by jerran
After some trial and error I have figured this out using flags. I had to add another flag to track what activity page I was on. Basically I added to the about the flag Page_Status and then when pushing one of the arrow keys, I witch the pages on the press of the button dependent on the flag Page_Status. When the button is released, I set Page_Status to OFF for Page1 or ON for Page2. Now I can cycle through the two pages with either arrow. I also setup the flags so that if Activity_Guide is OFF so is the Page_Status, that way every time you hit the "Home"button or the Activities screen comes up on the screen the Page1 loads.

Jer

Re: Help creating activity subpage cycle

Posted: Mon Sep 17, 2012 2:16 pm
by DemoPad
Glad you sorted it. Depending on your GUI, another way might have been to have the arrows actually on each subpage, so they were actually different buttons (though they would look identical & be in the same place) - then you just program each button to do exactly what you want it to - knowing it will only be visible with the rest of the subpage.

Re: Help creating activity subpage cycle

Posted: Mon Sep 17, 2012 3:28 pm
by jerran
I thought of that initially but since I wanted the Activity pages to slide in from the left I didn't want the arrows to slide with them.