Fix encoding issue with OpenRA.Utility. Refactor SidebarEntry. Add launcher pages to all mods.

This commit is contained in:
Paul Chote
2010-11-17 11:03:57 +13:00
parent 82850cf4fb
commit 810b73e1f0
12 changed files with 83 additions and 36 deletions

View File

@@ -18,15 +18,20 @@
- (void) awakeFromNib
{
game = [[GameInstall alloc] initWithURL:[NSURL URLWithString:@"/Users/paul/src/OpenRA"]];
sidebarItems = [[SidebarEntry headerWithTitle:@""] retain];
[sidebarItems addChild:[self sidebarModsTree]];
[sidebarItems addChild:[self sidebarOtherTree]];
NSTableColumn *col = [outlineView tableColumnWithIdentifier:@"mods"];
ImageAndTextCell *imageAndTextCell = [[[ImageAndTextCell alloc] init] autorelease];
[col setDataCell:imageAndTextCell];
sidebarItems = [[SidebarEntry headerWithTitle:@""] retain];
id modsRoot = [self sidebarModsTree];
[sidebarItems addChild:modsRoot];
id otherRoot = [self sidebarOtherTree];
[sidebarItems addChild:otherRoot];
[outlineView reloadData];
[outlineView expandItem:[outlineView itemAtRow:0] expandChildren:YES];
[outlineView expandItem:modsRoot expandChildren:YES];
[outlineView expandItem:otherRoot expandChildren:YES];
[outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO];
jsbridge = [[JSBridge alloc] initWithController:self];
@@ -44,7 +49,7 @@
{
if ([aMod standalone])
{
id child = [SidebarEntry entryWithMod:aMod allMods:allMods];
id child = [SidebarEntry entryWithMod:aMod allMods:allMods baseURL:[[game gameURL] URLByAppendingPathComponent:@"mods"]];
[rootItem addChild:child];
}
}
@@ -55,8 +60,8 @@
- (SidebarEntry *)sidebarOtherTree
{
SidebarEntry *rootItem = [SidebarEntry headerWithTitle:@"OTHER"];
[rootItem addChild:[SidebarEntry entryWithTitle:@"Support" object:nil icon:nil]];
[rootItem addChild:[SidebarEntry entryWithTitle:@"Credits" object:nil icon:nil]];
[rootItem addChild:[SidebarEntry entryWithTitle:@"Support" url:nil icon:nil]];
[rootItem addChild:[SidebarEntry entryWithTitle:@"Credits" url:nil icon:nil]];
return rootItem;
}