started implementing on-screen controls

- directional pad works
- a,b,x,y work
This commit is contained in:
Diego Waxemberg
2014-12-28 21:42:18 -05:00
parent 4a08288d0d
commit d6d30f021d
39 changed files with 412 additions and 3 deletions

View File

@@ -8,17 +8,23 @@
#import "StreamView.h"
#include <Limelight.h>
#import "OnScreenControls.h"
@implementation StreamView {
CGPoint touchLocation;
BOOL touchMoved;
OnScreenControls* onScreenControls;
}
- (void) setupOnScreenControls {
onScreenControls = [[OnScreenControls alloc] initWithView:self];
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
touchLocation = [touch locationInView:self];
touchMoved = false;
[onScreenControls handleTouchDownEvent:event];
NSLog(@"Touch down");
}
@@ -53,8 +59,7 @@
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
NSLog(@"Touch up");
[onScreenControls handleTouchUpEvent:event];
if (!touchMoved) {
if ([[event allTouches] count] == 2) {
NSLog(@"Sending right mouse button press");