project_files/HedgewarsMobile/Classes/OverlayViewController.h
author koda
Mon, 02 Aug 2010 00:55:24 +0200
changeset 3703 12d17c6e8855
parent 3661 2378ada8a6ee
child 3737 2ba6ac8a114b
permissions -rw-r--r--
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up

//
//  overlayViewController.h
//  HedgewarsMobile
//
//  Created by Vittorio on 16/03/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SDL_sysvideo.h"

@class InGameMenuViewController;

@interface OverlayViewController : UIViewController {
    // the timer that dims the overlay
    NSTimer *dimTimer;

    // the in-game menu
    UIPopoverController *popoverController; // iPad only
    InGameMenuViewController *popupMenu;
    BOOL isPopoverVisible;

    // ths touch section
    CGFloat initialDistanceForPinching;
    CGPoint startingPoint;
    BOOL isSegmentVisible;

    // the sdl window underneath
    SDL_Window *sdlwindow;
}

@property (nonatomic,retain) id popoverController;
@property (nonatomic,retain) InGameMenuViewController *popupMenu;

-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
-(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;

-(IBAction) buttonReleased:(id) sender;
-(IBAction) buttonPressed:(id) sender;

-(void) showPopover;
-(void) dismissPopover;
-(void) dimOverlay;
-(void) activateOverlay;

@end

BOOL isGameRunning;