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;
|
3642
|
25 |
NSString *staticMapCommand;
|
3547
|
26 |
|
|
27 |
// various widgets in the view
|
|
28 |
UIButton *previewButton;
|
|
29 |
UITableView *tableView;
|
|
30 |
UILabel *maxLabel;
|
|
31 |
UILabel *sizeLabel;
|
|
32 |
UISegmentedControl *segmentedControl;
|
|
33 |
UISlider *slider;
|
|
34 |
|
|
35 |
// internal objects
|
|
36 |
NSIndexPath *lastIndexPath;
|
|
37 |
NSArray *themeArray;
|
|
38 |
NSArray *mapArray;
|
|
39 |
}
|
|
40 |
|
|
41 |
@property (nonatomic) NSInteger maxHogs;
|
|
42 |
@property (nonatomic) BOOL busy;
|
|
43 |
@property (nonatomic,retain) NSString *seedCommand;
|
|
44 |
@property (nonatomic,retain) NSString *templateFilterCommand;
|
|
45 |
@property (nonatomic,retain) NSString *mapGenCommand;
|
|
46 |
@property (nonatomic,retain) NSString *mazeSizeCommand;
|
|
47 |
@property (nonatomic,retain) NSString *themeCommand;
|
3642
|
48 |
@property (nonatomic,retain) NSString *staticMapCommand;
|
3547
|
49 |
|
|
50 |
@property (nonatomic,retain) IBOutlet UIButton *previewButton;
|
|
51 |
@property (nonatomic,retain) IBOutlet UITableView *tableView;
|
|
52 |
@property (nonatomic,retain) IBOutlet UILabel *maxLabel;
|
|
53 |
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel;
|
|
54 |
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;
|
|
55 |
@property (nonatomic,retain) IBOutlet UISlider *slider;
|
|
56 |
|
|
57 |
@property (nonatomic,retain) NSIndexPath *lastIndexPath;
|
|
58 |
@property (nonatomic,retain) NSArray *themeArray;
|
|
59 |
@property (nonatomic,retain) NSArray *mapArray;
|
|
60 |
|
|
61 |
-(IBAction) updatePreview;
|
|
62 |
-(IBAction) sliderChanged:(id) sender;
|
|
63 |
-(IBAction) sliderEndedChanging:(id) sender;
|
|
64 |
-(IBAction) segmentedControlChanged:(id) sender;
|
|
65 |
-(void) turnOnWidgets;
|
|
66 |
-(void) turnOffWidgets;
|
|
67 |
-(void) setLabelText:(NSString *)str;
|
|
68 |
-(void) setButtonImage:(UIImage *)img;
|
|
69 |
|
|
70 |
-(const uint8_t *)engineProtocol:(NSInteger) port;
|
|
71 |
|
|
72 |
@end
|