OSDN Git Service

改修工廠メニューを更新
[kcd/KCD.git] / KCD / StrengthenListItemView.swift
1 //
2 //  StrengthenListItemView.swift
3 //  KCD
4 //
5 //  Created by Hori,Masaki on 2017/01/02.
6 //  Copyright © 2017年 Hori,Masaki. All rights reserved.
7 //
8
9 import Cocoa
10
11 class StrengthenListItemView: NSBox {
12     override func draw(_ dirtyRect: NSRect) {
13         super.draw(dirtyRect)
14         
15         let bounds = self.bounds
16         let width = bounds.width
17         let height = bounds.height
18         borderColor.set()
19         NSBezierPath.setDefaultLineWidth(borderWidth)
20         NSBezierPath.stroke(bounds)
21         multiline {
22             [(NSPoint, NSPoint)]()
23                 .appended { (NSPoint(x: 29.5, y: 0), NSPoint(x: 29.5, y: height)) }
24                 .appended { (NSPoint(x: 67.5, y: 0), NSPoint(x: 67.5, y: height)) }
25                 .appended { (NSPoint(x: 209.5, y: 0), NSPoint(x: 209.5, y: height)) }
26                 .appended { (NSPoint(x: 0, y: 17.5), NSPoint(x: width, y: 17.5)) }
27                 .appended { (NSPoint(x: 0, y: 34.5), NSPoint(x: width, y: 34.5)) }
28             }
29             .map { $0.stroke() }
30     }
31 }