author | smxx |
Sat, 05 Jun 2010 18:50:08 +0000 | |
changeset 3496 | 8fb007d36c09 |
parent 3495 | a6b4f351d400 |
permissions | -rw-r--r-- |
3365
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
1 |
// |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
2 |
// MapConfigViewController.h |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
3 |
// HedgewarsMobile |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
4 |
// |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
5 |
// Created by Vittorio on 22/04/10. |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
6 |
// Copyright 2010 __MyCompanyName__. All rights reserved. |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
7 |
// |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
8 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
9 |
#import <UIKit/UIKit.h> |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
10 |
#import "SDL_net.h" |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
11 |
|
3369
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
12 |
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { |
3365
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
13 |
TCPsocket sd, csd; |
3373 | 14 |
NSInteger oldValue; //slider |
15 |
NSInteger oldPage; //segmented control |
|
16 |
BOOL busy; |
|
17 |
||
3369
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
18 |
// objects read (mostly) by parent view |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
19 |
NSInteger maxHogs; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
20 |
NSString *seedCommand; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
21 |
NSString *templateFilterCommand; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
22 |
NSString *mapGenCommand; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
23 |
NSString *mazeSizeCommand; |
3373 | 24 |
NSString *themeCommand; |
3369
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
25 |
|
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
26 |
// various widgets in the view |
3365
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
27 |
UIButton *previewButton; |
3369
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
28 |
UITableView *tableView; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
29 |
UILabel *maxLabel; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
30 |
UILabel *sizeLabel; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
31 |
UISegmentedControl *segmentedControl; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
32 |
UISlider *slider; |
3373 | 33 |
|
34 |
// internal objects |
|
35 |
NSIndexPath *lastIndexPath; |
|
36 |
NSArray *themeArray; |
|
37 |
NSArray *mapArray; |
|
3365
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
38 |
} |
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
39 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
40 |
@property (nonatomic) NSInteger maxHogs; |
3490 | 41 |
@property (nonatomic) BOOL busy; |
3365
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
42 |
@property (nonatomic,retain) NSString *seedCommand; |
3369
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
43 |
@property (nonatomic,retain) NSString *templateFilterCommand; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
44 |
@property (nonatomic,retain) NSString *mapGenCommand; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
45 |
@property (nonatomic,retain) NSString *mazeSizeCommand; |
3373 | 46 |
@property (nonatomic,retain) NSString *themeCommand; |
47 |
||
3369
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
48 |
@property (nonatomic,retain) IBOutlet UIButton *previewButton; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
49 |
@property (nonatomic,retain) IBOutlet UITableView *tableView; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
50 |
@property (nonatomic,retain) IBOutlet UILabel *maxLabel; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
51 |
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
52 |
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
53 |
@property (nonatomic,retain) IBOutlet UISlider *slider; |
3365
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
54 |
|
3373 | 55 |
@property (nonatomic,retain) NSIndexPath *lastIndexPath; |
56 |
@property (nonatomic,retain) NSArray *themeArray; |
|
57 |
@property (nonatomic,retain) NSArray *mapArray; |
|
58 |
||
3365
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
59 |
-(IBAction) updatePreview; |
3369
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
60 |
-(IBAction) sliderChanged:(id) sender; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
61 |
-(IBAction) sliderEndedChanging:(id) sender; |
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
62 |
-(IBAction) segmentedControlChanged:(id) sender; |
3373 | 63 |
-(void) turnOnWidgets; |
64 |
-(void) turnOffWidgets; |
|
3492
07256e1ad559
map preview generation reworked like nemo suggested (he was right, it's quickier in this way)
koda
parents:
3490
diff
changeset
|
65 |
-(void) setLabelText:(NSString *)str; |
07256e1ad559
map preview generation reworked like nemo suggested (he was right, it's quickier in this way)
koda
parents:
3490
diff
changeset
|
66 |
-(void) setButtonImage:(UIImage *)img; |
3369
c7289e42f0ee
add other controls for map preview, also fix a bug in digest
koda
parents:
3365
diff
changeset
|
67 |
|
3495
a6b4f351d400
now engine can be optionally built as library, there's an example wrapper of how to use it
koda
parents:
3492
diff
changeset
|
68 |
-(const uint8_t *)engineProtocol:(NSInteger) port; |
3365
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
69 |
|
37ac593e9027
wow all these files only for land preview and seed generation
koda
parents:
diff
changeset
|
70 |
@end |