cocoaTouch/MapConfigViewController.h
author koda
Sat, 05 Jun 2010 14:07:58 +0000
changeset 3495 a6b4f351d400
parent 3492 07256e1ad559
permissions -rw-r--r--
now engine can be optionally built as library, there's an example wrapper of how to use it building server is now disabled by default, saves users some headaches
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    14
    NSInteger oldValue;  //slider
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    15
    NSInteger oldPage;   //segmented control
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    16
    BOOL busy;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    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
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    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
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    33
    
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    34
    // internal objects
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    35
    NSIndexPath *lastIndexPath;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    36
    NSArray *themeArray;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    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
016b3172b645 a bunch of minor stuff
koda
parents: 3373
diff changeset
    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
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    46
@property (nonatomic,retain) NSString *themeCommand;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    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
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    55
@property (nonatomic,retain) NSIndexPath *lastIndexPath;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    56
@property (nonatomic,retain) NSArray *themeArray;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    57
@property (nonatomic,retain) NSArray *mapArray;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    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
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    63
-(void) turnOnWidgets;
c1ff724a5c34 use a proper bundle identifier
koda
parents: 3369
diff changeset
    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