project_files/HedgewarsMobile/Classes/MapConfigViewController.h
author Wuzzy <Wuzzy2@mail.ru>
Mon, 08 Apr 2019 17:59:38 +0200
changeset 14776 97a36fb44123
parent 12877 00215a7ec5f5
permissions -rw-r--r--
WxW: Hide crate radar when no active hog
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3829
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
     1
/*
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
     2
 * Hedgewars-iOS, a Hedgewars port for iOS devices
6700
e04da46ee43c the most important commit of the year
koda
parents: 6679
diff changeset
     3
 * Copyright (c) 2009-2012 Vittorio Giovara <vittorio.giovara@gmail.com>
3829
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
     4
 *
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
     8
 *
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
    12
 * GNU General Public License for more details.
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
    13
 *
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
    14
 * You should have received a copy of the GNU General Public License
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
    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
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
    17
 */
81db3c85784b headers ftw, also right project file
koda
parents: 3783
diff changeset
    18
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    19
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    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
8efa91f98274 display an empty table for missions
koda
parents: 3930
diff changeset
    23
6832
fae8fd118da9 dates are no more!
koda
parents: 6700
diff changeset
    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
8efa91f98274 display an empty table for missions
koda
parents: 3930
diff changeset
    26
    NSInteger oldValue;     // for the slider
8efa91f98274 display an empty table for missions
koda
parents: 3930
diff changeset
    27
    NSInteger oldPage;      // for the segmented control
8efa91f98274 display an empty table for missions
koda
parents: 3930
diff changeset
    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
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    30
    // objects read (mostly) by parent view
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    31
    NSInteger maxHogs;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    32
    NSString *seedCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    33
    NSString *templateFilterCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    34
    NSString *mapGenCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    35
    NSString *mazeSizeCommand;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    36
    NSString *themeCommand;
3642
fb39fecca350 support for static map added to iFrontend
koda
parents: 3547
diff changeset
    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
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    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
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    42
    UITableView *tableView;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    43
    UILabel *maxLabel;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    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
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    47
    // internal objects
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    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
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    50
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    51
3705
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    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;
12877
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    57
@property (nonatomic, strong) NSString *seedCommand;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    58
@property (nonatomic, strong) NSString *templateFilterCommand;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    59
@property (nonatomic, strong) NSString *mapGenCommand;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    60
@property (nonatomic, strong) NSString *mazeSizeCommand;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    61
@property (nonatomic, strong) NSString *themeCommand;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    62
@property (nonatomic, strong) NSString *staticMapCommand;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    63
@property (nonatomic, strong) NSString *missionCommand;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    64
12877
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    65
@property (nonatomic, strong) IBOutlet MapPreviewButtonView *previewButton;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    66
@property (nonatomic, strong) IBOutlet UITableView *tableView;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    67
@property (nonatomic, strong) IBOutlet UILabel *maxLabel;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    68
@property (nonatomic, strong) IBOutlet UISegmentedControl *segmentedControl;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    69
@property (nonatomic, strong) IBOutlet MNEValueTrackingSlider *slider;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    70
12877
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    71
@property (nonatomic, strong) NSIndexPath *lastIndexPath;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    72
@property (nonatomic, strong) NSArray *dataSourceArray;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    73
3705
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    74
12877
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    75
- (IBAction)mapButtonPressed:(id)sender;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    76
- (IBAction)sliderChanged:(id)sender;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    77
- (IBAction)sliderEndedChanging:(id)sender;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    78
- (IBAction)segmentedControlChanged:(id)sender;
3705
e1959819a542 completing the ifrontend interface...
koda
parents: 3703
diff changeset
    79
12877
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    80
- (void)turnOnWidgets;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    81
- (void)turnOffWidgets;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    82
- (void)setMaxLabelText:(NSString *)str;
00215a7ec5f5 - BIG CHANGE: Convert iOS project to use ARC
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
    83
- (void)updatePreview;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    84
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    85
@end