X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=KCD%2FDamageView.swift;h=5f5e076329e0167adebdb2a612610319ab88c664;hb=e341ef2774c1d7a27d9eb60edab905f1adc510a3;hp=282506e508907385156fbcd19d8cc735d2265a7b;hpb=88689f9116566fd3a2919a20d0d434b422ef3c0d;p=kcd%2FKCD.git diff --git a/KCD/DamageView.swift b/KCD/DamageView.swift index 282506e5..5f5e0763 100644 --- a/KCD/DamageView.swift +++ b/KCD/DamageView.swift @@ -44,36 +44,28 @@ final class DamageView: NSView { switch innerDamageType { - case .none: - return nil + case .none: return nil - case .slightly: - return #colorLiteral(red: 1.000, green: 0.956, blue: 0.012, alpha: 0.5) + case .slightly: return ColorSetManager.current[.damageViewInnerSlightly] - case .modest: - return NSColor.orange.withAlphaComponent(0.5) + case .modest: return ColorSetManager.current[.damageViewInnerModest] - case .badly: - return NSColor.red.withAlphaComponent(0.5) + case .badly: return ColorSetManager.current[.damageViewInnerBadly] } } private var borderColor: NSColor? { - + switch innerDamageType { - case .none: - return nil + case .none: return nil - case .slightly: - return NSColor.orange.withAlphaComponent(0.5) + case .slightly: return ColorSetManager.current[.damageViewBoarderSlightly] - case .modest: - return NSColor.orange.withAlphaComponent(0.9) + case .modest: return ColorSetManager.current[.damageViewBoarderModest] - case .badly: - return NSColor.red.withAlphaComponent(0.9) + case .badly: return ColorSetManager.current[.damageViewBoarderBadly] } } @@ -83,9 +75,11 @@ final class DamageView: NSView { switch controlSize { case .regular: + return pathForRegular case .small, .mini: + return pathForSmall } @@ -98,9 +92,11 @@ final class DamageView: NSView { switch innerDamageType { case .none: + return nil case .slightly: + return Polygon() .move(to: NSPoint(x: 35.0, y: height - 2.0)) .line(to: NSPoint(x: 0.0, y: height - 2.0)) @@ -108,6 +104,7 @@ final class DamageView: NSView { .close() case .modest: + return Polygon() .move(to: NSPoint(x: 50.0, y: height - 2.0)) .line(to: NSPoint(x: 25.0, y: height - 2.0)) @@ -116,6 +113,7 @@ final class DamageView: NSView { .close() case .badly: + return Polygon() .move(to: NSPoint(x: 60.0, y: height - 2.0)) .line(to: NSPoint(x: 53.0, y: height - 2.0)) @@ -138,9 +136,11 @@ final class DamageView: NSView { switch innerDamageType { case .none: + return nil case .slightly: + return Polygon() .move(to: NSPoint(x: 35.0, y: height - 2.0)) .line(to: NSPoint(x: 0.0, y: height - 2.0)) @@ -148,6 +148,7 @@ final class DamageView: NSView { .close() case .modest: + return Polygon() .move(to: NSPoint(x: 50.0, y: height - 2.0)) .line(to: NSPoint(x: 25.0, y: height - 2.0)) @@ -156,6 +157,7 @@ final class DamageView: NSView { .close() case .badly: + return Polygon() .move(to: NSPoint(x: 55.0, y: height - 2.0)) .line(to: NSPoint(x: 48.0, y: height - 2.0))