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