mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-04-08 08:56:04 +00:00
started implementing on-screen controls
- directional pad works - a,b,x,y work
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user