GBA002/DeltaFeatures/Extensions/EnvironmentValues+FeatureOption.swift
Riley Testut 39522fda58 [Experimental Feature] Supports AirPlay controller skins
Allows users to customize controller skin when AirPlaying games to an external display.
2023-04-27 14:58:51 -05:00

23 lines
491 B
Swift

//
// EnvironmentValues+FeatureOption.swift
// DeltaFeatures
//
// Created by Riley Testut on 4/26/23.
// Copyright © 2023 Riley Testut. All rights reserved.
//
import SwiftUI
private struct FeatureOptionKey: EnvironmentKey
{
static let defaultValue: any AnyOption = Option(wrappedValue: true)
}
public extension EnvironmentValues
{
var featureOption: any AnyOption {
get { self[FeatureOptionKey.self] }
set { self[FeatureOptionKey.self] = newValue }
}
}