author | koda |
Wed, 29 Sep 2010 23:50:46 +0200 | |
changeset 3916 | e7d665a4ef42 |
parent 3911 | 46d7a5cf8ac6 |
child 3926 | 668b71f31e51 |
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 <UIKit/UIKit.h> |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
23 |
#import "MapPreviewButtonView.h" |
3547 | 24 |
|
3705 | 25 |
@protocol MapConfigDelegate <NSObject> |
26 |
||
27 |
-(void) buttonPressed:(id) sender; |
|
28 |
||
29 |
@end |
|
30 |
||
31 |
||
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
32 |
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, MapPreviewViewDelegate> { |
3705 | 33 |
id<MapConfigDelegate> delegate; |
34 |
||
3547 | 35 |
NSInteger oldValue; //slider |
36 |
NSInteger oldPage; //segmented control |
|
37 |
BOOL busy; |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
38 |
|
3547 | 39 |
// objects read (mostly) by parent view |
40 |
NSInteger maxHogs; |
|
41 |
NSString *seedCommand; |
|
42 |
NSString *templateFilterCommand; |
|
43 |
NSString *mapGenCommand; |
|
44 |
NSString *mazeSizeCommand; |
|
45 |
NSString *themeCommand; |
|
3642 | 46 |
NSString *staticMapCommand; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
47 |
NSString *missionCommand; |
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
48 |
|
3547 | 49 |
// various widgets in the view |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
50 |
MapPreviewButtonView *previewButton; |
3547 | 51 |
UITableView *tableView; |
52 |
UILabel *maxLabel; |
|
53 |
UILabel *sizeLabel; |
|
54 |
UISegmentedControl *segmentedControl; |
|
55 |
UISlider *slider; |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
56 |
|
3547 | 57 |
// internal objects |
58 |
NSIndexPath *lastIndexPath; |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
59 |
NSArray *dataSourceArray; |
3547 | 60 |
} |
61 |
||
3705 | 62 |
@property (nonatomic,retain) id<MapConfigDelegate> delegate; |
63 |
||
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
64 |
@property (nonatomic,assign) NSInteger maxHogs; |
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
65 |
@property (nonatomic,assign) BOOL busy; |
3547 | 66 |
@property (nonatomic,retain) NSString *seedCommand; |
67 |
@property (nonatomic,retain) NSString *templateFilterCommand; |
|
68 |
@property (nonatomic,retain) NSString *mapGenCommand; |
|
69 |
@property (nonatomic,retain) NSString *mazeSizeCommand; |
|
70 |
@property (nonatomic,retain) NSString *themeCommand; |
|
3642 | 71 |
@property (nonatomic,retain) NSString *staticMapCommand; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
72 |
@property (nonatomic,retain) NSString *missionCommand; |
3547 | 73 |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
74 |
@property (nonatomic,retain) IBOutlet MapPreviewButtonView *previewButton; |
3547 | 75 |
@property (nonatomic,retain) IBOutlet UITableView *tableView; |
76 |
@property (nonatomic,retain) IBOutlet UILabel *maxLabel; |
|
77 |
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel; |
|
78 |
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl; |
|
79 |
@property (nonatomic,retain) IBOutlet UISlider *slider; |
|
80 |
||
81 |
@property (nonatomic,retain) NSIndexPath *lastIndexPath; |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
82 |
@property (nonatomic,retain) NSArray *dataSourceArray; |
3547 | 83 |
|
3705 | 84 |
-(IBAction) buttonPressed:(id) sender; |
85 |
||
3783 | 86 |
-(IBAction) mapButtonPressed; |
3547 | 87 |
-(IBAction) sliderChanged:(id) sender; |
88 |
-(IBAction) sliderEndedChanging:(id) sender; |
|
89 |
-(IBAction) segmentedControlChanged:(id) sender; |
|
3705 | 90 |
|
3547 | 91 |
-(void) turnOnWidgets; |
92 |
-(void) turnOffWidgets; |
|
93 |
-(void) setLabelText:(NSString *)str; |
|
3783 | 94 |
-(void) updatePreview; |
3547 | 95 |
|
96 |
@end |