includes on screen controls

This commit is contained in:
Long Le committed 2023-06-27 14:13:05 -07:00
1 parent 1c90ee607a
commit 6740a7130b
48 files changed
+2474 -176

No files matched your search

@@ -0,0 +1,43 @@
//
// OnScreenButtonState.m
// Moonlight
//
// Created by Long Le on 10/20/22.
// Copyright © 2022 Moonlight Game Streaming Project. All rights reserved.
//
#import "OnScreenButtonState.h"
@implementation OnScreenButtonState
- (id) initWithButtonName:(NSString*)name isHidden:(BOOL)isHidden andPosition:(CGPoint)position {
if ((self = [self init])) {
self.name = name;
self.isHidden = isHidden;
self.position = position;
}
return self;
}
+ (BOOL) supportsSecureCoding {
return YES;
}
- (void) encodeWithCoder:(NSCoder*)encoder {
[encoder encodeObject:self.name forKey:@"name"];
[encoder encodeBool:self.isHidden forKey:@"isHidden"];
[encoder encodeCGPoint:self.position forKey:@"position"];
}
- (id) initWithCoder:(NSCoder*)decoder {
if (self = [super init]) {
self.name = [decoder decodeObjectForKey:@"name"];
self.isHidden = [decoder decodeBoolForKey:@"isHidden"];
self.position = [decoder decodeCGPointForKey:@"position"];
}
return self;
}
@end