author | Kimsey0 |
Sun, 04 Dec 2011 11:53:08 +0100 | |
changeset 6493 | 90b5744fad17 |
parent 6115 | 485cfecadc9a |
child 6634 | e00762923086 |
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 |
|
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 |
UILabel *sizeLabel; |
|
46 |
UISegmentedControl *segmentedControl; |
|
47 |
UISlider *slider; |
|
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 |
// internal objects |
50 |
NSIndexPath *lastIndexPath; |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
51 |
NSArray *dataSourceArray; |
3547 | 52 |
} |
53 |
||
3705 | 54 |
|
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
|
55 |
@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
|
56 |
@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
|
57 |
@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
|
58 |
@property (nonatomic,assign) NSInteger maxHogs; |
3547 | 59 |
@property (nonatomic,retain) NSString *seedCommand; |
60 |
@property (nonatomic,retain) NSString *templateFilterCommand; |
|
61 |
@property (nonatomic,retain) NSString *mapGenCommand; |
|
62 |
@property (nonatomic,retain) NSString *mazeSizeCommand; |
|
63 |
@property (nonatomic,retain) NSString *themeCommand; |
|
3642 | 64 |
@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
|
65 |
@property (nonatomic,retain) NSString *missionCommand; |
3547 | 66 |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
67 |
@property (nonatomic,retain) IBOutlet MapPreviewButtonView *previewButton; |
3547 | 68 |
@property (nonatomic,retain) IBOutlet UITableView *tableView; |
69 |
@property (nonatomic,retain) IBOutlet UILabel *maxLabel; |
|
70 |
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel; |
|
71 |
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl; |
|
72 |
@property (nonatomic,retain) IBOutlet UISlider *slider; |
|
73 |
||
74 |
@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
|
75 |
@property (nonatomic,retain) NSArray *dataSourceArray; |
3547 | 76 |
|
3705 | 77 |
|
6109
f6726ec81e64
finally removed the white border glitch of the ipad preview map, moved initialization from IB to code
koda
parents:
6107
diff
changeset
|
78 |
-(IBAction) mapButtonPressed:(id) sender; |
3547 | 79 |
-(IBAction) sliderChanged:(id) sender; |
80 |
-(IBAction) sliderEndedChanging:(id) sender; |
|
81 |
-(IBAction) segmentedControlChanged:(id) sender; |
|
3705 | 82 |
|
3547 | 83 |
-(void) turnOnWidgets; |
84 |
-(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
|
85 |
-(void) setMaxLabelText:(NSString *)str; |
3783 | 86 |
-(void) updatePreview; |
3547 | 87 |
|
88 |
@end |