mirror of
https://github.com/neon443/ShhShell.git
synced 2026-11-30 12:44:51 +00:00
ok cl fuck this shit its so long
This commit is contained in:
3 files changed
+29
-44
No files matched your search
@@ -52,8 +52,6 @@ struct TrafficLightYellow: View {
|
||||
}
|
||||
|
||||
struct TrafficLightGreen: View {
|
||||
@State var enabled: Bool = true
|
||||
|
||||
var body: some View {
|
||||
let background: Color = .green
|
||||
let foreground: Color = ColorCodable(
|
||||
@@ -66,46 +64,16 @@ struct TrafficLightGreen: View {
|
||||
.resizable().scaledToFit()
|
||||
.symbolRenderingMode(.palette)
|
||||
.foregroundStyle(background)
|
||||
if !enabled {
|
||||
RoundedRectangle(cornerRadius: 5)
|
||||
.foregroundStyle(foreground)
|
||||
.scaleEffect(0.6)
|
||||
.aspectRatio(1, contentMode: .fit)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 5))
|
||||
Rectangle()
|
||||
.foregroundStyle(background)
|
||||
.scaleEffect(0.8)
|
||||
.aspectRatio(0.2, contentMode: .fit)
|
||||
.rotationEffect(.degrees(45))
|
||||
} else {
|
||||
ZStack(alignment: .center) {
|
||||
Group {
|
||||
Rectangle()
|
||||
.foregroundStyle(foreground)
|
||||
.scaleEffect(0.6)
|
||||
.rotationEffect(.degrees(45))
|
||||
.aspectRatio(1, contentMode: .fit)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 5))
|
||||
}
|
||||
VStack(spacing: 0) {
|
||||
VStack(alignment: .trailing) {
|
||||
Rectangle()
|
||||
.scaleEffect(0.7, anchor: .bottomTrailing)
|
||||
.aspectRatio(1, contentMode: .fit)
|
||||
}
|
||||
.aspectRatio(2, contentMode: .fit)
|
||||
.border(.red)
|
||||
VStack(alignment: .leading) {
|
||||
Rectangle()
|
||||
.scaleEffect(0.7, anchor: .topLeading)
|
||||
.aspectRatio(1, contentMode: .fit)
|
||||
}
|
||||
.aspectRatio(2, contentMode: .fit)
|
||||
.border(.red)
|
||||
}
|
||||
.border(.blue)
|
||||
}
|
||||
}
|
||||
RoundedRectangle(cornerRadius: 5)
|
||||
.foregroundStyle(foreground)
|
||||
.scaleEffect(0.6)
|
||||
.aspectRatio(1, contentMode: .fit)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 5))
|
||||
Rectangle()
|
||||
.foregroundStyle(background)
|
||||
.scaleEffect(0.8)
|
||||
.aspectRatio(0.2, contentMode: .fit)
|
||||
.rotationEffect(.degrees(45))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// invert.metal
|
||||
// ShhShell
|
||||
//
|
||||
// Created by neon443 on 04/07/2025.
|
||||
//
|
||||
|
||||
#include <metal_stdlib>
|
||||
using namespace metal;
|
||||
|
||||
[[ stitchable ]] half4 invert(float2 pos, half4 color) {
|
||||
return half4(0, 1 - color.g, 1 - color.b, 1 - color.a);
|
||||
}
|
||||