Skip to content

Commit

Permalink
Close the right window when using the stop button on the game control…
Browse files Browse the repository at this point in the history
…s bar.
  • Loading branch information
clobber committed Sep 22, 2013
1 parent 5e32ca0 commit bd10562
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion OpenEmu/OEGameControlsBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,11 @@ - (BOOL)isOpaque
return NO;
}

- (void)stopEmulation:(id)sender
{
[[[self window] parentWindow] performClose:self];
}

#pragma mark -

- (void)drawRect:(NSRect)dirtyRect
Expand All @@ -606,7 +611,8 @@ - (void)setupControls
OEButton *stopButton = [[OEButton alloc] init];
[stopButton setThemeKey:@"hud_button_power"];
[stopButton setTitle:nil];
[stopButton setAction:@selector(performClose:)];
[stopButton setTarget:self];
[stopButton setAction:@selector(stopEmulation:)];
[stopButton setFrame:NSMakeRect(10, 13, 51, 23)];
[stopButton setAutoresizingMask:NSViewMaxXMargin | NSViewMinYMargin];
[stopButton setToolTip:NSLocalizedString(@"Stop Emulation", @"Tooltip")];
Expand Down

0 comments on commit bd10562

Please sign in to comment.