7 // |
7 // |
8 |
8 |
9 #import <UIKit/UIKit.h> |
9 #import <UIKit/UIKit.h> |
10 #import "SDL_net.h" |
10 #import "SDL_net.h" |
11 |
11 |
12 @interface MapConfigViewController : UIViewController { |
12 @interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { |
13 TCPsocket sd, csd; |
13 TCPsocket sd, csd; |
14 NSInteger maxHogs; |
|
15 unsigned char map[128*32]; |
14 unsigned char map[128*32]; |
16 |
15 |
|
16 // objects read (mostly) by parent view |
|
17 NSInteger maxHogs; |
|
18 NSString *seedCommand; |
|
19 NSString *templateFilterCommand; |
|
20 NSString *mapGenCommand; |
|
21 NSString *mazeSizeCommand; |
|
22 |
|
23 // various widgets in the view |
17 UIButton *previewButton; |
24 UIButton *previewButton; |
18 NSString *seedCommand; |
25 UITableView *tableView; |
|
26 UILabel *maxLabel; |
|
27 UILabel *sizeLabel; |
|
28 UISegmentedControl *segmentedControl; |
|
29 UISlider *slider; |
19 } |
30 } |
20 |
31 |
21 @property (nonatomic) NSInteger maxHogs; |
32 @property (nonatomic) NSInteger maxHogs; |
22 @property (nonatomic,retain) UIButton *previewButton; |
|
23 @property (nonatomic,retain) NSString *seedCommand; |
33 @property (nonatomic,retain) NSString *seedCommand; |
|
34 @property (nonatomic,retain) NSString *templateFilterCommand; |
|
35 @property (nonatomic,retain) NSString *mapGenCommand; |
|
36 @property (nonatomic,retain) NSString *mazeSizeCommand; |
|
37 @property (nonatomic,retain) IBOutlet UIButton *previewButton; |
|
38 @property (nonatomic,retain) IBOutlet UITableView *tableView; |
|
39 @property (nonatomic,retain) IBOutlet UILabel *maxLabel; |
|
40 @property (nonatomic,retain) IBOutlet UILabel *sizeLabel; |
|
41 @property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl; |
|
42 @property (nonatomic,retain) IBOutlet UISlider *slider; |
24 |
43 |
25 -(IBAction) updatePreview; |
44 -(IBAction) updatePreview; |
|
45 -(IBAction) sliderChanged:(id) sender; |
|
46 -(IBAction) sliderEndedChanging:(id) sender; |
|
47 -(IBAction) segmentedControlChanged:(id) sender; |
|
48 |
26 -(void) engineProtocol:(NSInteger) port; |
49 -(void) engineProtocol:(NSInteger) port; |
27 |
50 |
28 @end |
51 @end |