author | koda |
Sat, 13 Nov 2010 01:24:39 +0100 | |
changeset 4287 | 7dbdc862097c |
parent 4244 | bf46b4bdf27d |
child 4290 | 82f1f1d819c0 |
permissions | -rw-r--r-- |
3829 | 1 |
/* |
2 |
* Hedgewars-iOS, a Hedgewars port for iOS devices |
|
3 |
* Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@gmail.com> |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
17 |
* |
|
18 |
* File created on 22/04/2010. |
|
19 |
*/ |
|
20 |
||
3547 | 21 |
|
22 |
#import "MapConfigViewController.h" |
|
23 |
#import "PascalImports.h" |
|
24 |
#import "CommodityFunctions.h" |
|
25 |
#import "UIImageExtra.h" |
|
26 |
||
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
27 |
#define scIndex self.segmentedControl.selectedSegmentIndex |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
28 |
#define isRandomness() (segmentedControl.selectedSegmentIndex == 0 || segmentedControl.selectedSegmentIndex == 2) |
3547 | 29 |
|
30 |
@implementation MapConfigViewController |
|
3642 | 31 |
@synthesize previewButton, maxHogs, seedCommand, templateFilterCommand, mapGenCommand, mazeSizeCommand, themeCommand, staticMapCommand, |
3930 | 32 |
missionCommand, tableView, maxLabel, sizeLabel, segmentedControl, slider, lastIndexPath, dataSourceArray, busy; |
3547 | 33 |
|
34 |
||
35 |
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { |
|
36 |
return rotationManager(interfaceOrientation); |
|
37 |
} |
|
38 |
||
3783 | 39 |
-(IBAction) mapButtonPressed { |
40 |
playSound(@"clickSound"); |
|
41 |
[self updatePreview]; |
|
42 |
} |
|
43 |
||
44 |
-(void) updatePreview { |
|
3547 | 45 |
// don't generate a new preview while it's already generating one |
46 |
if (busy) |
|
47 |
return; |
|
3697 | 48 |
|
3547 | 49 |
// generate a seed |
50 |
CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); |
|
51 |
NSString *seed = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid); |
|
52 |
CFRelease(uuid); |
|
53 |
NSString *seedCmd = [[NSString alloc] initWithFormat:@"eseed {%@}", seed]; |
|
54 |
self.seedCommand = seedCmd; |
|
55 |
[seedCmd release]; |
|
3697 | 56 |
|
3926
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3920
diff
changeset
|
57 |
if (self.dataSourceArray == nil) |
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3920
diff
changeset
|
58 |
[self loadDataSourceArray]; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
59 |
NSArray *source = [self.dataSourceArray objectAtIndex:scIndex]; |
3547 | 60 |
NSIndexPath *theIndex; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
61 |
if (isRandomness()) { |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
62 |
// prevent other events and add an activity while the preview is beign generated |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
63 |
[self turnOffWidgets]; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
64 |
[self.previewButton updatePreviewWithSeed:seed]; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
65 |
theIndex = [NSIndexPath indexPathForRow:(random()%[source count]) inSection:0]; |
3547 | 66 |
} else { |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
67 |
theIndex = [NSIndexPath indexPathForRow:(random()%[source count]) inSection:0]; |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
68 |
// the preview for static maps is loaded in didSelectRowAtIndexPath |
3547 | 69 |
} |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
70 |
[seed release]; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
71 |
|
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
72 |
// perform as if user clicked on an entry |
3547 | 73 |
[self tableView:self.tableView didSelectRowAtIndexPath:theIndex]; |
4082 | 74 |
if (IS_NOT_POWERFUL() == NO) |
4287 | 75 |
[self.tableView scrollToRowAtIndexPath:theIndex atScrollPosition:UITableViewScrollPositionMiddle animated:YES]; |
3547 | 76 |
} |
77 |
||
78 |
-(void) turnOffWidgets { |
|
79 |
busy = YES; |
|
80 |
self.previewButton.alpha = 0.5f; |
|
81 |
self.previewButton.enabled = NO; |
|
82 |
self.maxLabel.text = @"..."; |
|
83 |
self.segmentedControl.enabled = NO; |
|
84 |
self.slider.enabled = NO; |
|
85 |
} |
|
86 |
||
87 |
-(void) turnOnWidgets { |
|
88 |
self.previewButton.alpha = 1.0f; |
|
89 |
self.previewButton.enabled = YES; |
|
90 |
self.segmentedControl.enabled = YES; |
|
91 |
self.slider.enabled = YES; |
|
92 |
busy = NO; |
|
93 |
} |
|
3697 | 94 |
|
3547 | 95 |
-(void) setLabelText:(NSString *)str { |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
96 |
self.maxHogs = [str intValue]; |
3547 | 97 |
self.maxLabel.text = str; |
98 |
} |
|
99 |
||
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
100 |
-(NSDictionary *)getDataForEngine { |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
101 |
NSDictionary *dictForEngine = [NSDictionary dictionaryWithObjectsAndKeys: |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
102 |
self.seedCommand,@"seedCommand", |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
103 |
self.templateFilterCommand,@"templateFilterCommand", |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
104 |
self.mapGenCommand,@"mapGenCommand", |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
105 |
self.mazeSizeCommand,@"mazeSizeCommand", |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
106 |
nil]; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
107 |
return dictForEngine; |
3547 | 108 |
} |
109 |
||
110 |
#pragma mark - |
|
111 |
#pragma mark Table view data source |
|
112 |
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView { |
|
113 |
return 1; |
|
114 |
} |
|
115 |
||
116 |
-(NSInteger) tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger) section { |
|
3926
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3920
diff
changeset
|
117 |
if (self.dataSourceArray == nil) |
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3920
diff
changeset
|
118 |
[self loadDataSourceArray]; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
119 |
return [[self.dataSourceArray objectAtIndex:scIndex] count]; |
3547 | 120 |
} |
121 |
||
122 |
-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
|
123 |
static NSString *CellIdentifier = @"Cell"; |
|
124 |
NSInteger row = [indexPath row]; |
|
3697 | 125 |
|
3547 | 126 |
UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier]; |
3697 | 127 |
if (cell == nil) |
3547 | 128 |
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; |
3697 | 129 |
|
3926
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3920
diff
changeset
|
130 |
if (self.dataSourceArray == nil) |
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3920
diff
changeset
|
131 |
[self loadDataSourceArray]; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
132 |
NSArray *source = [self.dataSourceArray objectAtIndex:scIndex]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
133 |
|
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
134 |
NSString *labelString = [source objectAtIndex:row]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
135 |
cell.textLabel.text = labelString; |
3996 | 136 |
cell.textLabel.adjustsFontSizeToFitWidth = YES; |
137 |
cell.textLabel.minimumFontSize = 7; |
|
4244 | 138 |
cell.textLabel.textColor = UICOLOR_HW_YELLOW_TEXT; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
139 |
|
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
140 |
if (isRandomness()) { |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
141 |
UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@/icon.png",THEMES_DIRECTORY(),labelString]]; |
3547 | 142 |
cell.imageView.image = image; |
143 |
[image release]; |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
144 |
} else |
3547 | 145 |
cell.imageView.image = nil; |
3697 | 146 |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3697
diff
changeset
|
147 |
if (row == [self.lastIndexPath row]) { |
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3697
diff
changeset
|
148 |
UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; |
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3697
diff
changeset
|
149 |
cell.accessoryView = checkbox; |
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3697
diff
changeset
|
150 |
[checkbox release]; |
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3697
diff
changeset
|
151 |
} else |
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3697
diff
changeset
|
152 |
cell.accessoryView = nil; |
3547 | 153 |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3697
diff
changeset
|
154 |
cell.backgroundColor = [UIColor blackColor]; |
3547 | 155 |
return cell; |
156 |
} |
|
157 |
||
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
158 |
// this set details for a static map (called by didSelectRowAtIndexPath) |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
159 |
-(void) setDetailsForStaticMap:(NSInteger) index { |
3926
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3920
diff
changeset
|
160 |
if (self.dataSourceArray == nil) |
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3920
diff
changeset
|
161 |
[self loadDataSourceArray]; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
162 |
NSArray *source = [self.dataSourceArray objectAtIndex:scIndex]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
163 |
|
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
164 |
NSString *fileCfg = [[NSString alloc] initWithFormat:@"%@/%@/map.cfg", |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
165 |
(scIndex == 1) ? MAPS_DIRECTORY() : MISSIONS_DIRECTORY(),[source objectAtIndex:index]]; |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
166 |
NSString *contents = [[NSString alloc] initWithContentsOfFile:fileCfg encoding:NSUTF8StringEncoding error:NULL]; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
167 |
[fileCfg release]; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
168 |
NSArray *split = [contents componentsSeparatedByString:@"\n"]; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
169 |
[contents release]; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
170 |
|
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
171 |
// if the number is not set we keep 18 standard; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
172 |
// sometimes it's not set but there are trailing characters, we get around them with the second equation |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
173 |
if ([split count] > 1 && [[split objectAtIndex:1] intValue] > 0) |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
174 |
maxHogs = [[split objectAtIndex:1] intValue]; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
175 |
else |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
176 |
maxHogs = 18; |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
177 |
NSString *max = [[NSString alloc] initWithFormat:@"%d",maxHogs]; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
178 |
self.maxLabel.text = max; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
179 |
[max release]; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
180 |
|
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
181 |
self.themeCommand = [NSString stringWithFormat:@"etheme %@", [split objectAtIndex:0]]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
182 |
self.staticMapCommand = [NSString stringWithFormat:@"emap %@", [source objectAtIndex:index]]; |
3912
e11df2de6af2
have engine try for a second position when map loading fails (in this way it's possible to move Missions data to any path)
koda
parents:
3911
diff
changeset
|
183 |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
184 |
if (scIndex != 3) |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
185 |
self.missionCommand = @""; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
186 |
else |
3920
a54ca6185307
updated lua loading in the ifrontend and also fixed masked maps
koda
parents:
3912
diff
changeset
|
187 |
self.missionCommand = [NSString stringWithFormat:@"escript Missions/Maps/%@/map.lua",[source objectAtIndex:index]]; |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
188 |
} |
3547 | 189 |
|
190 |
#pragma mark - |
|
191 |
#pragma mark Table view delegate |
|
192 |
-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
|
193 |
int newRow = [indexPath row]; |
|
194 |
int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1; |
|
3697 | 195 |
|
3547 | 196 |
if (newRow != oldRow) { |
3926
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3920
diff
changeset
|
197 |
if (self.dataSourceArray == nil) |
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3920
diff
changeset
|
198 |
[self loadDataSourceArray]; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
199 |
NSArray *source = [self.dataSourceArray objectAtIndex:scIndex]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
200 |
if (isRandomness()) { |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
201 |
// just change the theme, don't update preview |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
202 |
self.themeCommand = [NSString stringWithFormat:@"etheme %@", [source objectAtIndex:newRow]]; |
3642 | 203 |
} else { |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
204 |
NSString *fileImage = [NSString stringWithFormat:@"%@/%@/preview.png", |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
205 |
(scIndex == 1) ? MAPS_DIRECTORY() : MISSIONS_DIRECTORY(),[source objectAtIndex:newRow]]; |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
206 |
[self.previewButton updatePreviewWithFile:fileImage]; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
207 |
[self setDetailsForStaticMap:newRow]; |
3642 | 208 |
} |
3697 | 209 |
|
210 |
UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath]; |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3697
diff
changeset
|
211 |
UIImageView *checkbox = [[UIImageView alloc] initWithImage:[UIImage imageWithContentsOfFile:@"checkbox.png"]]; |
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3697
diff
changeset
|
212 |
newCell.accessoryView = checkbox; |
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3697
diff
changeset
|
213 |
[checkbox release]; |
3547 | 214 |
UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:self.lastIndexPath]; |
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3697
diff
changeset
|
215 |
oldCell.accessoryView = nil; |
3547 | 216 |
|
217 |
self.lastIndexPath = indexPath; |
|
218 |
[aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; |
|
219 |
} |
|
220 |
[aTableView deselectRowAtIndexPath:indexPath animated:YES]; |
|
221 |
} |
|
222 |
||
223 |
#pragma mark - |
|
4082 | 224 |
#pragma mark slider & segmentedControl & button |
3547 | 225 |
// this updates the label and the command keys when the slider is moved, depending of the selection in segmentedControl |
226 |
// no methods are called by this routine and you can pass nil to it |
|
227 |
-(IBAction) sliderChanged:(id) sender { |
|
228 |
NSString *labelText; |
|
229 |
NSString *templateCommand; |
|
230 |
NSString *mazeCommand; |
|
3697 | 231 |
|
3547 | 232 |
switch ((int)(self.slider.value*100)) { |
233 |
case 0: |
|
234 |
if (self.segmentedControl.selectedSegmentIndex == 0) { |
|
235 |
labelText = NSLocalizedString(@"Wacky",@""); |
|
236 |
} else { |
|
237 |
labelText = NSLocalizedString(@"Large Floating Islands",@""); |
|
238 |
} |
|
239 |
templateCommand = @"e$template_filter 5"; |
|
240 |
mazeCommand = @"e$maze_size 5"; |
|
241 |
break; |
|
242 |
case 1: |
|
243 |
if (self.segmentedControl.selectedSegmentIndex == 0) { |
|
244 |
labelText = NSLocalizedString(@"Cavern",@""); |
|
245 |
} else { |
|
246 |
labelText = NSLocalizedString(@"Medium Floating Islands",@""); |
|
247 |
} |
|
248 |
templateCommand = @"e$template_filter 4"; |
|
249 |
mazeCommand = @"e$maze_size 4"; |
|
250 |
break; |
|
251 |
case 2: |
|
252 |
if (self.segmentedControl.selectedSegmentIndex == 0) { |
|
253 |
labelText = NSLocalizedString(@"Small",@""); |
|
254 |
} else { |
|
255 |
labelText = NSLocalizedString(@"Small Floating Islands",@""); |
|
256 |
} |
|
257 |
templateCommand = @"e$template_filter 1"; |
|
258 |
mazeCommand = @"e$maze_size 3"; |
|
259 |
break; |
|
260 |
case 3: |
|
261 |
if (self.segmentedControl.selectedSegmentIndex == 0) { |
|
262 |
labelText = NSLocalizedString(@"Medium",@""); |
|
263 |
} else { |
|
264 |
labelText = NSLocalizedString(@"Large Tunnels",@""); |
|
265 |
} |
|
266 |
templateCommand = @"e$template_filter 2"; |
|
267 |
mazeCommand = @"e$maze_size 2"; |
|
268 |
break; |
|
269 |
case 4: |
|
270 |
if (self.segmentedControl.selectedSegmentIndex == 0) { |
|
271 |
labelText = NSLocalizedString(@"Large",@""); |
|
272 |
} else { |
|
273 |
labelText = NSLocalizedString(@"Medium Tunnels",@""); |
|
274 |
} |
|
275 |
templateCommand = @"e$template_filter 3"; |
|
276 |
mazeCommand = @"e$maze_size 1"; |
|
277 |
break; |
|
278 |
case 5: |
|
279 |
if (self.segmentedControl.selectedSegmentIndex == 0) { |
|
280 |
labelText = NSLocalizedString(@"All",@""); |
|
281 |
} else { |
|
282 |
labelText = NSLocalizedString(@"Small Tunnels",@""); |
|
283 |
} |
|
284 |
templateCommand = @"e$template_filter 0"; |
|
285 |
mazeCommand = @"e$maze_size 0"; |
|
286 |
break; |
|
287 |
default: |
|
288 |
labelText = nil; |
|
289 |
templateCommand = nil; |
|
290 |
mazeCommand = nil; |
|
291 |
break; |
|
292 |
} |
|
3697 | 293 |
|
3547 | 294 |
self.sizeLabel.text = labelText; |
295 |
self.templateFilterCommand = templateCommand; |
|
296 |
self.mazeSizeCommand = mazeCommand; |
|
297 |
} |
|
298 |
||
299 |
// update preview (if not busy and if its value really changed) as soon as the user lifts its finger up |
|
300 |
-(IBAction) sliderEndedChanging:(id) sender { |
|
301 |
int num = (int) (self.slider.value * 100); |
|
302 |
if (oldValue != num) { |
|
303 |
[self updatePreview]; |
|
304 |
oldValue = num; |
|
305 |
} |
|
3783 | 306 |
playSound(@"clickSound"); |
3547 | 307 |
} |
308 |
||
3697 | 309 |
// perform actions based on the activated section, then call updatePreview to visually update the selection |
3547 | 310 |
// and if necessary update the table with a slide animation |
311 |
-(IBAction) segmentedControlChanged:(id) sender { |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
312 |
NSString *mapgen, *staticmap, *mission; |
3547 | 313 |
NSInteger newPage = self.segmentedControl.selectedSegmentIndex; |
3697 | 314 |
|
3783 | 315 |
playSound(@"selSound"); |
3547 | 316 |
switch (newPage) { |
317 |
case 0: // Random |
|
318 |
mapgen = @"e$mapgen 0"; |
|
3642 | 319 |
staticmap = @""; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
320 |
mission = @""; |
3547 | 321 |
[self sliderChanged:nil]; |
322 |
self.slider.enabled = YES; |
|
323 |
break; |
|
3697 | 324 |
|
3547 | 325 |
case 1: // Map |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
326 |
case 3: // Mission |
3547 | 327 |
mapgen = @"e$mapgen 0"; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
328 |
// dummy values, these are set by -updatePreview -> -didSelectRowAtIndexPath -> -setDetailsForStaticMap |
3642 | 329 |
staticmap = @"map Bamboo"; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
330 |
mission = @""; |
3547 | 331 |
self.slider.enabled = NO; |
3791
98072b3871c1
help page for ingame, some other fixes here and there
koda
parents:
3789
diff
changeset
|
332 |
self.sizeLabel.text = NSLocalizedString(@"No filter",@""); |
3547 | 333 |
break; |
3697 | 334 |
|
3547 | 335 |
case 2: // Maze |
336 |
mapgen = @"e$mapgen 1"; |
|
3642 | 337 |
staticmap = @""; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
338 |
mission = @""; |
3547 | 339 |
[self sliderChanged:nil]; |
340 |
self.slider.enabled = YES; |
|
341 |
break; |
|
3697 | 342 |
|
3547 | 343 |
default: |
344 |
mapgen = nil; |
|
3642 | 345 |
staticmap = nil; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
346 |
mission = nil; |
3547 | 347 |
break; |
348 |
} |
|
349 |
self.mapGenCommand = mapgen; |
|
3642 | 350 |
self.staticMapCommand = staticmap; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
351 |
self.missionCommand = mission; |
3697 | 352 |
|
3547 | 353 |
// nice animation for updating the table when appropriate (on iphone) |
4244 | 354 |
/* |
4115 | 355 |
if (IS_IPAD() == NO) |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
356 |
if (((oldPage == 0 || oldPage == 2) && (newPage == 1 || newPage == 3)) || |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
357 |
((oldPage == 1 || oldPage == 3) && (newPage == 0 || newPage == 2)) || |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
358 |
((oldPage == 1 && newPage == 3) || (oldPage == 3 || newPage == 1))) { |
3547 | 359 |
self.tableView.frame = CGRectMake(480, 0, 185, 276); |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
360 |
[UIView beginAnimations:@"moving in table" context:NULL]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
361 |
self.tableView.frame = CGRectMake(295, 0, 185, 276); |
3547 | 362 |
[UIView commitAnimations]; |
363 |
} |
|
4244 | 364 |
*/ |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
365 |
|
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
366 |
[self.tableView reloadData]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
367 |
[self updatePreview]; |
3547 | 368 |
oldPage = newPage; |
369 |
} |
|
370 |
||
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
371 |
-(IBAction) buttonPressed:(id) sender { |
4082 | 372 |
[[NSNotificationCenter defaultCenter] postNotificationName:@"buttonPressed" |
373 |
object:nil |
|
374 |
userInfo:[NSDictionary dictionaryWithObject:sender forKey:@"sender"]]; |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
375 |
} |
3697 | 376 |
|
4082 | 377 |
#pragma mark - |
378 |
#pragma mark view management |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
379 |
-(void) loadDataSourceArray { |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
380 |
// themes.cfg contains all the user-selectable themes |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
381 |
NSString *string = [[NSString alloc] initWithContentsOfFile:[THEMES_DIRECTORY() stringByAppendingString:@"/themes.cfg"] |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
382 |
encoding:NSUTF8StringEncoding |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
383 |
error:NULL]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
384 |
NSMutableArray *themeArray = [[NSMutableArray alloc] initWithArray:[string componentsSeparatedByString:@"\n"]]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
385 |
[string release]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
386 |
// remove a trailing "" element |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
387 |
[themeArray removeLastObject]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
388 |
NSArray *mapArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MAPS_DIRECTORY() error:NULL]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
389 |
NSArray *missionArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MISSIONS_DIRECTORY() error:NULL]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
390 |
|
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
391 |
NSArray *array = [[NSArray alloc] initWithObjects:themeArray,mapArray,themeArray,missionArray,nil]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
392 |
self.dataSourceArray = array; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
393 |
[array release]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
394 |
[themeArray release]; |
3547 | 395 |
} |
396 |
||
397 |
-(void) viewDidLoad { |
|
398 |
[super viewDidLoad]; |
|
3697 | 399 |
|
3547 | 400 |
srandom(time(NULL)); |
3697 | 401 |
|
3547 | 402 |
CGSize screenSize = [[UIScreen mainScreen] bounds].size; |
403 |
self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44); |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
404 |
|
3547 | 405 |
// initialize some "default" values |
406 |
self.sizeLabel.text = NSLocalizedString(@"All",@""); |
|
407 |
self.slider.value = 0.05f; |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
408 |
oldValue = 5; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
409 |
|
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
410 |
busy = NO; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
411 |
[self loadDataSourceArray]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
412 |
self.lastIndexPath = [NSIndexPath indexPathForRow:-1 inSection:0]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
413 |
|
3789
c3eb56754e92
added a smaller version of forts, fixed a couple of regressions
koda
parents:
3783
diff
changeset
|
414 |
// select a map at first because it's faster - done in IB |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
415 |
oldPage = 1; |
3791
98072b3871c1
help page for ingame, some other fixes here and there
koda
parents:
3789
diff
changeset
|
416 |
if (self.segmentedControl.selectedSegmentIndex == 1) { |
98072b3871c1
help page for ingame, some other fixes here and there
koda
parents:
3789
diff
changeset
|
417 |
self.slider.enabled = NO; |
98072b3871c1
help page for ingame, some other fixes here and there
koda
parents:
3789
diff
changeset
|
418 |
self.sizeLabel.text = NSLocalizedString(@"No filter",@""); |
98072b3871c1
help page for ingame, some other fixes here and there
koda
parents:
3789
diff
changeset
|
419 |
} |
3547 | 420 |
|
421 |
self.templateFilterCommand = @"e$template_filter 0"; |
|
422 |
self.mazeSizeCommand = @"e$maze_size 0"; |
|
423 |
self.mapGenCommand = @"e$mapgen 0"; |
|
3642 | 424 |
self.staticMapCommand = @""; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
425 |
self.missionCommand = @""; |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
426 |
|
4244 | 427 |
if ([self.tableView respondsToSelector:@selector(setBackgroundView:)]) |
428 |
[self.tableView setBackgroundView:nil]; |
|
429 |
self.view.backgroundColor = [UIColor clearColor]; |
|
430 |
self.tableView.separatorColor = UICOLOR_HW_YELLOW_BODER; |
|
431 |
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
|
3547 | 432 |
} |
433 |
||
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
434 |
-(void) viewWillAppear:(BOOL)animated { |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
435 |
if (self.dataSourceArray == nil) |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
436 |
[self loadDataSourceArray]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
437 |
[super viewWillAppear:animated]; |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
438 |
} |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
439 |
|
3547 | 440 |
-(void) viewDidAppear:(BOOL) animated { |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
441 |
[self updatePreview]; |
3547 | 442 |
[super viewDidAppear:animated]; |
443 |
} |
|
444 |
||
445 |
-(void) viewDidUnload { |
|
446 |
self.previewButton = nil; |
|
447 |
self.seedCommand = nil; |
|
448 |
self.templateFilterCommand = nil; |
|
449 |
self.mapGenCommand = nil; |
|
450 |
self.mazeSizeCommand = nil; |
|
451 |
self.themeCommand = nil; |
|
3642 | 452 |
self.staticMapCommand = nil; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
453 |
self.missionCommand = nil; |
3697 | 454 |
|
3547 | 455 |
self.previewButton = nil; |
456 |
self.tableView = nil; |
|
457 |
self.maxLabel = nil; |
|
458 |
self.sizeLabel = nil; |
|
459 |
self.segmentedControl = nil; |
|
460 |
self.slider = nil; |
|
3697 | 461 |
|
3547 | 462 |
self.lastIndexPath = nil; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
463 |
self.dataSourceArray = nil; |
3697 | 464 |
|
3662
a44406f4369b
polish polish polish polish (also: panning horizontal fix, panning momentum, settings page reworked yet again, memory leaks, crashes, segfaults)
koda
parents:
3660
diff
changeset
|
465 |
MSG_DIDUNLOAD(); |
3547 | 466 |
[super viewDidUnload]; |
467 |
} |
|
468 |
||
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
469 |
-(void) didReceiveMemoryWarning { |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
470 |
self.dataSourceArray = nil; |
3984 | 471 |
|
472 |
self.previewButton = nil; |
|
473 |
self.tableView = nil; |
|
474 |
self.maxLabel = nil; |
|
475 |
self.sizeLabel = nil; |
|
476 |
self.segmentedControl = nil; |
|
477 |
self.slider = nil; |
|
3971 | 478 |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
479 |
MSG_MEMCLEAN(); |
3971 | 480 |
[super didReceiveMemoryWarning]; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
481 |
} |
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
482 |
|
3547 | 483 |
-(void) dealloc { |
484 |
[seedCommand release]; |
|
485 |
[templateFilterCommand release]; |
|
486 |
[mapGenCommand release]; |
|
487 |
[mazeSizeCommand release]; |
|
488 |
[themeCommand release]; |
|
3642 | 489 |
[staticMapCommand release]; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
490 |
[missionCommand release]; |
3697 | 491 |
|
3547 | 492 |
[previewButton release]; |
493 |
[tableView release]; |
|
494 |
[maxLabel release]; |
|
495 |
[sizeLabel release]; |
|
496 |
[segmentedControl release]; |
|
497 |
[slider release]; |
|
3697 | 498 |
|
3547 | 499 |
[lastIndexPath release]; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
500 |
[dataSourceArray release]; |
3697 | 501 |
|
3547 | 502 |
[super dealloc]; |
503 |
} |
|
504 |
||
505 |
@end |