import SwiftUI // MARK: - Multi-Monitor Selection Overlay View struct MultiMonitorSelectionOverlayView: View { @State private var animationOffset: CGFloat = 0 var body: some View { ZStack { // Semi-transparent background with subtle gradient Rectangle() .fill( LinearGradient( gradient: Gradient(colors: [ Color.blue.opacity(0.15), Color.blue.opacity(0.25) ]), startPoint: .topLeading, endPoint: .bottomTrailing ) ) // Animated border Rectangle() .stroke( LinearGradient( gradient: Gradient(colors: [ Color.blue.opacity(0.8), Color.cyan.opacity(0.6), Color.blue.opacity(0.8) ]), startPoint: .leading, endPoint: .trailing ), lineWidth: 2 ) .overlay( // Animated dashed border for better visibility Rectangle() .stroke( Color.white.opacity(0.8), style: StrokeStyle( lineWidth: 1, dash: [8, 4], dashPhase: animationOffset ) ) ) } .frame(maxWidth: .infinity, maxHeight: .infinity) .onAppear { // Start the dash animation withAnimation(.linear(duration: 2).repeatForever(autoreverses: false)) { animationOffset = 24 } } } } // MARK: - Crosshair Overlay View struct CrosshairOverlayView: View { let mouseLocation: CGPoint private let crosshairSize: CGFloat = 20 var body: some View { ZStack { // Horizontal line Rectangle() .fill(Color.white) .frame(width: crosshairSize, height: 2) .shadow(color: .black, radius: 1, x: 0, y: 0) // Vertical line Rectangle() .fill(Color.white) .frame(width: 2, height: crosshairSize) .shadow(color: .black, radius: 1, x: 0, y: 0) } .position(mouseLocation) .allowsHitTesting(false) // Don't interfere with mouse events } }