project_files/HedgewarsMobile/Classes/MapConfigViewController.h
author koda
Mon, 30 Aug 2010 05:42:03 +0200
changeset 3791 98072b3871c1
parent 3783 8e9daf967406
child 3829 81db3c85784b
permissions -rw-r--r--
help page for ingame, some other fixes here and there
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
3705
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    12
@protocol MapConfigDelegate <NSObject>
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    13
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    14
-(void) buttonPressed:(id) sender;
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    15
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    16
@end
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    17
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    18
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    19
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
3705
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    20
    id<MapConfigDelegate> delegate;
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    21
    
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    22
    TCPsocket sd, csd;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    23
    NSInteger oldValue;  //slider
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    24
    NSInteger oldPage;   //segmented control
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    25
    BOOL busy;
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3642
diff changeset
    26
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    27
    // objects read (mostly) by parent view
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    28
    NSInteger maxHogs;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    29
    NSString *seedCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    30
    NSString *templateFilterCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    31
    NSString *mapGenCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    32
    NSString *mazeSizeCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    33
    NSString *themeCommand;
3642
fb39fecca350 support for static map added to iFrontend
koda
parents: 3547
diff changeset
    34
    NSString *staticMapCommand;
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3642
diff changeset
    35
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    36
    // various widgets in the view
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    37
    UIButton *previewButton;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    38
    UITableView *tableView;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    39
    UILabel *maxLabel;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    40
    UILabel *sizeLabel;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    41
    UISegmentedControl *segmentedControl;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    42
    UISlider *slider;
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3642
diff changeset
    43
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    44
    // internal objects
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    45
    NSIndexPath *lastIndexPath;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    46
    NSArray *themeArray;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    47
    NSArray *mapArray;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    48
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    49
3705
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    50
@property (nonatomic,retain) id<MapConfigDelegate> delegate;
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    51
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    52
@property (nonatomic) NSInteger maxHogs;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    53
@property (nonatomic) BOOL busy;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    54
@property (nonatomic,retain) NSString *seedCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    55
@property (nonatomic,retain) NSString *templateFilterCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    56
@property (nonatomic,retain) NSString *mapGenCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    57
@property (nonatomic,retain) NSString *mazeSizeCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    58
@property (nonatomic,retain) NSString *themeCommand;
3642
fb39fecca350 support for static map added to iFrontend
koda
parents: 3547
diff changeset
    59
@property (nonatomic,retain) NSString *staticMapCommand;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    60
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    61
@property (nonatomic,retain) IBOutlet UIButton *previewButton;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    62
@property (nonatomic,retain) IBOutlet UITableView *tableView;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    63
@property (nonatomic,retain) IBOutlet UILabel *maxLabel;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    64
@property (nonatomic,retain) IBOutlet UILabel *sizeLabel;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    65
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    66
@property (nonatomic,retain) IBOutlet UISlider *slider;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    67
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    68
@property (nonatomic,retain) NSIndexPath *lastIndexPath;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    69
@property (nonatomic,retain) NSArray *themeArray;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    70
@property (nonatomic,retain) NSArray *mapArray;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    71
3705
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    72
-(IBAction) buttonPressed:(id) sender;
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    73
3783
8e9daf967406 X&Y buttons, sounds for some buttons, cleanup
koda
parents: 3705
diff changeset
    74
-(IBAction) mapButtonPressed;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    75
-(IBAction) sliderChanged:(id) sender;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    76
-(IBAction) sliderEndedChanging:(id) sender;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    77
-(IBAction) segmentedControlChanged:(id) sender;
3705
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    78
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    79
-(void) turnOnWidgets;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    80
-(void) turnOffWidgets;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    81
-(void) setLabelText:(NSString *)str;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    82
-(void) setButtonImage:(UIImage *)img;
3783
8e9daf967406 X&Y buttons, sounds for some buttons, cleanup
koda
parents: 3705
diff changeset
    83
-(void) updatePreview;
8e9daf967406 X&Y buttons, sounds for some buttons, cleanup
koda
parents: 3705
diff changeset
    84
-(void) updatePreviewWithMap:(NSInteger) index;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    85
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    86
-(const uint8_t *)engineProtocol:(NSInteger) port;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    87
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    88
@end