Skip to content

Commit

Permalink
💄 (GameEngineKit): Update colors in activities
Browse files Browse the repository at this point in the history
  • Loading branch information
HPezz committed Sep 22, 2023
1 parent 0e3fb64 commit c2b9f32
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 35 deletions.
14 changes: 7 additions & 7 deletions Modules/GameEngineKit/Sources/Specific/Melody/MelodyView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import DesignKit
import SwiftUI

public let kListOfTiles: [XylophoneTile] = [
XylophoneTile(id: 0, noteNumber: 24, color: .pink),
XylophoneTile(id: 1, noteNumber: 26, color: .red),
XylophoneTile(id: 2, noteNumber: 28, color: .orange),
XylophoneTile(id: 3, noteNumber: 29, color: .yellow),
XylophoneTile(id: 4, noteNumber: 31, color: .green),
XylophoneTile(id: 5, noteNumber: 33, color: .blue),
XylophoneTile(id: 6, noteNumber: 35, color: .purple),
XylophoneTile(id: 0, noteNumber: 24, color: Color.leka.pink.display),
XylophoneTile(id: 1, noteNumber: 26, color: Color.leka.red.display),
XylophoneTile(id: 2, noteNumber: 28, color: Color.leka.orange.display),
XylophoneTile(id: 3, noteNumber: 29, color: Color.leka.yellow.display),
XylophoneTile(id: 4, noteNumber: 31, color: Color.leka.green.display),
XylophoneTile(id: 5, noteNumber: 33, color: Color.leka.blue.display),
XylophoneTile(id: 6, noteNumber: 35, color: Color.leka.purple.display),
]

public struct MelodyView: View {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright 2023 APF France handicap
// SPDX-License-Identifier: Apache-2.0

import DesignKit
import SwiftUI

enum Arrow {
Expand All @@ -23,13 +24,13 @@ enum Arrow {
public var color: Color {
switch self {
case .forward:
return .blue
return Color.leka.blue.display
case .right:
return .red
return Color.leka.red.display
case .backward:
return .green
return Color.leka.green.display
case .left:
return .yellow
return Color.leka.yellow.display
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright 2023 APF France handicap
// SPDX-License-Identifier: Apache-2.0

import DesignKit
import SwiftUI

struct FourQuartersSelector: View {
Expand All @@ -24,18 +25,18 @@ struct FourQuartersSelector: View {
beltSectionButtons

HStack(spacing: 50) {
EarButton(selectedEar: .left, color: .orange)
EarButton(selectedEar: .right, color: .blue)
EarButton(selectedEar: .left, color: Color.leka.orange.display)
EarButton(selectedEar: .right, color: Color.leka.skyBlue.display)
}
}
}

private var beltSectionButtons: some View {
ZStack {
BeltSectionButton(section: .frontRight, color: .green)
BeltSectionButton(section: .backRight, color: .blue)
BeltSectionButton(section: .backLeft, color: .red)
BeltSectionButton(section: .frontLeft, color: .yellow)
BeltSectionButton(section: .frontRight, color: Color.leka.green.display)
BeltSectionButton(section: .backRight, color: Color.leka.blue.display)
BeltSectionButton(section: .backLeft, color: Color.leka.red.display)
BeltSectionButton(section: .frontLeft, color: Color.leka.yellow.display)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright 2023 APF France handicap
// SPDX-License-Identifier: Apache-2.0

import DesignKit
import SwiftUI

struct FullBeltSelector: View {
Expand All @@ -20,8 +21,8 @@ struct FullBeltSelector: View {
}
.padding(20)

BeltSectionButton(section: .full, color: .red)
EarButton(selectedEar: .all, color: .blue)
BeltSectionButton(section: .full, color: Color.leka.red.display)
EarButton(selectedEar: .all, color: Color.leka.blue.display)

}
.padding()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright 2023 APF France handicap
// SPDX-License-Identifier: Apache-2.0

import DesignKit
import SwiftUI

struct TwoHalvesSelector: View {
Expand All @@ -24,16 +25,16 @@ struct TwoHalvesSelector: View {
beltSectionButtons

HStack(spacing: 50) {
EarButton(selectedEar: .left, color: .orange)
EarButton(selectedEar: .right, color: .blue)
EarButton(selectedEar: .left, color: Color.leka.orange.display)
EarButton(selectedEar: .right, color: Color.leka.blue.display)
}
}
}

private var beltSectionButtons: some View {
ZStack {
BeltSectionButton(section: .right, color: .red)
BeltSectionButton(section: .left, color: .blue)
BeltSectionButton(section: .right, color: Color.leka.red.display)
BeltSectionButton(section: .left, color: Color.leka.blue.display)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public struct XylophoneTile: Identifiable, Hashable {
}

let kListOfXylophoneTiles: [XylophoneTile] = [
XylophoneTile(id: 0, noteNumber: 24, color: .green),
XylophoneTile(id: 1, noteNumber: 26, color: .purple),
XylophoneTile(id: 2, noteNumber: 28, color: .red),
XylophoneTile(id: 3, noteNumber: 29, color: .yellow),
XylophoneTile(id: 4, noteNumber: 31, color: .blue),
XylophoneTile(id: 0, noteNumber: 24, color: Color.leka.green.display),
XylophoneTile(id: 1, noteNumber: 26, color: Color.leka.purple.display),
XylophoneTile(id: 2, noteNumber: 28, color: Color.leka.red.display),
XylophoneTile(id: 3, noteNumber: 29, color: Color.leka.yellow.display),
XylophoneTile(id: 4, noteNumber: 31, color: Color.leka.blue.display),
]

public struct XylophoneView: View {
Expand Down
16 changes: 9 additions & 7 deletions Modules/GameEngineKit/Sources/UI/Views/ColoredAnswerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright 2023 APF France handicap
// SPDX-License-Identifier: Apache-2.0

import DesignKit
import SwiftUI

struct ColoredAnswerView: View {
Expand Down Expand Up @@ -61,13 +62,14 @@ struct ColoredAnswerView: View {

static func stringToColor(from: String) -> Color {
switch from {
case "red": return .red
case "pink": return .pink
case "purple": return .purple
case "blue": return .blue
case "green": return .green
case "yellow": return .yellow
default: return .blue
case "red": return Color.leka.red.display
case "orange": return Color.leka.orange.display
case "yellow": return Color.leka.yellow.display
case "green": return Color.leka.green.display
case "blue": return Color.leka.blue.display
case "pink": return Color.leka.pink.display
case "purple": return Color.leka.purple.display
default: return .black
}
}

Expand Down

0 comments on commit c2b9f32

Please sign in to comment.