on screen key test

This commit is contained in:
True Zhuanjia
2024-08-09 18:51:12 +08:00
parent bf1a30505f
commit e2f09d711d
10 changed files with 512 additions and 6 deletions
@@ -15,6 +15,7 @@
#import "CustomEdgeSwipeGestureRecognizer.h"
#import "CustomTapGestureRecognizer.h"
#import "LocalizationHelper.h"
#import "Moonlight-Swift.h"
#include <sys/socket.h>
#include <netinet/in.h>
@@ -162,6 +163,31 @@
{
[super viewDidAppear:animated];
OnScreenKeyView *keyView = [[OnScreenKeyView alloc] initWithKeyString:@"WIN" keyLabel:@"WIN"];
keyView.translatesAutoresizingMaskIntoConstraints = NO;
// Add the KeyView to the view controller's view
[self.view addSubview:keyView];
// Configure the KeyView's layout
CGFloat xOffset = 50;
CGFloat yOffset = 550;
CGFloat spacing = 10.0;
[keyView setKeyLocationWithXOffset:500 yOffset:(CGFloat)550];
#if !TARGET_OS_TV
[[self revealViewController] setPrimaryViewController:self];
[[NSNotificationCenter defaultCenter] addObserver:self