# HG changeset patch # User koda # Date 1348182476 -7200 # Node ID cd73d1ddde28d99db6119108b9b5879f3b3c5c2d # Parent 767d3c4153a1b83a2764081ab1d39480f3d337db nicer debug log visuals on ios diff -r 767d3c4153a1 -r cd73d1ddde28 project_files/HedgewarsMobile/Classes/MainMenuViewController.m --- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Fri Sep 21 00:50:04 2012 +0200 +++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.m Fri Sep 21 01:07:56 2012 +0200 @@ -18,6 +18,7 @@ #import "MainMenuViewController.h" +#import #import "GameConfigViewController.h" #import "SettingsContainerViewController.h" #import "AboutViewController.h" @@ -125,13 +126,29 @@ scroll.text = debugStr; [debugStr release]; scroll.editable = NO; + scroll.alpha = 0; UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; [btn addTarget:scroll action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside]; + [btn addTarget:btn action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside]; + btn.frame = CGRectMake(self.view.frame.size.height-58, -6, 64, 64); btn.backgroundColor = [UIColor blackColor]; - btn.frame = CGRectMake(self.view.frame.size.height-70, 0, 70, 70); - [scroll addSubview:btn]; + btn.titleLabel.textColor = [UIColor whiteColor]; + btn.titleLabel.textAlignment = UITextAlignmentCenter; + btn.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize]]; + [btn setTitle:@"Close" forState:UIControlStateNormal]; + btn.alpha = 0; + [btn.layer setCornerRadius:10.0f]; + [btn.layer setMasksToBounds:YES]; + [self.view addSubview:scroll]; + [self.view addSubview:btn]; + + [UIView beginAnimations:@"fadein" context:NULL]; + [UIView setAnimationDuration:0.25f]; + btn.alpha = 1; + scroll.alpha = 1; + [UIView commitAnimations]; [scroll release]; #else debugStr = debugStr; // prevent compiler warning