author | koda |
Sat, 25 Sep 2010 03:04:22 +0200 | |
changeset 3902 | 3aac7ca07b0e |
parent 3829 | 81db3c85784b |
child 3910 | dd47efbdec46 |
permissions | -rw-r--r-- |
3829 | 1 |
/* |
2 |
* Hedgewars-iOS, a Hedgewars port for iOS devices |
|
3 |
* Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@gmail.com> |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
17 |
* |
|
18 |
* File created on 22/04/2010. |
|
19 |
*/ |
|
20 |
||
3547 | 21 |
|
22 |
#import <UIKit/UIKit.h> |
|
23 |
#import "SDL_net.h" |
|
24 |
||
3705 | 25 |
@protocol MapConfigDelegate <NSObject> |
26 |
||
27 |
-(void) buttonPressed:(id) sender; |
|
28 |
||
29 |
@end |
|
30 |
||
31 |
||
3547 | 32 |
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { |
3705 | 33 |
id<MapConfigDelegate> delegate; |
34 |
||
3547 | 35 |
TCPsocket sd, csd; |
36 |
NSInteger oldValue; //slider |
|
37 |
NSInteger oldPage; //segmented control |
|
38 |
BOOL busy; |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
39 |
|
3547 | 40 |
// objects read (mostly) by parent view |
41 |
NSInteger maxHogs; |
|
42 |
NSString *seedCommand; |
|
43 |
NSString *templateFilterCommand; |
|
44 |
NSString *mapGenCommand; |
|
45 |
NSString *mazeSizeCommand; |
|
46 |
NSString *themeCommand; |
|
3642 | 47 |
NSString *staticMapCommand; |
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
48 |
|
3547 | 49 |
// various widgets in the view |
50 |
UIButton *previewButton; |
|
51 |
UITableView *tableView; |
|
52 |
UILabel *maxLabel; |
|
53 |
UILabel *sizeLabel; |
|
54 |
UISegmentedControl *segmentedControl; |
|
55 |
UISlider *slider; |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
56 |
|
3547 | 57 |
// internal objects |
58 |
NSIndexPath *lastIndexPath; |
|
59 |
NSArray *themeArray; |
|
60 |
NSArray *mapArray; |
|
61 |
} |
|
62 |
||
3705 | 63 |
@property (nonatomic,retain) id<MapConfigDelegate> delegate; |
64 |
||
3547 | 65 |
@property (nonatomic) NSInteger maxHogs; |
66 |
@property (nonatomic) BOOL busy; |
|
67 |
@property (nonatomic,retain) NSString *seedCommand; |
|
68 |
@property (nonatomic,retain) NSString *templateFilterCommand; |
|
69 |
@property (nonatomic,retain) NSString *mapGenCommand; |
|
70 |
@property (nonatomic,retain) NSString *mazeSizeCommand; |
|
71 |
@property (nonatomic,retain) NSString *themeCommand; |
|
3642 | 72 |
@property (nonatomic,retain) NSString *staticMapCommand; |
3547 | 73 |
|
74 |
@property (nonatomic,retain) IBOutlet UIButton *previewButton; |
|
75 |
@property (nonatomic,retain) IBOutlet UITableView *tableView; |
|
76 |
@property (nonatomic,retain) IBOutlet UILabel *maxLabel; |
|
77 |
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel; |
|
78 |
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl; |
|
79 |
@property (nonatomic,retain) IBOutlet UISlider *slider; |
|
80 |
||
81 |
@property (nonatomic,retain) NSIndexPath *lastIndexPath; |
|
82 |
@property (nonatomic,retain) NSArray *themeArray; |
|
83 |
@property (nonatomic,retain) NSArray *mapArray; |
|
84 |
||
3705 | 85 |
-(IBAction) buttonPressed:(id) sender; |
86 |
||
3783 | 87 |
-(IBAction) mapButtonPressed; |
3547 | 88 |
-(IBAction) sliderChanged:(id) sender; |
89 |
-(IBAction) sliderEndedChanging:(id) sender; |
|
90 |
-(IBAction) segmentedControlChanged:(id) sender; |
|
3705 | 91 |
|
3547 | 92 |
-(void) turnOnWidgets; |
93 |
-(void) turnOffWidgets; |
|
94 |
-(void) setLabelText:(NSString *)str; |
|
95 |
-(void) setButtonImage:(UIImage *)img; |
|
3783 | 96 |
-(void) updatePreview; |
97 |
-(void) updatePreviewWithMap:(NSInteger) index; |
|
3547 | 98 |
|
99 |
-(const uint8_t *)engineProtocol:(NSInteger) port; |
|
100 |
||
101 |
@end |