author | koda |
Tue, 07 Feb 2012 00:34:25 +0100 | |
changeset 6634 | e00762923086 |
parent 6115 | 485cfecadc9a |
child 6679 | d8b98aa486a6 |
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" |
6634
e00762923086
ios game configuration page supports rotation, with some enhancements (like the new slider); some glitches here and there
koda
parents:
6115
diff
changeset
|
24 |
#import "ValueTrackingSliderView.h" |
4349 | 25 |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
26 |
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, MapPreviewViewDelegate> { |
4349 | 27 |
NSInteger oldValue; // for the slider |
28 |
NSInteger oldPage; // for the segmented control |
|
29 |
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
|
30 |
|
3547 | 31 |
// objects read (mostly) by parent view |
32 |
NSInteger maxHogs; |
|
33 |
NSString *seedCommand; |
|
34 |
NSString *templateFilterCommand; |
|
35 |
NSString *mapGenCommand; |
|
36 |
NSString *mazeSizeCommand; |
|
37 |
NSString *themeCommand; |
|
3642 | 38 |
NSString *staticMapCommand; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
39 |
NSString *missionCommand; |
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
40 |
|
3547 | 41 |
// 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
|
42 |
MapPreviewButtonView *previewButton; |
3547 | 43 |
UITableView *tableView; |
44 |
UILabel *maxLabel; |
|
45 |
UISegmentedControl *segmentedControl; |
|
6634
e00762923086
ios game configuration page supports rotation, with some enhancements (like the new slider); some glitches here and there
koda
parents:
6115
diff
changeset
|
46 |
ValueTrackingSliderView *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 |
|
6115
485cfecadc9a
HUGE refactoring of the ipad interface, finally understood how to use interface builder with custom uiviewcontrollers, as well as converted some uitableviewcontrollers to uiviewcontrollers for simplicity
koda
parents:
6109
diff
changeset
|
54 |
@property (nonatomic,assign) NSInteger oldValue; |
485cfecadc9a
HUGE refactoring of the ipad interface, finally understood how to use interface builder with custom uiviewcontrollers, as well as converted some uitableviewcontrollers to uiviewcontrollers for simplicity
koda
parents:
6109
diff
changeset
|
55 |
@property (nonatomic,assign) NSInteger oldPage; |
485cfecadc9a
HUGE refactoring of the ipad interface, finally understood how to use interface builder with custom uiviewcontrollers, as well as converted some uitableviewcontrollers to uiviewcontrollers for simplicity
koda
parents:
6109
diff
changeset
|
56 |
@property (nonatomic,assign) BOOL busy; |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
57 |
@property (nonatomic,assign) NSInteger maxHogs; |
3547 | 58 |
@property (nonatomic,retain) NSString *seedCommand; |
59 |
@property (nonatomic,retain) NSString *templateFilterCommand; |
|
60 |
@property (nonatomic,retain) NSString *mapGenCommand; |
|
61 |
@property (nonatomic,retain) NSString *mazeSizeCommand; |
|
62 |
@property (nonatomic,retain) NSString *themeCommand; |
|
3642 | 63 |
@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
|
64 |
@property (nonatomic,retain) NSString *missionCommand; |
3547 | 65 |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
66 |
@property (nonatomic,retain) IBOutlet MapPreviewButtonView *previewButton; |
3547 | 67 |
@property (nonatomic,retain) IBOutlet UITableView *tableView; |
68 |
@property (nonatomic,retain) IBOutlet UILabel *maxLabel; |
|
69 |
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl; |
|
6634
e00762923086
ios game configuration page supports rotation, with some enhancements (like the new slider); some glitches here and there
koda
parents:
6115
diff
changeset
|
70 |
@property (nonatomic,retain) IBOutlet ValueTrackingSliderView *slider; |
3547 | 71 |
|
72 |
@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
|
73 |
@property (nonatomic,retain) NSArray *dataSourceArray; |
3547 | 74 |
|
3705 | 75 |
|
6109
f6726ec81e64
finally removed the white border glitch of the ipad preview map, moved initialization from IB to code
koda
parents:
6107
diff
changeset
|
76 |
-(IBAction) mapButtonPressed:(id) sender; |
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; |
|
6115
485cfecadc9a
HUGE refactoring of the ipad interface, finally understood how to use interface builder with custom uiviewcontrollers, as well as converted some uitableviewcontrollers to uiviewcontrollers for simplicity
koda
parents:
6109
diff
changeset
|
83 |
-(void) setMaxLabelText:(NSString *)str; |
3783 | 84 |
-(void) updatePreview; |
3547 | 85 |
|
86 |
@end |