Hook up the "Play" button to launch the game.

This commit is contained in:
Paul Chote
2010-11-16 19:11:40 +13:00
parent ed8203c896
commit 21e597ca2d
7 changed files with 71 additions and 4 deletions

View File

@@ -11,6 +11,7 @@
#import "SidebarEntry.h"
#import "GameInstall.h"
#import "ImageAndTextCell.h"
#import "JSBridge.h"
@implementation Controller
@@ -27,6 +28,9 @@
[outlineView reloadData];
[outlineView expandItem:[outlineView itemAtRow:0] expandChildren:YES];
[outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO];
jsbridge = [[JSBridge alloc] initWithController:self];
[[webView windowScriptObject] setValue:jsbridge forKey:@"Launcher"];
}
- (SidebarEntry *)sidebarModsTree
@@ -130,7 +134,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn
}
}
- (IBAction)launchGame:(id)sender
- (void)launchGame
{
[game launchGame];
}