author | koda |
Fri, 13 Aug 2010 02:13:18 +0200 | |
changeset 3737 | 2ba6ac8a114b |
parent 3705 | e1959819a542 |
child 3783 | 8e9daf967406 |
permissions | -rw-r--r-- |
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 |
||
3705 | 12 |
@protocol MapConfigDelegate <NSObject> |
13 |
||
14 |
-(void) buttonPressed:(id) sender; |
|
15 |
||
16 |
@end |
|
17 |
||
18 |
||
3547 | 19 |
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { |
3705 | 20 |
id<MapConfigDelegate> delegate; |
21 |
||
3547 | 22 |
TCPsocket sd, csd; |
23 |
NSInteger oldValue; //slider |
|
24 |
NSInteger oldPage; //segmented control |
|
25 |
BOOL busy; |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
26 |
|
3547 | 27 |
// objects read (mostly) by parent view |
28 |
NSInteger maxHogs; |
|
29 |
NSString *seedCommand; |
|
30 |
NSString *templateFilterCommand; |
|
31 |
NSString *mapGenCommand; |
|
32 |
NSString *mazeSizeCommand; |
|
33 |
NSString *themeCommand; |
|
3642 | 34 |
NSString *staticMapCommand; |
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
35 |
|
3547 | 36 |
// various widgets in the view |
37 |
UIButton *previewButton; |
|
38 |
UITableView *tableView; |
|
39 |
UILabel *maxLabel; |
|
40 |
UILabel *sizeLabel; |
|
41 |
UISegmentedControl *segmentedControl; |
|
42 |
UISlider *slider; |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
43 |
|
3547 | 44 |
// internal objects |
45 |
NSIndexPath *lastIndexPath; |
|
46 |
NSArray *themeArray; |
|
47 |
NSArray *mapArray; |
|
48 |
} |
|
49 |
||
3705 | 50 |
@property (nonatomic,retain) id<MapConfigDelegate> delegate; |
51 |
||
3547 | 52 |
@property (nonatomic) NSInteger maxHogs; |
53 |
@property (nonatomic) BOOL busy; |
|
54 |
@property (nonatomic,retain) NSString *seedCommand; |
|
55 |
@property (nonatomic,retain) NSString *templateFilterCommand; |
|
56 |
@property (nonatomic,retain) NSString *mapGenCommand; |
|
57 |
@property (nonatomic,retain) NSString *mazeSizeCommand; |
|
58 |
@property (nonatomic,retain) NSString *themeCommand; |
|
3642 | 59 |
@property (nonatomic,retain) NSString *staticMapCommand; |
3547 | 60 |
|
61 |
@property (nonatomic,retain) IBOutlet UIButton *previewButton; |
|
62 |
@property (nonatomic,retain) IBOutlet UITableView *tableView; |
|
63 |
@property (nonatomic,retain) IBOutlet UILabel *maxLabel; |
|
64 |
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel; |
|
65 |
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl; |
|
66 |
@property (nonatomic,retain) IBOutlet UISlider *slider; |
|
67 |
||
68 |
@property (nonatomic,retain) NSIndexPath *lastIndexPath; |
|
69 |
@property (nonatomic,retain) NSArray *themeArray; |
|
70 |
@property (nonatomic,retain) NSArray *mapArray; |
|
71 |
||
3705 | 72 |
-(IBAction) buttonPressed:(id) sender; |
73 |
||
3547 | 74 |
-(IBAction) updatePreview; |
75 |
-(IBAction) sliderChanged:(id) sender; |
|
76 |
-(IBAction) sliderEndedChanging:(id) sender; |
|
77 |
-(IBAction) segmentedControlChanged:(id) sender; |
|
3705 | 78 |
|
3547 | 79 |
-(void) turnOnWidgets; |
80 |
-(void) turnOffWidgets; |
|
81 |
-(void) setLabelText:(NSString *)str; |
|
82 |
-(void) setButtonImage:(UIImage *)img; |
|
83 |
||
84 |
-(const uint8_t *)engineProtocol:(NSInteger) port; |
|
85 |
||
86 |
@end |