From 42114d61a72cf62eee0d68a43f1ce2d9eda2c160 Mon Sep 17 00:00:00 2001 From: masakih Date: Sun, 1 Jul 2018 09:14:32 +0900 Subject: [PATCH] =?utf8?q?=E3=82=AB=E3=83=A9=E3=83=BC=E3=82=BB=E3=83=83?= =?utf8?q?=E3=83=88=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=99=E3=82=8B=E3=82=88?= =?utf8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KCD/AirPlanInfoView.swift | 12 ++++++------ KCD/BattleCommand.swift | 4 ++-- KCD/DamageView.swift | 34 +++++++++------------------------- KCD/SlotItemLevelView.swift | 12 +++++++----- KCD/SuppliesCell.swift | 31 +++++++++++++++++++++++++------ 5 files changed, 49 insertions(+), 44 deletions(-) diff --git a/KCD/AirPlanInfoView.swift b/KCD/AirPlanInfoView.swift index 5fc63a86..f4d9edb2 100644 --- a/KCD/AirPlanInfoView.swift +++ b/KCD/AirPlanInfoView.swift @@ -61,11 +61,11 @@ final class AirPlanInfoView: NSTableCellView { switch cond { - case .normal: return .clear + case .normal: return ColorSet.current[.airPlanInforViewNormal] - case .tired: return #colorLiteral(red: 1, green: 0.7233425379, blue: 0.1258574128, alpha: 0.8239436619) + case .tired: return ColorSet.current[.airPlanInforViewTired] - case .bad: return #colorLiteral(red: 0.7320367694, green: 0.07731548697, blue: 0.06799335033, alpha: 1) + case .bad: return ColorSet.current[.airPlanInforViewBad] } } @@ -74,11 +74,11 @@ final class AirPlanInfoView: NSTableCellView { switch cond { - case .normal: return .clear + case .normal: return ColorSet.current[.airPlanInforViewBoarderNormal] - case .tired: return #colorLiteral(red: 0.458858192, green: 0.3335277438, blue: 0.07979661971, alpha: 1) + case .tired: return ColorSet.current[.airPlanInforViewBoarderTired] - case .bad: return #colorLiteral(red: 0.5462518334, green: 0.04599834234, blue: 0.04913448542, alpha: 1) + case .bad: return ColorSet.current[.airPlanInforViewBoarderBad] } } diff --git a/KCD/BattleCommand.swift b/KCD/BattleCommand.swift index 5b72fd64..f51ca70b 100644 --- a/KCD/BattleCommand.swift +++ b/KCD/BattleCommand.swift @@ -26,8 +26,8 @@ final class BattleCommand: JSONCommand { DummyShipCommand(apiResponse: apiResponse).execute() GuardShelterCommand(apiResponse: apiResponse).execute() - default: break - + default: + EnemyStatusCommand(apiResponse: apiResponse).execute() } } } diff --git a/KCD/DamageView.swift b/KCD/DamageView.swift index 14861744..5ff47c93 100644 --- a/KCD/DamageView.swift +++ b/KCD/DamageView.swift @@ -44,44 +44,28 @@ final class DamageView: NSView { switch innerDamageType { - case .none: - - return nil - - case .slightly: + case .none: return nil - return #colorLiteral(red: 1.000, green: 0.956, blue: 0.012, alpha: 0.5) + case .slightly: return ColorSet.current[.damageViewInnerSlightly] - case .modest: - - return NSColor.orange.withAlphaComponent(0.5) + case .modest: return ColorSet.current[.damageViewInnerModest] - case .badly: - - return NSColor.red.withAlphaComponent(0.5) + case .badly: return ColorSet.current[.damageViewInnerBadly] } } private var borderColor: NSColor? { - + switch innerDamageType { - case .none: - - return nil - - case .slightly: - - return NSColor.orange.withAlphaComponent(0.5) + case .none: return nil - case .modest: + case .slightly: return ColorSet.current[.damageViewBoarderSlightly] - return NSColor.orange.withAlphaComponent(0.9) - - case .badly: + case .modest: return ColorSet.current[.damageViewBoarderModest] - return NSColor.red.withAlphaComponent(0.9) + case .badly: return ColorSet.current[.damageViewBoarderBadly] } } diff --git a/KCD/SlotItemLevelView.swift b/KCD/SlotItemLevelView.swift index 75117718..3ac3c98e 100644 --- a/KCD/SlotItemLevelView.swift +++ b/KCD/SlotItemLevelView.swift @@ -213,7 +213,9 @@ final class SlotItemLevelView: NSTextField { private var levelColor: NSColor { - return #colorLiteral(red: 0.135, green: 0.522, blue: 0.619, alpha: 1) + return ColorSet.current[.slotItemLevelViewLevel] + + } // MARK: - Function @@ -262,9 +264,9 @@ final class SlotItemLevelView: NSTextField { switch level { - case 1, 2, 3: return #colorLiteral(red: 0.257, green: 0.523, blue: 0.643, alpha: 1) + case 1, 2, 3: return ColorSet.current[.slotItemLevelViewLowAirLevel] - case 4, 5, 6, 7: return #colorLiteral(red: 0.784, green: 0.549, blue: 0.000, alpha: 1) + case 4, 5, 6, 7: return ColorSet.current[.slotItemLevelViewHighAirLevel] default: return nil @@ -277,14 +279,14 @@ final class SlotItemLevelView: NSTextField { case 1, 2, 3: let shadow = NSShadow() - shadow.shadowColor = #colorLiteral(red: 0.095, green: 0.364, blue: 0.917, alpha: 1) + shadow.shadowColor = ColorSet.current[.slotItemLevelViewLowAirLevelShadow] shadow.shadowBlurRadius = 4.0 return shadow case 4, 5, 6, 7: let shadow = NSShadow() - shadow.shadowColor = .yellow + shadow.shadowColor = ColorSet.current[.slotItemLevelViewHighAirLevelShadow] shadow.shadowBlurRadius = 3.0 return shadow diff --git a/KCD/SuppliesCell.swift b/KCD/SuppliesCell.swift index d3e1adf7..be3b53b1 100644 --- a/KCD/SuppliesCell.swift +++ b/KCD/SuppliesCell.swift @@ -18,12 +18,31 @@ final class SuppliesCell: NSCell { } private let numberOfCell = 10 - private let greenColor = NSColor(calibratedWhite: 0.39, alpha: 1.0) - private let yellowColor = NSColor(calibratedWhite: 0.55, alpha: 1.0) - private let orangeColor = NSColor(calibratedWhite: 0.7, alpha: 1.0) - private let redColor = NSColor(calibratedWhite: 0.79, alpha: 1.0) - private let borderColor = NSColor(calibratedWhite: 0.632, alpha: 1.0) - private let backgroundColor = NSColor(calibratedWhite: 0.948, alpha: 1.0) + + private var greenColor: NSColor { + + return ColorSet.current[.suppliesCellGreen] + } + private var yellowColor: NSColor { + + return ColorSet.current[.suppliesCellYellow] + } + private var orangeColor: NSColor { + + return ColorSet.current[.suppliesCellOrange] + } + private var redColor: NSColor { + + return ColorSet.current[.suppliesCellRedColor] + } + private var borderColor: NSColor { + + return ColorSet.current[.suppliesCellBorder] + } + private var backgroundColor: NSColor { + + return ColorSet.current[.suppliesCellBackground] + } @objc dynamic var ship: Ship? -- 2.11.0