author | KoBeWi |
Thu, 08 Feb 2018 08:50:45 +0100 | |
changeset 12922 | c0320d66310d |
parent 10108 | c68cf030eded |
child 12872 | 00215a7ec5f5 |
permissions | -rw-r--r-- |
3829 | 1 |
/* |
2 |
* Hedgewars-iOS, a Hedgewars port for iOS devices |
|
6700 | 3 |
* Copyright (c) 2009-2012 Vittorio Giovara <vittorio.giovara@gmail.com> |
3829 | 4 |
* |
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 |
|
8 |
* |
|
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. |
|
13 |
* |
|
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 |
|
10108
c68cf030eded
update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents:
6832
diff
changeset
|
16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
3829 | 17 |
*/ |
18 |
||
3547 | 19 |
|
20 |
#import <UIKit/UIKit.h> |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
21 |
#import "MapPreviewButtonView.h" |
6679
d8b98aa486a6
tweaks to the value tracking slider (doesn't draw outside the superview bounds) and assign proper copyright notice to it
koda
parents:
6634
diff
changeset
|
22 |
#import "MNEValueTrackingSlider.h" |
4349 | 23 |
|
6832 | 24 |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
25 |
@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, MapPreviewViewDelegate> { |
4349 | 26 |
NSInteger oldValue; // for the slider |
27 |
NSInteger oldPage; // for the segmented control |
|
28 |
BOOL busy; // for the preview button |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
29 |
|
3547 | 30 |
// objects read (mostly) by parent view |
31 |
NSInteger maxHogs; |
|
32 |
NSString *seedCommand; |
|
33 |
NSString *templateFilterCommand; |
|
34 |
NSString *mapGenCommand; |
|
35 |
NSString *mazeSizeCommand; |
|
36 |
NSString *themeCommand; |
|
3642 | 37 |
NSString *staticMapCommand; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
38 |
NSString *missionCommand; |
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
39 |
|
3547 | 40 |
// various widgets in the view |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
41 |
MapPreviewButtonView *previewButton; |
3547 | 42 |
UITableView *tableView; |
43 |
UILabel *maxLabel; |
|
44 |
UISegmentedControl *segmentedControl; |
|
6679
d8b98aa486a6
tweaks to the value tracking slider (doesn't draw outside the superview bounds) and assign proper copyright notice to it
koda
parents:
6634
diff
changeset
|
45 |
MNEValueTrackingSlider *slider; |
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3642
diff
changeset
|
46 |
|
3547 | 47 |
// internal objects |
48 |
NSIndexPath *lastIndexPath; |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
49 |
NSArray *dataSourceArray; |
3547 | 50 |
} |
51 |
||
3705 | 52 |
|
6115
485cfecadc9a
HUGE refactoring of the ipad interface, finally understood how to use interface builder with custom uiviewcontrollers, as well as converted some uitableviewcontrollers to uiviewcontrollers for simplicity
koda
parents:
6109
diff
changeset
|
53 |
@property (nonatomic,assign) NSInteger oldValue; |
485cfecadc9a
HUGE refactoring of the ipad interface, finally understood how to use interface builder with custom uiviewcontrollers, as well as converted some uitableviewcontrollers to uiviewcontrollers for simplicity
koda
parents:
6109
diff
changeset
|
54 |
@property (nonatomic,assign) NSInteger oldPage; |
485cfecadc9a
HUGE refactoring of the ipad interface, finally understood how to use interface builder with custom uiviewcontrollers, as well as converted some uitableviewcontrollers to uiviewcontrollers for simplicity
koda
parents:
6109
diff
changeset
|
55 |
@property (nonatomic,assign) BOOL busy; |
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
56 |
@property (nonatomic,assign) NSInteger maxHogs; |
3547 | 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; |
|
3642 | 62 |
@property (nonatomic,retain) NSString *staticMapCommand; |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
63 |
@property (nonatomic,retain) NSString *missionCommand; |
3547 | 64 |
|
3910
dd47efbdec46
move all preview drawing code into its own class (for a simplified and more readable MapConfigViewController)
koda
parents:
3829
diff
changeset
|
65 |
@property (nonatomic,retain) IBOutlet MapPreviewButtonView *previewButton; |
3547 | 66 |
@property (nonatomic,retain) IBOutlet UITableView *tableView; |
67 |
@property (nonatomic,retain) IBOutlet UILabel *maxLabel; |
|
68 |
@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl; |
|
6679
d8b98aa486a6
tweaks to the value tracking slider (doesn't draw outside the superview bounds) and assign proper copyright notice to it
koda
parents:
6634
diff
changeset
|
69 |
@property (nonatomic,retain) IBOutlet MNEValueTrackingSlider *slider; |
3547 | 70 |
|
71 |
@property (nonatomic,retain) NSIndexPath *lastIndexPath; |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3910
diff
changeset
|
72 |
@property (nonatomic,retain) NSArray *dataSourceArray; |
3547 | 73 |
|
3705 | 74 |
|
6109
f6726ec81e64
finally removed the white border glitch of the ipad preview map, moved initialization from IB to code
koda
parents:
6107
diff
changeset
|
75 |
-(IBAction) mapButtonPressed:(id) sender; |
3547 | 76 |
-(IBAction) sliderChanged:(id) sender; |
77 |
-(IBAction) sliderEndedChanging:(id) sender; |
|
78 |
-(IBAction) segmentedControlChanged:(id) sender; |
|
3705 | 79 |
|
3547 | 80 |
-(void) turnOnWidgets; |
81 |
-(void) turnOffWidgets; |
|
6115
485cfecadc9a
HUGE refactoring of the ipad interface, finally understood how to use interface builder with custom uiviewcontrollers, as well as converted some uitableviewcontrollers to uiviewcontrollers for simplicity
koda
parents:
6109
diff
changeset
|
82 |
-(void) setMaxLabelText:(NSString *)str; |
3783 | 83 |
-(void) updatePreview; |
3547 | 84 |
|
85 |
@end |