project_files/HedgewarsMobile/Classes/MapConfigViewController.h
author koda
Tue, 20 Jul 2010 03:14:43 +0200
changeset 3659 f8d5ac50e307
parent 3642 fb39fecca350
child 3703 12d17c6e8855
permissions -rw-r--r--
half reworking of the settings page with delegation some graphical enhancements, leaks and fixes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     1
//
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     2
//  MapConfigViewController.h
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     3
//  HedgewarsMobile
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     4
//
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     5
//  Created by Vittorio on 22/04/10.
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     6
//  Copyright 2010 __MyCompanyName__. All rights reserved.
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     7
//
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     8
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     9
#import <UIKit/UIKit.h>
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    10
#import "SDL_net.h"
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    11
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    12
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    13
    TCPsocket sd, csd;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    14
    NSInteger oldValue;  //slider
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    15
    NSInteger oldPage;   //segmented control
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    16
    BOOL busy;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    17
    
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    18
    // objects read (mostly) by parent view
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    19
    NSInteger maxHogs;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    20
    NSString *seedCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    21
    NSString *templateFilterCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    22
    NSString *mapGenCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    23
    NSString *mazeSizeCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    24
    NSString *themeCommand;
3642
fb39fecca350 support for static map added to iFrontend
koda
parents: 3547
diff changeset
    25
    NSString *staticMapCommand;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    26
   
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    27
    // various widgets in the view
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    28
    UIButton *previewButton;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    29
    UITableView *tableView;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    30
    UILabel *maxLabel;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    31
    UILabel *sizeLabel;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    32
    UISegmentedControl *segmentedControl;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    33
    UISlider *slider;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    34
    
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    35
    // internal objects
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    36
    NSIndexPath *lastIndexPath;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    37
    NSArray *themeArray;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    38
    NSArray *mapArray;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    39
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    40
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    41
@property (nonatomic) NSInteger maxHogs;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    42
@property (nonatomic) BOOL busy;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    43
@property (nonatomic,retain) NSString *seedCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    44
@property (nonatomic,retain) NSString *templateFilterCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    45
@property (nonatomic,retain) NSString *mapGenCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    46
@property (nonatomic,retain) NSString *mazeSizeCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    47
@property (nonatomic,retain) NSString *themeCommand;
3642
fb39fecca350 support for static map added to iFrontend
koda
parents: 3547
diff changeset
    48
@property (nonatomic,retain) NSString *staticMapCommand;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    49
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    50
@property (nonatomic,retain) IBOutlet UIButton *previewButton;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    51
@property (nonatomic,retain) IBOutlet UITableView *tableView;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    52
@property (nonatomic,retain) IBOutlet UILabel *maxLabel;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    53
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    54
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    55
@property (nonatomic,retain) IBOutlet UISlider *slider;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    56
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    57
@property (nonatomic,retain) NSIndexPath *lastIndexPath;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    58
@property (nonatomic,retain) NSArray *themeArray;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    59
@property (nonatomic,retain) NSArray *mapArray;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    60
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    61
-(IBAction) updatePreview;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    62
-(IBAction) sliderChanged:(id) sender;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    63
-(IBAction) sliderEndedChanging:(id) sender;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    64
-(IBAction) segmentedControlChanged:(id) sender;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    65
-(void) turnOnWidgets;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    66
-(void) turnOffWidgets;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    67
-(void) setLabelText:(NSString *)str;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    68
-(void) setButtonImage:(UIImage *)img;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    69
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    70
-(const uint8_t *)engineProtocol:(NSInteger) port;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    71
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    72
@end