project_files/HedgewarsMobile/Classes/OverlayViewController.h
changeset 7110 c91d33837b0d
parent 7020 846cea23aea2
parent 7107 1982e702ed2f
child 7123 9fe1c4091dd1
equal deleted inserted replaced
7020:846cea23aea2 7110:c91d33837b0d
     1 /*
       
     2  * Hedgewars-iOS, a Hedgewars port for iOS devices
       
     3  * Copyright (c) 2009-2012 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 
       
    19 
       
    20 #import <UIKit/UIKit.h>
       
    21 
       
    22 
       
    23 @class InGameMenuViewController;
       
    24 @class HelpPageInGameViewController;
       
    25 
       
    26 @interface OverlayViewController : UIViewController {
       
    27     // the timer that dims the overlay
       
    28     NSTimer *dimTimer;
       
    29 
       
    30     // the in-game menu
       
    31     UIPopoverController *popoverController; // iPad only, never set on iPhone
       
    32     InGameMenuViewController *popupMenu;
       
    33     BOOL isPopoverVisible;
       
    34 
       
    35     // the help menu
       
    36     HelpPageInGameViewController *helpPage;
       
    37     
       
    38     // ths touch section
       
    39     CGFloat initialDistanceForPinching;
       
    40     CGPoint startingPoint;
       
    41     BOOL isAttacking;
       
    42 
       
    43     // various other widgets
       
    44     UIActivityIndicatorView *loadingIndicator;
       
    45     UIButton *confirmButton;
       
    46     UISegmentedControl *grenadeTimeSegment;
       
    47 }
       
    48 
       
    49 @property (nonatomic,retain) id popoverController;
       
    50 @property (nonatomic,retain) InGameMenuViewController *popupMenu;
       
    51 @property (nonatomic,retain) HelpPageInGameViewController *helpPage;
       
    52 @property (nonatomic,retain) UIActivityIndicatorView *loadingIndicator;
       
    53 @property (nonatomic,retain) UIButton *confirmButton;
       
    54 @property (nonatomic,retain) UISegmentedControl *grenadeTimeSegment;
       
    55 
       
    56 -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
       
    57 -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
       
    58 -(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
       
    59 -(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
       
    60 
       
    61 -(IBAction) buttonReleased:(id) sender;
       
    62 -(IBAction) buttonPressed:(id) sender;
       
    63 
       
    64 -(void) showPopover;
       
    65 -(void) dismissPopover;
       
    66 
       
    67 -(void) dimOverlay;
       
    68 -(void) activateOverlay;
       
    69 -(void) clearOverlay;
       
    70 
       
    71 #define ANIMATION_DURATION 0.25
       
    72 #define CONFIRMATION_TAG 5959
       
    73 #define GRENADE_TAG 9595
       
    74 
       
    75 @end