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]
}
}
switch controlSize {
case .regular:
+
return pathForRegular
case .small, .mini:
+
return pathForSmall
}
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))
.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))
.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))
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))
.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))
.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))