author | koda |
Mon, 04 Oct 2010 00:00:42 +0200 | |
changeset 3924 | 2a9ace189288 |
parent 3922 | 44804043b691 |
child 3933 | 1a873262f5dd |
permissions | -rw-r--r-- |
3829 | 1 |
/* |
2 |
* Hedgewars-iOS, a Hedgewars port for iOS devices |
|
3 |
* Copyright (c) 2009-2010 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 |
||
3547 | 21 |
|
22 |
#import <UIKit/UIKit.h> |
|
3647
0d0df215fb52
making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents:
3646
diff
changeset
|
23 |
#import "SDL_sysvideo.h" |
3547 | 24 |
|
3647
0d0df215fb52
making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents:
3646
diff
changeset
|
25 |
@class InGameMenuViewController; |
3792 | 26 |
@class HelpPageViewController; |
3547 | 27 |
|
28 |
@interface OverlayViewController : UIViewController { |
|
3647
0d0df215fb52
making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents:
3646
diff
changeset
|
29 |
// the timer that dims the overlay |
3547 | 30 |
NSTimer *dimTimer; |
31 |
||
3647
0d0df215fb52
making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents:
3646
diff
changeset
|
32 |
// the in-game menu |
0d0df215fb52
making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents:
3646
diff
changeset
|
33 |
UIPopoverController *popoverController; // iPad only |
0d0df215fb52
making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents:
3646
diff
changeset
|
34 |
InGameMenuViewController *popupMenu; |
3547 | 35 |
BOOL isPopoverVisible; |
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3661
diff
changeset
|
36 |
|
3791
98072b3871c1
help page for ingame, some other fixes here and there
koda
parents:
3737
diff
changeset
|
37 |
// the help menu |
3792 | 38 |
HelpPageViewController *helpPage; |
3791
98072b3871c1
help page for ingame, some other fixes here and there
koda
parents:
3737
diff
changeset
|
39 |
|
3647
0d0df215fb52
making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents:
3646
diff
changeset
|
40 |
// ths touch section |
3547 | 41 |
CGFloat initialDistanceForPinching; |
3651 | 42 |
CGPoint startingPoint; |
3650 | 43 |
BOOL isSegmentVisible; |
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
|
44 |
BOOL isAttacking; |
3547 | 45 |
} |
46 |
||
47 |
@property (nonatomic,retain) id popoverController; |
|
3647
0d0df215fb52
making chat work... (keyboard support is heavily broken in sdl upstream)
koda
parents:
3646
diff
changeset
|
48 |
@property (nonatomic,retain) InGameMenuViewController *popupMenu; |
3792 | 49 |
@property (nonatomic,retain) HelpPageViewController *helpPage; |
3547 | 50 |
|
51 |
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; |
|
52 |
-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; |
|
53 |
-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; |
|
54 |
-(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; |
|
55 |
||
56 |
-(IBAction) buttonReleased:(id) sender; |
|
57 |
-(IBAction) buttonPressed:(id) sender; |
|
58 |
||
59 |
-(void) showPopover; |
|
60 |
-(void) dismissPopover; |
|
61 |
-(void) dimOverlay; |
|
62 |
-(void) activateOverlay; |
|
63 |
||
64 |
@end |
|
3661 | 65 |
|
3904
22e4d74240e5
finishing touches to save games handling (help label, dim on overlay, edit text only when table is editable)
koda
parents:
3829
diff
changeset
|
66 |
// actual game started (controls should be enabled) |
3661 | 67 |
BOOL isGameRunning; |
3904
22e4d74240e5
finishing touches to save games handling (help label, dim on overlay, edit text only when table is editable)
koda
parents:
3829
diff
changeset
|
68 |
void setGameRunning(BOOL value); |
22e4d74240e5
finishing touches to save games handling (help label, dim on overlay, edit text only when table is editable)
koda
parents:
3829
diff
changeset
|
69 |
// black screen present |
22e4d74240e5
finishing touches to save games handling (help label, dim on overlay, edit text only when table is editable)
koda
parents:
3829
diff
changeset
|
70 |
BOOL isReplay; |
3791
98072b3871c1
help page for ingame, some other fixes here and there
koda
parents:
3737
diff
changeset
|
71 |
// cache the grenade time |
98072b3871c1
help page for ingame, some other fixes here and there
koda
parents:
3737
diff
changeset
|
72 |
NSInteger cachedGrenadeTime; |