Skip to content

Commit

Permalink
builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jashmenn committed Sep 7, 2010
1 parent 5a3c6c2 commit 9aabfa2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions Classes/Scenes/HCUPPanelScene.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

// returns a Scene that contains the HSLevelSelectionScene as the only child
+(id) scene;
- (void) menuButtonPressed: (id) sender;
- (void) addLockPanelToMenu:(NMPanelMenu*)menu;
- (void) lockPanelPicked: (id) sender;
- (void) levelPicked: (id) sender ;

@end
8 changes: 5 additions & 3 deletions Classes/Scenes/HCUPPanelScene.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ - (void) onEnter
// In your game this array would be created by a function that returns a
// list of worlds. In Jacob's Shapes we have a GameController that knows
// about each level.
NSArray* panelNames = [NSArray arrayWithObjects:
@"amazon" @"arctic" @"brkfst" @"camp" @"city" nil;
NSArray* panelNames = [NSArray arrayWithObjects: @"amazon", @"arctic",
@"brkfst", @"camp", @"city", nil];
int numberOfPages = [panelNames count];

// create an empty layer for us to work with
Expand All @@ -65,15 +65,17 @@ - (void) onEnter
// and then add more later. (Anyone have advice on a better way to do this?)
NSString *firstPanelName = [NSString stringWithFormat: @"%@-panel.png", [panelNames objectAtIndex:0]];
CCSprite* pane1 = [CCSprite spriteWithFile:firstPanelName];
NMPanelMenuItem* menuItem1 = [NMPanelMenuItem itemFromNormalSprite:pane1
NMPanelMenuItem* menuItem1 = [[NMPanelMenuItem alloc] initFromNormalSprite:pane1
selectedSprite:pane1
activeSprite:pane1
disabledSprite:pane1
name:[panelNames objectAtIndex:0]
target:self
selector:@selector(levelPicked:)];
menuItem1.world = 0;
menuItem1.name = [panelNames objectAtIndex:0];
NMPanelMenu* menu = [NMPanelMenu menuWithItems: menuItem1, nil];
[pane1 release];

// Now add the rest of the panels
for(int i=1; i < numberOfPages; i++) {
Expand Down

0 comments on commit 9aabfa2

Please sign in to comment.