aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation
diff options
context:
space:
mode:
Diffstat (limited to 'Map/Presentation')
-rw-r--r--Map/Presentation/Base Components/MapRender/MapIntertias.swift (renamed from Map/Presentation/Base Components/MapRender/MapBlockers.swift)16
-rw-r--r--Map/Presentation/Base Components/MapTextEditor.swift4
-rw-r--r--Map/Presentation/Complex Components/MapRender/MapRenderView.swift2
-rw-r--r--Map/Presentation/Theme/Color+theme.swift2
4 files changed, 12 insertions, 12 deletions
diff --git a/Map/Presentation/Base Components/MapRender/MapBlockers.swift b/Map/Presentation/Base Components/MapRender/MapIntertias.swift
index e550ca9..91ec6f9 100644
--- a/Map/Presentation/Base Components/MapRender/MapBlockers.swift
+++ b/Map/Presentation/Base Components/MapRender/MapIntertias.swift
@@ -14,16 +14,16 @@
// along with this program. If not, see https://map.tranquil.systems.
import SwiftUI
-struct MapBlockers: View {
+struct MapIntertias: View {
let mapSize: CGSize
let vertexSize: CGSize
- let blockers: [Blocker]
+ let inertias: [Inertia]
let cornerSize = CGSize(width: 2.0, height: 2.0)
var body: some View {
- ForEach(blockers, id: \.id) { vertex in
+ ForEach(inertias, id: \.id) { vertex in
Path { path in
path.addRoundedRect(
in: CGRect(
@@ -32,7 +32,7 @@ struct MapBlockers: View {
y: h(vertex.position.y) - vertexSize.height * 2 / 3),
size: CGSize(width: vertexSize.width / 2, height: vertexSize.height * 2)
), cornerSize: cornerSize)
- }.fill(Color.Theme.Map.blockerColor)
+ }.fill(Color.Theme.Map.inertia)
}
}
@@ -46,10 +46,10 @@ struct MapBlockers: View {
}
#Preview {
- MapBlockers(
+ MapIntertias(
mapSize: CGSize(width: 400.0, height: 400.0), vertexSize: CGSize(width: 25.0, height: 25.0),
- blockers: [
- Blocker(id: 0, position: CGPoint(x: 50.0, y: 50.0)),
- Blocker(id: 1, position: CGPoint(x: 10.0, y: 20.0)),
+ inertias: [
+ Inertia(id: 0, position: CGPoint(x: 50.0, y: 50.0)),
+ Inertia(id: 1, position: CGPoint(x: 10.0, y: 20.0)),
])
}
diff --git a/Map/Presentation/Base Components/MapTextEditor.swift b/Map/Presentation/Base Components/MapTextEditor.swift
index fe4a7d6..b247047 100644
--- a/Map/Presentation/Base Components/MapTextEditor.swift
+++ b/Map/Presentation/Base Components/MapTextEditor.swift
@@ -36,7 +36,7 @@ class MapTextEditorController: NSViewController {
private let vertexRegex = MapParsingPatterns.vertex
private let edgeRegex = MapParsingPatterns.edge
- private let blockerRegex = MapParsingPatterns.blocker
+ private let inertiaRegex = MapParsingPatterns.inertia
private let opportunityRegex = MapParsingPatterns.opportunity
private let noteRegex = MapParsingPatterns.note
private let stageRegex = MapParsingPatterns.stage
@@ -195,7 +195,7 @@ extension MapTextEditorController: NSTextStorageDelegate {
[.foregroundColor: NSColor.Theme.Syntax.number], range: match.range(at: 4))
}
- matches = blockerRegex.matches(in: textStorage.string, options: [], range: range)
+ matches = inertiaRegex.matches(in: textStorage.string, options: [], range: range)
for match in matches {
textStorage.addAttributes(
diff --git a/Map/Presentation/Complex Components/MapRender/MapRenderView.swift b/Map/Presentation/Complex Components/MapRender/MapRenderView.swift
index b821634..3b97945 100644
--- a/Map/Presentation/Complex Components/MapRender/MapRenderView.swift
+++ b/Map/Presentation/Complex Components/MapRender/MapRenderView.swift
@@ -65,7 +65,7 @@ struct MapRenderView: View {
MapOpportunities(
mapSize: mapSize, lineWidth: lineWidth, vertexSize: vertexSize,
opportunities: parsedMap.opportunities)
- MapBlockers(mapSize: mapSize, vertexSize: vertexSize, blockers: parsedMap.blockers)
+ MapIntertias(mapSize: mapSize, vertexSize: vertexSize, inertias: parsedMap.inertias)
}.mask {
MapMask(
mapSize: mapSize, vertexSize: vertexSize, vertices: parsedMap.vertices)
diff --git a/Map/Presentation/Theme/Color+theme.swift b/Map/Presentation/Theme/Color+theme.swift
index 22dc18b..4433dc1 100644
--- a/Map/Presentation/Theme/Color+theme.swift
+++ b/Map/Presentation/Theme/Color+theme.swift
@@ -44,7 +44,7 @@ extension Color {
static let labelColor = Color.Theme.darkSlate
static let axisColor = Color.Theme.darkSlate
static let vertexColor = Color.Theme.darkSlate
- static let blockerColor = Color.Theme.jasperRed
+ static let inertia = Color.Theme.jasperRed
static let opportunityColor = Color.Theme.olympicBlue
static let stageForeground = Color.Theme.lightNeutralGray
static let stageBackground = Color.white