Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add isVisible to StreamDeckSimulator #44

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Example/Example App/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct ContentView: View {
Label("3. Example - Animated", systemImage: "figure.stairs")
}
.tag(Example.animated)

sessionStateView
.tabItem {
Label("4. Example - Device Specific", systemImage: "figure.dance")
Expand Down
5 changes: 5 additions & 0 deletions Sources/StreamDeckSimulator/StreamDeckSimulator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ public final class StreamDeckSimulator {
return windowScene?.first { $0.activationState == .foregroundActive }
}

/// Returns whether the Stream Deck simulator overlay is visible.
public static var isVisible: Bool {
!(shared.window?.isHidden ?? true)
}

/// Shows a Stream Deck simulator overlay in the current scene.
///
/// The overlay is contained in a new UIWindow. You will still be able to interact with your application UI.
Expand Down