16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
17 */ |
17 */ |
18 |
18 |
19 |
19 |
20 #import "MainMenuViewController.h" |
20 #import "MainMenuViewController.h" |
|
21 #import <QuartzCore/QuartzCore.h> |
21 #import "GameConfigViewController.h" |
22 #import "GameConfigViewController.h" |
22 #import "SettingsContainerViewController.h" |
23 #import "SettingsContainerViewController.h" |
23 #import "AboutViewController.h" |
24 #import "AboutViewController.h" |
24 #import "SavedGamesViewController.h" |
25 #import "SavedGamesViewController.h" |
25 #import "RestoreViewController.h" |
26 #import "RestoreViewController.h" |
123 debugStr = [[NSString alloc] initWithString:@"Here be log"]; |
124 debugStr = [[NSString alloc] initWithString:@"Here be log"]; |
124 UITextView *scroll = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width)]; |
125 UITextView *scroll = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width)]; |
125 scroll.text = debugStr; |
126 scroll.text = debugStr; |
126 [debugStr release]; |
127 [debugStr release]; |
127 scroll.editable = NO; |
128 scroll.editable = NO; |
|
129 scroll.alpha = 0; |
128 |
130 |
129 UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; |
131 UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; |
130 [btn addTarget:scroll action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside]; |
132 [btn addTarget:scroll action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside]; |
|
133 [btn addTarget:btn action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside]; |
|
134 btn.frame = CGRectMake(self.view.frame.size.height-58, -6, 64, 64); |
131 btn.backgroundColor = [UIColor blackColor]; |
135 btn.backgroundColor = [UIColor blackColor]; |
132 btn.frame = CGRectMake(self.view.frame.size.height-70, 0, 70, 70); |
136 btn.titleLabel.textColor = [UIColor whiteColor]; |
133 [scroll addSubview:btn]; |
137 btn.titleLabel.textAlignment = UITextAlignmentCenter; |
|
138 btn.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize]]; |
|
139 [btn setTitle:@"Close" forState:UIControlStateNormal]; |
|
140 btn.alpha = 0; |
|
141 [btn.layer setCornerRadius:10.0f]; |
|
142 [btn.layer setMasksToBounds:YES]; |
|
143 |
134 [self.view addSubview:scroll]; |
144 [self.view addSubview:scroll]; |
|
145 [self.view addSubview:btn]; |
|
146 |
|
147 [UIView beginAnimations:@"fadein" context:NULL]; |
|
148 [UIView setAnimationDuration:0.25f]; |
|
149 btn.alpha = 1; |
|
150 scroll.alpha = 1; |
|
151 [UIView commitAnimations]; |
135 [scroll release]; |
152 [scroll release]; |
136 #else |
153 #else |
137 debugStr = debugStr; // prevent compiler warning |
154 debugStr = debugStr; // prevent compiler warning |
138 if (nil == self.aboutViewController) { |
155 if (nil == self.aboutViewController) { |
139 AboutViewController *about = [[AboutViewController alloc] initWithNibName:@"AboutViewController" bundle:nil]; |
156 AboutViewController *about = [[AboutViewController alloc] initWithNibName:@"AboutViewController" bundle:nil]; |