cocoaTouch/MapConfigViewController.h
changeset 3373 c1ff724a5c34
parent 3369 c7289e42f0ee
child 3490 016b3172b645
equal deleted inserted replaced
3372:5d3daec0d0b5 3373:c1ff724a5c34
    10 #import "SDL_net.h"
    10 #import "SDL_net.h"
    11 
    11 
    12 @interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
    12 @interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
    13     TCPsocket sd, csd;
    13     TCPsocket sd, csd;
    14     unsigned char map[128*32];
    14     unsigned char map[128*32];
    15 
    15     NSInteger oldValue;  //slider
       
    16     NSInteger oldPage;   //segmented control
       
    17     BOOL busy;
       
    18     
    16     // objects read (mostly) by parent view
    19     // objects read (mostly) by parent view
    17     NSInteger maxHogs;
    20     NSInteger maxHogs;
    18     NSString *seedCommand;
    21     NSString *seedCommand;
    19     NSString *templateFilterCommand;
    22     NSString *templateFilterCommand;
    20     NSString *mapGenCommand;
    23     NSString *mapGenCommand;
    21     NSString *mazeSizeCommand;
    24     NSString *mazeSizeCommand;
       
    25     NSString *themeCommand;
    22    
    26    
    23     // various widgets in the view
    27     // various widgets in the view
    24     UIButton *previewButton;
    28     UIButton *previewButton;
    25     UITableView *tableView;
    29     UITableView *tableView;
    26     UILabel *maxLabel;
    30     UILabel *maxLabel;
    27     UILabel *sizeLabel;
    31     UILabel *sizeLabel;
    28     UISegmentedControl *segmentedControl;
    32     UISegmentedControl *segmentedControl;
    29     UISlider *slider;
    33     UISlider *slider;
       
    34     
       
    35     // internal objects
       
    36     NSIndexPath *lastIndexPath;
       
    37     NSArray *themeArray;
       
    38     NSArray *mapArray;
    30 }
    39 }
    31 
    40 
    32 @property (nonatomic) NSInteger maxHogs;
    41 @property (nonatomic) NSInteger maxHogs;
    33 @property (nonatomic,retain) NSString *seedCommand;
    42 @property (nonatomic,retain) NSString *seedCommand;
    34 @property (nonatomic,retain) NSString *templateFilterCommand;
    43 @property (nonatomic,retain) NSString *templateFilterCommand;
    35 @property (nonatomic,retain) NSString *mapGenCommand;
    44 @property (nonatomic,retain) NSString *mapGenCommand;
    36 @property (nonatomic,retain) NSString *mazeSizeCommand;
    45 @property (nonatomic,retain) NSString *mazeSizeCommand;
       
    46 @property (nonatomic,retain) NSString *themeCommand;
       
    47 
    37 @property (nonatomic,retain) IBOutlet UIButton *previewButton;
    48 @property (nonatomic,retain) IBOutlet UIButton *previewButton;
    38 @property (nonatomic,retain) IBOutlet UITableView *tableView;
    49 @property (nonatomic,retain) IBOutlet UITableView *tableView;
    39 @property (nonatomic,retain) IBOutlet UILabel *maxLabel;
    50 @property (nonatomic,retain) IBOutlet UILabel *maxLabel;
    40 @property (nonatomic,retain) IBOutlet UILabel *sizeLabel;
    51 @property (nonatomic,retain) IBOutlet UILabel *sizeLabel;
    41 @property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;
    52 @property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;
    42 @property (nonatomic,retain) IBOutlet UISlider *slider;
    53 @property (nonatomic,retain) IBOutlet UISlider *slider;
    43 
    54 
       
    55 @property (nonatomic,retain) NSIndexPath *lastIndexPath;
       
    56 @property (nonatomic,retain) NSArray *themeArray;
       
    57 @property (nonatomic,retain) NSArray *mapArray;
       
    58 
    44 -(IBAction) updatePreview;
    59 -(IBAction) updatePreview;
    45 -(IBAction) sliderChanged:(id) sender;
    60 -(IBAction) sliderChanged:(id) sender;
    46 -(IBAction) sliderEndedChanging:(id) sender;
    61 -(IBAction) sliderEndedChanging:(id) sender;
    47 -(IBAction) segmentedControlChanged:(id) sender;
    62 -(IBAction) segmentedControlChanged:(id) sender;
       
    63 -(void) turnOnWidgets;
       
    64 -(void) turnOffWidgets;
    48 
    65 
    49 -(void) engineProtocol:(NSInteger) port;
    66 -(void) engineProtocol:(NSInteger) port;
    50 
    67 
    51 @end
    68 @end