OSDN Git Service

Doutaku を 1.0 にアップデート
[kcd/KCD.git] / KCD / DamageView.swift
index 282506e..5f5e076 100644 (file)
@@ -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))