summary refs log tree commit diff stats
path: root/Classes/GameModeSelectionLayer.m
diff options
context:
space:
mode:
Diffstat (limited to 'Classes/GameModeSelectionLayer.m')
-rw-r--r--Classes/GameModeSelectionLayer.m9
1 files changed, 8 insertions, 1 deletions
diff --git a/Classes/GameModeSelectionLayer.m b/Classes/GameModeSelectionLayer.m index 9875d41..ad6a455 100644 --- a/Classes/GameModeSelectionLayer.m +++ b/Classes/GameModeSelectionLayer.m
@@ -86,9 +86,15 @@
86 [panels addChild:menu]; 86 [panels addChild:menu];
87 [self addChild:panels]; 87 [self addChild:panels];
88 88
89 pageControl = [[UIPageControl alloc] init];
90 pageControl.numberOfPages = numberOfPanels;
91 pageControl.currentPage = currentWorldOffset;
92 pageControl.frame = CGRectMake(0, 250, 480, 20);
93 [[[CCDirector sharedDirector] openGLView] addSubview:pageControl];
94
89 menu.position = ccpAdd(menu.position, ccp(totalWidth/2 - totalPanelWidth/2, 320)); 95 menu.position = ccpAdd(menu.position, ccp(totalWidth/2 - totalPanelWidth/2, 320));
90 touchDelegatingView = [[TouchDelegatingView alloc] initWithFrame:CGRectMake(0, 0, 480, 320)]; 96 touchDelegatingView = [[TouchDelegatingView alloc] initWithFrame:CGRectMake(0, 0, 480, 320)];
91 scrollView = [[CocosOverlayScrollView alloc] initWithFrame:CGRectMake(0, 0, totalPanelWidth, 320) numPages:numberOfPanels width:totalPanelWidth layer:panels]; 97 scrollView = [[CocosOverlayScrollView alloc] initWithFrame:CGRectMake(0, 0, totalPanelWidth, 320) numPages:numberOfPanels width:totalPanelWidth layer:panels pageControl:pageControl];
92 touchDelegatingView.scrollView = scrollView; 98 touchDelegatingView.scrollView = scrollView;
93 [scrollView setContentOffset:CGPointMake(currentWorldOffset*totalPanelWidth+1,0) animated:NO]; 99 [scrollView setContentOffset:CGPointMake(currentWorldOffset*totalPanelWidth+1,0) animated:NO];
94 [[[CCDirector sharedDirector] openGLView] addSubview:touchDelegatingView]; 100 [[[CCDirector sharedDirector] openGLView] addSubview:touchDelegatingView];
@@ -107,6 +113,7 @@
107{ 113{
108 [touchDelegatingView removeFromSuperview]; 114 [touchDelegatingView removeFromSuperview];
109 [scrollView removeFromSuperview]; 115 [scrollView removeFromSuperview];
116 [pageControl removeFromSuperview];
110} 117}
111 118
112- (void)mainmenu 119- (void)mainmenu