Skip to content

Commit

Permalink
Add isVisible to StreamDeckSimulator (#1) (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
finnvoor authored Nov 5, 2024
1 parent 7b02f04 commit eefc75b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit eefc75b

Please sign in to comment.