author | koda |
Wed, 27 Apr 2011 02:34:38 +0200 | |
changeset 5181 | 102fef5ca5fc |
parent 4976 | 088d40d8aba2 |
child 6107 | 0741c0f0203e |
permissions | -rw-r--r-- |
3829 | 1 |
/* |
2 |
* Hedgewars-iOS, a Hedgewars port for iOS devices |
|
4976 | 3 |
* Copyright (c) 2009-2011 Vittorio Giovara <vittorio.giovara@gmail.com> |
3829 | 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 |
|
4349 | 25 |
@class SchemeWeaponConfigViewController; |
4362
8dae325dc625
added missing graphics and fixed some glitches/crashes/bugs
koda
parents:
4349
diff
changeset
|
26 |
@class GameConfigViewController; |
4349 | 27 |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
28 |
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, MapPreviewViewDelegate> { |
4349 | 29 |
NSInteger oldValue; // for the slider |
30 |
NSInteger oldPage; // for the segmented control |
|
31 |
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
|
32 |
|
3547 | 33 |
// objects read (mostly) by parent view |
34 |
NSInteger maxHogs; |
|
35 |
NSString *seedCommand; |
|
36 |
NSString *templateFilterCommand; |
|
37 |
NSString *mapGenCommand; |
|
38 |
NSString *mazeSizeCommand; |
|
39 |
NSString *themeCommand; |
|
3642 | 40 |
NSString *staticMapCommand; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
41 |
NSString *missionCommand; |
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
42 |
|
3547 | 43 |
// 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
|
44 |
MapPreviewButtonView *previewButton; |
3547 | 45 |
UITableView *tableView; |
46 |
UILabel *maxLabel; |
|
47 |
UILabel *sizeLabel; |
|
48 |
UISegmentedControl *segmentedControl; |
|
49 |
UISlider *slider; |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
50 |
|
3547 | 51 |
// internal objects |
52 |
NSIndexPath *lastIndexPath; |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
53 |
NSArray *dataSourceArray; |
4349 | 54 |
|
55 |
// controller for mission state |
|
56 |
SchemeWeaponConfigViewController *externalController; |
|
4362
8dae325dc625
added missing graphics and fixed some glitches/crashes/bugs
koda
parents:
4349
diff
changeset
|
57 |
GameConfigViewController *parentController; |
3547 | 58 |
} |
59 |
||
3705 | 60 |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
61 |
@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
|
62 |
@property (nonatomic,assign) BOOL busy; |
3547 | 63 |
@property (nonatomic,retain) NSString *seedCommand; |
64 |
@property (nonatomic,retain) NSString *templateFilterCommand; |
|
65 |
@property (nonatomic,retain) NSString *mapGenCommand; |
|
66 |
@property (nonatomic,retain) NSString *mazeSizeCommand; |
|
67 |
@property (nonatomic,retain) NSString *themeCommand; |
|
3642 | 68 |
@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
|
69 |
@property (nonatomic,retain) NSString *missionCommand; |
3547 | 70 |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
71 |
@property (nonatomic,retain) IBOutlet MapPreviewButtonView *previewButton; |
3547 | 72 |
@property (nonatomic,retain) IBOutlet UITableView *tableView; |
73 |
@property (nonatomic,retain) IBOutlet UILabel *maxLabel; |
|
74 |
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel; |
|
75 |
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl; |
|
76 |
@property (nonatomic,retain) IBOutlet UISlider *slider; |
|
77 |
||
78 |
@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
|
79 |
@property (nonatomic,retain) NSArray *dataSourceArray; |
3547 | 80 |
|
4349 | 81 |
@property (nonatomic,assign) SchemeWeaponConfigViewController *externalController; |
4362
8dae325dc625
added missing graphics and fixed some glitches/crashes/bugs
koda
parents:
4349
diff
changeset
|
82 |
@property (nonatomic,assign) GameConfigViewController *parentController; |
4349 | 83 |
|
84 |
||
3705 | 85 |
-(IBAction) buttonPressed:(id) sender; |
86 |
||
3783 | 87 |
-(IBAction) mapButtonPressed; |
3547 | 88 |
-(IBAction) sliderChanged:(id) sender; |
89 |
-(IBAction) sliderEndedChanging:(id) sender; |
|
90 |
-(IBAction) segmentedControlChanged:(id) sender; |
|
3705 | 91 |
|
3547 | 92 |
-(void) turnOnWidgets; |
93 |
-(void) turnOffWidgets; |
|
94 |
-(void) setLabelText:(NSString *)str; |
|
3783 | 95 |
-(void) updatePreview; |
3926
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3911
diff
changeset
|
96 |
-(void) loadDataSourceArray; |
3547 | 97 |
|
98 |
@end |