project_files/HedgewarsMobile/Classes/OverlayViewController.h
author koda
Mon, 09 Apr 2012 23:20:42 +0200
changeset 6877 b899393c8450
parent 6832 fae8fd118da9
permissions -rw-r--r--
vob* variables need to be reset
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3829
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
     1
/*
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
     2
 * Hedgewars-iOS, a Hedgewars port for iOS devices
6700
e04da46ee43c the most important commit of the year
koda
parents: 6624
diff changeset
     3
 * Copyright (c) 2009-2012 Vittorio Giovara <vittorio.giovara@gmail.com>
3829
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
     4
 *
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
81db3c85784b headers ftw, also right project file
koda
parents: 3792
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: 3792
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
     8
 *
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
    12
 * GNU General Public License for more details.
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
    13
 *
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
    14
 * You should have received a copy of the GNU General Public License
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
    15
 * along with this program; if not, write to the Free Software
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
81db3c85784b headers ftw, also right project file
koda
parents: 3792
diff changeset
    17
 */
81db3c85784b headers ftw, also right project file
koda
parents: 3792
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>
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    21
6832
fae8fd118da9 dates are no more!
koda
parents: 6830
diff changeset
    22
3647
0d0df215fb52 making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents: 3646
diff changeset
    23
@class InGameMenuViewController;
6830
d2df090453aa ios: prevent an horrible hack for the in-game help pages; they would actually need a serious refactoring to allow localisation and rotation support
koda
parents: 6825
diff changeset
    24
@class HelpPageInGameViewController;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    25
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    26
@interface OverlayViewController : UIViewController {
3647
0d0df215fb52 making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents: 3646
diff changeset
    27
    // the timer that dims the overlay
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    28
    NSTimer *dimTimer;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    29
3647
0d0df215fb52 making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents: 3646
diff changeset
    30
    // the in-game menu
3971
5c82ee165ed5 minor stuff
koda
parents: 3941
diff changeset
    31
    UIPopoverController *popoverController; // iPad only, never set on iPhone
3647
0d0df215fb52 making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents: 3646
diff changeset
    32
    InGameMenuViewController *popupMenu;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    33
    BOOL isPopoverVisible;
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3661
diff changeset
    34
3791
98072b3871c1 help page for ingame, some other fixes here and there
koda
parents: 3737
diff changeset
    35
    // the help menu
6830
d2df090453aa ios: prevent an horrible hack for the in-game help pages; they would actually need a serious refactoring to allow localisation and rotation support
koda
parents: 6825
diff changeset
    36
    HelpPageInGameViewController *helpPage;
3933
1a873262f5dd polishing the cocoa ammomenu a little, still requires work
koda
parents: 3922
diff changeset
    37
    
3647
0d0df215fb52 making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents: 3646
diff changeset
    38
    // ths touch section
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    39
    CGFloat initialDistanceForPinching;
3651
7058ca178f3b switching hogs now works
koda
parents: 3650
diff changeset
    40
    CGPoint startingPoint;
3737
2ba6ac8a114b reworked the initialization functions, now it should be safe to update and no more need of spinning wheel at first launch
koda
parents: 3703
diff changeset
    41
    BOOL isAttacking;
5174
f5294509783e initial refactoring of ObjcExports and OverlayViewController
koda
parents: 5166
diff changeset
    42
5175
a3da220dbb3f finish overlay refactoring and some leak annihilation
koda
parents: 5174
diff changeset
    43
    // various other widgets
6247
6dfad55fd71c unified the objc game state in a single place, which allowed some optimization to ObjcExport class (and more)
koda
parents: 6018
diff changeset
    44
    UIActivityIndicatorView *loadingIndicator;
5175
a3da220dbb3f finish overlay refactoring and some leak annihilation
koda
parents: 5174
diff changeset
    45
    UIButton *confirmButton;
a3da220dbb3f finish overlay refactoring and some leak annihilation
koda
parents: 5174
diff changeset
    46
    UISegmentedControl *grenadeTimeSegment;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    47
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    48
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    49
@property (nonatomic,retain) id popoverController;
3647
0d0df215fb52 making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents: 3646
diff changeset
    50
@property (nonatomic,retain) InGameMenuViewController *popupMenu;
6830
d2df090453aa ios: prevent an horrible hack for the in-game help pages; they would actually need a serious refactoring to allow localisation and rotation support
koda
parents: 6825
diff changeset
    51
@property (nonatomic,retain) HelpPageInGameViewController *helpPage;
6247
6dfad55fd71c unified the objc game state in a single place, which allowed some optimization to ObjcExport class (and more)
koda
parents: 6018
diff changeset
    52
@property (nonatomic,retain) UIActivityIndicatorView *loadingIndicator;
5175
a3da220dbb3f finish overlay refactoring and some leak annihilation
koda
parents: 5174
diff changeset
    53
@property (nonatomic,retain) UIButton *confirmButton;
a3da220dbb3f finish overlay refactoring and some leak annihilation
koda
parents: 5174
diff changeset
    54
@property (nonatomic,retain) UISegmentedControl *grenadeTimeSegment;
6018
3b86826f6665 add a class method for getting the overlay (and fix a silly mistake while at it) and use it
koda
parents: 5662
diff changeset
    55
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    56
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    57
-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    58
-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    59
-(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    60
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    61
-(IBAction) buttonReleased:(id) sender;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    62
-(IBAction) buttonPressed:(id) sender;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    63
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    64
-(void) showPopover;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    65
-(void) dismissPopover;
6822
206db098f8c5 ios headers cleanup, with tweaks to +randomPort and grenade timer handling in overlay
koda
parents: 6700
diff changeset
    66
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    67
-(void) dimOverlay;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    68
-(void) activateOverlay;
6822
206db098f8c5 ios headers cleanup, with tweaks to +randomPort and grenade timer handling in overlay
koda
parents: 6700
diff changeset
    69
-(void) clearOverlay;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    70
5174
f5294509783e initial refactoring of ObjcExports and OverlayViewController
koda
parents: 5166
diff changeset
    71
#define ANIMATION_DURATION 0.25
f5294509783e initial refactoring of ObjcExports and OverlayViewController
koda
parents: 5166
diff changeset
    72
#define CONFIRMATION_TAG 5959
f5294509783e initial refactoring of ObjcExports and OverlayViewController
koda
parents: 5166
diff changeset
    73
#define GRENADE_TAG 9595
f5294509783e initial refactoring of ObjcExports and OverlayViewController
koda
parents: 5166
diff changeset
    74
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    75
@end