2
* Hedgewars-iOS, a Hedgewars port for iOS devices
3
* Copyright (c) 2009-2012 Vittorio Giovara <vittorio.giovara@gmail.com>
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
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.
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.
20
#import <UIKit/UIKit.h>
21
#import "MapPreviewButtonView.h"
22
#import "MNEValueTrackingSlider.h"
25
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, MapPreviewViewDelegate> {
26
NSInteger oldValue; // for the slider
27
NSInteger oldPage; // for the segmented control
28
BOOL busy; // for the preview button
30
// objects read (mostly) by parent view
32
NSString *seedCommand;
33
NSString *templateFilterCommand;
34
NSString *mapGenCommand;
35
NSString *mazeSizeCommand;
36
NSString *themeCommand;
37
NSString *staticMapCommand;
38
NSString *missionCommand;
40
// various widgets in the view
41
MapPreviewButtonView *previewButton;
42
UITableView *tableView;
44
UISegmentedControl *segmentedControl;
45
MNEValueTrackingSlider *slider;
48
NSIndexPath *lastIndexPath;
49
NSArray *dataSourceArray;
53
@property (nonatomic,assign) NSInteger oldValue;
54
@property (nonatomic,assign) NSInteger oldPage;
55
@property (nonatomic,assign) BOOL busy;
56
@property (nonatomic,assign) NSInteger maxHogs;
57
@property (nonatomic,retain) NSString *seedCommand;
58
@property (nonatomic,retain) NSString *templateFilterCommand;
59
@property (nonatomic,retain) NSString *mapGenCommand;
60
@property (nonatomic,retain) NSString *mazeSizeCommand;
61
@property (nonatomic,retain) NSString *themeCommand;
62
@property (nonatomic,retain) NSString *staticMapCommand;
63
@property (nonatomic,retain) NSString *missionCommand;
65
@property (nonatomic,retain) IBOutlet MapPreviewButtonView *previewButton;
66
@property (nonatomic,retain) IBOutlet UITableView *tableView;
67
@property (nonatomic,retain) IBOutlet UILabel *maxLabel;
68
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;
69
@property (nonatomic,retain) IBOutlet MNEValueTrackingSlider *slider;
71
@property (nonatomic,retain) NSIndexPath *lastIndexPath;
72
@property (nonatomic,retain) NSArray *dataSourceArray;
75
-(IBAction) mapButtonPressed:(id) sender;
76
-(IBAction) sliderChanged:(id) sender;
77
-(IBAction) sliderEndedChanging:(id) sender;
78
-(IBAction) segmentedControlChanged:(id) sender;
80
-(void) turnOnWidgets;
81
-(void) turnOffWidgets;
82
-(void) setMaxLabelText:(NSString *)str;
83
-(void) updatePreview;