author | nemo |
Sun, 07 Nov 2010 18:35:21 -0500 | |
changeset 4210 | caa9b08990eb |
parent 3930 | 8b00b4f93242 |
child 4349 | 8efa91f98274 |
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 |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
25 |
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, MapPreviewViewDelegate> { |
3547 | 26 |
NSInteger oldValue; //slider |
27 |
NSInteger oldPage; //segmented control |
|
28 |
BOOL busy; |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
29 |
|
3547 | 30 |
// objects read (mostly) by parent view |
31 |
NSInteger maxHogs; |
|
32 |
NSString *seedCommand; |
|
33 |
NSString *templateFilterCommand; |
|
34 |
NSString *mapGenCommand; |
|
35 |
NSString *mazeSizeCommand; |
|
36 |
NSString *themeCommand; |
|
3642 | 37 |
NSString *staticMapCommand; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
38 |
NSString *missionCommand; |
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
39 |
|
3547 | 40 |
// 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
|
41 |
MapPreviewButtonView *previewButton; |
3547 | 42 |
UITableView *tableView; |
43 |
UILabel *maxLabel; |
|
44 |
UILabel *sizeLabel; |
|
45 |
UISegmentedControl *segmentedControl; |
|
46 |
UISlider *slider; |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
47 |
|
3547 | 48 |
// internal objects |
49 |
NSIndexPath *lastIndexPath; |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
50 |
NSArray *dataSourceArray; |
3547 | 51 |
} |
52 |
||
3705 | 53 |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
54 |
@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
|
55 |
@property (nonatomic,assign) BOOL busy; |
3547 | 56 |
@property (nonatomic,retain) NSString *seedCommand; |
57 |
@property (nonatomic,retain) NSString *templateFilterCommand; |
|
58 |
@property (nonatomic,retain) NSString *mapGenCommand; |
|
59 |
@property (nonatomic,retain) NSString *mazeSizeCommand; |
|
60 |
@property (nonatomic,retain) NSString *themeCommand; |
|
3642 | 61 |
@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
|
62 |
@property (nonatomic,retain) NSString *missionCommand; |
3547 | 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,retain) IBOutlet MapPreviewButtonView *previewButton; |
3547 | 65 |
@property (nonatomic,retain) IBOutlet UITableView *tableView; |
66 |
@property (nonatomic,retain) IBOutlet UILabel *maxLabel; |
|
67 |
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel; |
|
68 |
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl; |
|
69 |
@property (nonatomic,retain) IBOutlet UISlider *slider; |
|
70 |
||
71 |
@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
|
72 |
@property (nonatomic,retain) NSArray *dataSourceArray; |
3547 | 73 |
|
3705 | 74 |
-(IBAction) buttonPressed:(id) sender; |
75 |
||
3783 | 76 |
-(IBAction) mapButtonPressed; |
3547 | 77 |
-(IBAction) sliderChanged:(id) sender; |
78 |
-(IBAction) sliderEndedChanging:(id) sender; |
|
79 |
-(IBAction) segmentedControlChanged:(id) sender; |
|
3705 | 80 |
|
3547 | 81 |
-(void) turnOnWidgets; |
82 |
-(void) turnOffWidgets; |
|
83 |
-(void) setLabelText:(NSString *)str; |
|
3783 | 84 |
-(void) updatePreview; |
3926
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3911
diff
changeset
|
85 |
-(void) loadDataSourceArray; |
3547 | 86 |
|
87 |
@end |