Skip to content

Commit

Permalink
Merge pull request #1 from aapis/feature/updated-scenarios
Browse files Browse the repository at this point in the history
Added new steps to secondary ITLS and ongoing surveys
  • Loading branch information
aapis authored Aug 31, 2024
2 parents 65c6772 + 393d697 commit f8b52ae
Show file tree
Hide file tree
Showing 3 changed files with 348 additions and 143 deletions.
12 changes: 12 additions & 0 deletions NeuronalFire/NeuronalFire.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
535E48D62C81598A005C241F /* Home.swift in Sources */ = {isa = PBXBuildFile; fileRef = 535E48D52C815989005C241F /* Home.swift */; };
535E48DA2C8159EB005C241F /* PatientAssessmentGuide.swift in Sources */ = {isa = PBXBuildFile; fileRef = 535E48D92C8159E8005C241F /* PatientAssessmentGuide.swift */; };
535E48DD2C815A20005C241F /* GCSCalculator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 535E48DC2C815A1C005C241F /* GCSCalculator.swift */; };
53621FD52C83A3F100CA4BF5 /* View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53621FD42C83A3F000CA4BF5 /* View.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -53,6 +54,7 @@
535E48D52C815989005C241F /* Home.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Home.swift; sourceTree = "<group>"; };
535E48D92C8159E8005C241F /* PatientAssessmentGuide.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PatientAssessmentGuide.swift; sourceTree = "<group>"; };
535E48DC2C815A1C005C241F /* GCSCalculator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GCSCalculator.swift; sourceTree = "<group>"; };
53621FD42C83A3F000CA4BF5 /* View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = View.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -103,6 +105,7 @@
535E48A72C815925005C241F /* NeuronalFire */ = {
isa = PBXGroup;
children = (
53621FD32C83A3DC00CA4BF5 /* Overrides */,
535E48D72C8159D6005C241F /* Pages */,
535E48D52C815989005C241F /* Home.swift */,
535E48A82C815925005C241F /* NeuronalFireApp.swift */,
Expand Down Expand Up @@ -165,6 +168,14 @@
path = GCSCalculator;
sourceTree = "<group>";
};
53621FD32C83A3DC00CA4BF5 /* Overrides */ = {
isa = PBXGroup;
children = (
53621FD42C83A3F000CA4BF5 /* View.swift */,
);
path = Overrides;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -300,6 +311,7 @@
535E48D62C81598A005C241F /* Home.swift in Sources */,
535E48DD2C815A20005C241F /* GCSCalculator.swift in Sources */,
535E48DA2C8159EB005C241F /* PatientAssessmentGuide.swift in Sources */,
53621FD52C83A3F100CA4BF5 /* View.swift in Sources */,
535E48A92C815925005C241F /* NeuronalFireApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
32 changes: 32 additions & 0 deletions NeuronalFire/NeuronalFire/Overrides/View.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// View.swift
// NeuronalFire
//
// Created by Ryan Priebe on 2024-08-31.
//

//import Foundation
import SwiftUI

struct EdgeBorder: Shape {
var width: CGFloat
var edges: [Edge]

func path(in rect: CGRect) -> Path {
edges.map { edge -> Path in
switch edge {
case .top: return Path(.init(x: rect.minX, y: rect.minY, width: rect.width, height: width))
case .bottom: return Path(.init(x: rect.minX, y: rect.maxY - width, width: rect.width, height: width))
case .leading: return Path(.init(x: rect.minX, y: rect.minY, width: width, height: rect.height))
case .trailing: return Path(.init(x: rect.maxX - width, y: rect.minY, width: width, height: rect.height))
}
}.reduce(into: Path()) { $0.addPath($1) }
}
}


extension View {
func border(width: CGFloat, edges: [Edge], color: Color) -> some View {
overlay(EdgeBorder(width: width, edges: edges).foregroundColor(color))
}
}
Loading

0 comments on commit f8b52ae

Please sign in to comment.