Skip to content

Commit

Permalink
Fix[log output]: change button invoke target
Browse files Browse the repository at this point in the history
Fix[jar launcher]: localize Log Output button
  • Loading branch information
khanhduytran0 committed Nov 16, 2023
1 parent 74de96b commit 1f4fc38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Natives/JavaGUIViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ - (void)loadCustomControls {
@"${margin}", @"${margin}",
BTN_RECT
)];
[dict[@"mControlDataList"] addObject:createButton(@"Log output",
[dict[@"mControlDataList"] addObject:createButton(localize(@"game.menu.log_output", nil),
(int[]){SPECIALBTN_LOGOUTPUT,0,0,0},
@"${right} - ${margin}", @"${margin}",
BTN_RECT
Expand Down
8 changes: 6 additions & 2 deletions Natives/PLLogOutputView.m
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ - (void)actionStartStopLogOutput {

- (void)actionToggleLogOutput {
if (fatalErrorOccurred) {
[self performSelector:@selector(actionForceClose)];
[UIApplication.sharedApplication performSelector:@selector(suspend)];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 200 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{
dispatch_group_leave(fatalExitGroup);
fatalExitGroup = nil;
});
return;
}

Expand Down Expand Up @@ -179,7 +183,7 @@ + (void)handleExitCode:(int)code {
localize(@"game.title.exit_code", nil), code];
navigationBar.items[0].leftBarButtonItem = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemAction
target:currentVC() action:@selector(actionShareLatestlog)];
target:current action:@selector(actionShareLatestlog)];
UIBarButtonItem *exitItem = navigationBar.items[0].rightBarButtonItems[0];
navigationBar.items[0].rightBarButtonItems = nil;
navigationBar.items[0].rightBarButtonItem = exitItem;
Expand Down

0 comments on commit 1f4fc38

Please sign in to comment.