commit c340cf842fbf5fea476a6637efe4928dbd734eba
Author: Chris Rittenhouse <dev@litritt.com>
Date: Thu Apr 27 17:24:30 2023 -0400
Addresses Riley's requested changes
- Minor code structure change in extension
- Minor changes to text and phrasing
commit 2a928dfa637dfb503e861dc863f6f85f5240941a
Author: Chris Rittenhouse <dev@litritt.com>
Date: Wed Apr 26 20:11:38 2023 -0400
Adds implementation for Toast Notifications Experimental Feature
commit 4fa7d139669994eff888c41bf7af9ac0b6cd2a75
Author: Chris Rittenhouse <dev@litritt.com>
Date: Wed Apr 26 20:11:04 2023 -0400
Adds @Feature and @Options for Toast Notifications Experimental Feature
Co-authored-by: Chris Rittenhouse <dev@litritt.com>
39 lines
1.1 KiB
Swift
39 lines
1.1 KiB
Swift
//
|
|
// ToastNotificationOptions.swift
|
|
// Delta
|
|
//
|
|
// Created by Chris Rittenhouse on 4/25/23.
|
|
// Copyright © 2023 Riley Testut. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
import DeltaFeatures
|
|
|
|
struct ToastNotificationOptions
|
|
{
|
|
@Option(name: "Duration", description: "Change how long toasts should be shown.", detailView: { duration in
|
|
HStack {
|
|
Text("Duration: \(duration.wrappedValue, specifier: "%.1f")s")
|
|
Slider(value: duration, in: 1...5, step: 0.5).displayInline()
|
|
}
|
|
})
|
|
var duration: Double = 1.5
|
|
|
|
@Option(name: "Game Data Saved",
|
|
description: "Show toasts when performing an in game save.")
|
|
var gameSaveEnabled: Bool = true
|
|
|
|
@Option(name: "Saved Save State",
|
|
description: "Show toasts when saving a save state.")
|
|
var stateSaveEnabled: Bool = true
|
|
|
|
@Option(name: "Loaded Save State",
|
|
description: "Show toasts when loading a save state.")
|
|
var stateLoadEnabled: Bool = true
|
|
|
|
@Option(name: "Fast Forward Toggled",
|
|
description: "Show toasts when toggling fast forward.")
|
|
var fastForwardEnabled: Bool = true
|
|
}
|