OSDN Git Service

不要となっていたプロパティを削除
[kcd/KCD.git] / KCD / BorderTextField.swift
1 //
2 //  BorderTextField.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 /// 「編成支援」「能力値3」「艦載機搭載数」用
12 final class BorderTextField: NSTextField {
13     
14     override func draw(_ dirtyRect: NSRect) {
15         
16         super.draw(dirtyRect)
17
18         let bounds = self.bounds
19         let width = bounds.width
20         let height = bounds.height
21         NSColor.controlShadowColor.set()
22         NSBezierPath.defaultLineWidth = 1.0
23         
24         Polygon()
25             .move(to: NSPoint(x: 3, y: height))
26             .line(to: NSPoint(x: bounds.maxX, y: height))
27             .move(to: NSPoint(x: width, y: 0))
28             .line(to: NSPoint(x: width, y: height))
29             .stroke()
30     }
31 }