3547
|
1 |
//
|
|
2 |
// MapConfigViewController.h
|
|
3 |
// HedgewarsMobile
|
|
4 |
//
|
|
5 |
// Created by Vittorio on 22/04/10.
|
|
6 |
// Copyright 2010 __MyCompanyName__. All rights reserved.
|
|
7 |
//
|
|
8 |
|
|
9 |
#import <UIKit/UIKit.h>
|
|
10 |
#import "SDL_net.h"
|
|
11 |
|
|
12 |
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
|
|
13 |
TCPsocket sd, csd;
|
|
14 |
NSInteger oldValue; //slider
|
|
15 |
NSInteger oldPage; //segmented control
|
|
16 |
BOOL busy;
|
|
17 |
|
|
18 |
// objects read (mostly) by parent view
|
|
19 |
NSInteger maxHogs;
|
|
20 |
NSString *seedCommand;
|
|
21 |
NSString *templateFilterCommand;
|
|
22 |
NSString *mapGenCommand;
|
|
23 |
NSString *mazeSizeCommand;
|
|
24 |
NSString *themeCommand;
|
|
25 |
|
|
26 |
// various widgets in the view
|
|
27 |
UIButton *previewButton;
|
|
28 |
UITableView *tableView;
|
|
29 |
UILabel *maxLabel;
|
|
30 |
UILabel *sizeLabel;
|
|
31 |
UISegmentedControl *segmentedControl;
|
|
32 |
UISlider *slider;
|
|
33 |
|
|
34 |
// internal objects
|
|
35 |
NSIndexPath *lastIndexPath;
|
|
36 |
NSArray *themeArray;
|
|
37 |
NSArray *mapArray;
|
|
38 |
}
|
|
39 |
|
|
40 |
@property (nonatomic) NSInteger maxHogs;
|
|
41 |
@property (nonatomic) BOOL busy;
|
|
42 |
@property (nonatomic,retain) NSString *seedCommand;
|
|
43 |
@property (nonatomic,retain) NSString *templateFilterCommand;
|
|
44 |
@property (nonatomic,retain) NSString *mapGenCommand;
|
|
45 |
@property (nonatomic,retain) NSString *mazeSizeCommand;
|
|
46 |
@property (nonatomic,retain) NSString *themeCommand;
|
|
47 |
|
|
48 |
@property (nonatomic,retain) IBOutlet UIButton *previewButton;
|
|
49 |
@property (nonatomic,retain) IBOutlet UITableView *tableView;
|
|
50 |
@property (nonatomic,retain) IBOutlet UILabel *maxLabel;
|
|
51 |
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel;
|
|
52 |
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;
|
|
53 |
@property (nonatomic,retain) IBOutlet UISlider *slider;
|
|
54 |
|
|
55 |
@property (nonatomic,retain) NSIndexPath *lastIndexPath;
|
|
56 |
@property (nonatomic,retain) NSArray *themeArray;
|
|
57 |
@property (nonatomic,retain) NSArray *mapArray;
|
|
58 |
|
|
59 |
-(IBAction) updatePreview;
|
|
60 |
-(IBAction) sliderChanged:(id) sender;
|
|
61 |
-(IBAction) sliderEndedChanging:(id) sender;
|
|
62 |
-(IBAction) segmentedControlChanged:(id) sender;
|
|
63 |
-(void) turnOnWidgets;
|
|
64 |
-(void) turnOffWidgets;
|
|
65 |
-(void) setLabelText:(NSString *)str;
|
|
66 |
-(void) setButtonImage:(UIImage *)img;
|
|
67 |
|
|
68 |
-(const uint8_t *)engineProtocol:(NSInteger) port;
|
|
69 |
|
|
70 |
@end
|