 //  Copyright © 2015年 Kenta. All rights reserved.
 //
 
-//TODO: 丸をアニメーションの線にする Done
-//TODO: アニメーションから点線を伸ばす Done
-//TODO: 点線の先にどの画面へ行くのかを文字で表示
 //TODO: ボタンの3つに画面遷移を対応づける
-//TODO: ボタン3つを色分けする Done
 
 import UIKit
 

    }
    
    var finishedcount = 0
    let moveToPointSecond: [[Int]] = [[110,110],[200,570],[300,640]]
    let addToPointSecond: [[Int]] = [[248,110],[100,570],[230,640]]
    
    //CAanimation終了後に呼ばれる
    override func animationDidStop(anim: CAAnimation, finished flag: Bool) {
        
        finishedcount++

        if(finishedcount == 3){  //最初の線が伸びていくアニメーション終了後
            ShowSecondLine()
        }
        
        if(finishedcount == 6){ //2番目に線が伸びていくアニメーション終了後
            ShowLabel()
        }
        
    }
    
    func ShowSecondLine(){
        for(var i = 3; i < 6; i++){
            let linework = UIBezierPath()

        }
    }
    
    var transitionButton: [UIButton] = []
    let transitionButtonTitle: [String] = ["時給設定","取り込み","月給表示"]
    let transitionButtonPosition: [[Int]] = [[150,25],[165,485],[295,555]]
    
    func ShowTransitionButton(){
        for(var i = 0; i < 3; i++){
            let transitionButtonwork = UIButton()
            transitionButtonwork.frame = CGRectMake(0, 0, 100, 50)
            transitionButtonwork.backgroundColor = UIColor.clearColor()
            transitionButtonwork.layer.position = CGPoint(x: transitionButtonPosition[i][0], y:transitionButtonPosition[i][1])
            transitionButtonwork.setTitle(transitionButtonTitle[i], forState: .Normal)
            transitionButtonwork.setTitleColor(UIColor.hex(ColorCode[i], alpha: 1.0), forState: .Normal)
            transitionButtonwork.addTarget(self, action: "onTap:", forControlEvents:.TouchUpInside)
            transitionButton.append(transitionButtonwork)
            
            self.AnimationMenuView.addSubview(transitionButton[i])
        }
    }
}
