project_files/HedgewarsMobile/Classes/OverlayViewController.h
branchhedgeroid
changeset 7855 ddcdedd3330b
parent 6350 41b0a9955c47
parent 7854 0b447175594f
child 7857 2bc61f8841a1
equal deleted inserted replaced
6350:41b0a9955c47 7855:ddcdedd3330b
     1 /*
       
     2  * Hedgewars-iOS, a Hedgewars port for iOS devices
       
     3  * Copyright (c) 2009-2011 Vittorio Giovara <vittorio.giovara@gmail.com>
       
     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
       
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
       
    17  *
       
    18  * File created on 16/03/2010.
       
    19  */
       
    20 
       
    21 
       
    22 #import <UIKit/UIKit.h>
       
    23 
       
    24 @class InGameMenuViewController;
       
    25 @class HelpPageViewController;
       
    26 @class AmmoMenuViewController;
       
    27 
       
    28 @interface OverlayViewController : UIViewController {
       
    29     // the timer that dims the overlay
       
    30     NSTimer *dimTimer;
       
    31 
       
    32     // the in-game menu
       
    33     UIPopoverController *popoverController; // iPad only, never set on iPhone
       
    34     InGameMenuViewController *popupMenu;
       
    35     BOOL isPopoverVisible;
       
    36 
       
    37     // the help menu
       
    38     HelpPageViewController *helpPage;
       
    39 
       
    40     // the objc ammomenu
       
    41     AmmoMenuViewController *amvc;
       
    42     
       
    43     // ths touch section
       
    44     CGFloat initialDistanceForPinching;
       
    45     CGPoint startingPoint;
       
    46     BOOL isAttacking;
       
    47     
       
    48     // dual head support
       
    49     NSInteger initialScreenCount;
       
    50 
       
    51     // various other widgets
       
    52     UIActivityIndicatorView *loadingIndicator;
       
    53     UIButton *confirmButton;
       
    54     UISegmentedControl *grenadeTimeSegment;
       
    55 }
       
    56 
       
    57 @property (nonatomic,retain) id popoverController;
       
    58 @property (nonatomic,retain) InGameMenuViewController *popupMenu;
       
    59 @property (nonatomic,retain) HelpPageViewController *helpPage;
       
    60 @property (nonatomic,retain) AmmoMenuViewController *amvc;
       
    61 @property (nonatomic,retain) UIActivityIndicatorView *loadingIndicator;
       
    62 @property (nonatomic,retain) UIButton *confirmButton;
       
    63 @property (nonatomic,retain) UISegmentedControl *grenadeTimeSegment;
       
    64 
       
    65 @property (assign) NSInteger initialScreenCount;
       
    66 
       
    67 
       
    68 +(OverlayViewController *)mainOverlay;
       
    69 
       
    70 -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
       
    71 -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
       
    72 -(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
       
    73 -(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
       
    74 
       
    75 -(IBAction) buttonReleased:(id) sender;
       
    76 -(IBAction) buttonPressed:(id) sender;
       
    77 
       
    78 -(void) showPopover;
       
    79 -(void) dismissPopover;
       
    80 -(void) dimOverlay;
       
    81 -(void) activateOverlay;
       
    82 -(void) removeOverlay;
       
    83 
       
    84 #define ANIMATION_DURATION 0.25
       
    85 #define CONFIRMATION_TAG 5959
       
    86 #define GRENADE_TAG 9595
       
    87 
       
    88 @end