Archive for 'Search Image'

Set up a tab bar in a cocos2d application

We can setup a tabbar in a cocos2d application by the following methode

- (void) setupTabBar {
tabBar = [[UITabBar alloc] initWithFrame:CGRectMake(0, 420, 320, 60)];

NSMutableArray *items = [[[NSMutableArray alloc] init] autorelease];
// Add a ‘test’ item with no image and the text “Test”
[items addObject:[[[UITabBarItem alloc] initWithTitle:@”Locations” image:[UIImage imageNamed:@"locate.png"] tag:1] autorelease]];
[items addObject:[[[UITabBarItem alloc] initWithTitle:@”Specials” image:[UIImage imageNamed:@"tags.png"] tag:2] autorelease]];
[items addObject:[[[UITabBarItem alloc] initWithTitle:@”Search” image:[UIImage imageNamed:@"search1.png"] tag:3] autorelease]];
[items addObject:[[[UITabBarItem alloc] initWithTitle:@”Friends” image:[UIImage imageNamed:@"team1.png"] tag:4] autorelease]];
[items addObject:[[[UITabBarItem alloc] initWithTitle:@”Settings” image:[UIImage imageNamed:@"settings7.png"] tag:5] autorelease]];
tabBar.items = items;
// Setup this object to respond to tab changes
tabBar.delegate = self;
[[[CCDirector sharedDirector] openGLView] addSubview:tabBar];
}

- (void)tabBar:(UITabBar *)tabBar1 didSelectItem:(UITabBarItem *)item {
NSLog(@”tag %d”, item.tag);
}

Incoming search terms:

  • cocos2d tab bar

Creating a custom Emulator Skin For Android

Create A Layout:(Don’t associate any extension with the file)

parts {

device {
display {
width   480
height  800
x       0
y       0
}
}

portrait {
background {
image   background_port.png
}
buttons {
back {
image back_sel.png
x 88
y 938
}
soft-left {
image menu_sel.png
x 210
y 938
}
home {
image home_sel.png
x 328
y 938
}
search {
image search_sel.png
x 447
y 938
}

}
}

landscape {
background {
image   background_land.png
}

buttons {
back {
image land_back_sel.png
x 938
y 451
}
soft-left {
image land_menu_sel.png
x 938
y 332
}
home {
image land_home_sel.png
x 938
y 214
}
search {
image land_search_sel.png
x 938
y 92
}

}
}

}

layouts {
portrait {
width     583
height    1149
color     0xe0e0e0
event     EV_SW:0:1

part1 {
name    portrait
x       0
y       0
}

part2 {
name    device
x       52
y       129
}
}

landscape {
width     1149
height    583
color     0xe0e0e0
event     EV_SW:0:0

part1 {
name    landscape
x       0
y       0
}

part2 {
name    device
x       129
y       531
rotation  3
}
}
}

network {
speed  full
delay  none
}

Read the rest of this entry

We Can Build Your App for You. Lets Get Started !