<commit_before>//
//  BankButtonWidget.swift
//  HexMatch
//
//  Created by <NAME> on 2/9/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation<commit_msg>new widget for bank button<commit_after>//
//  BankButtonWidget.swift
//  HexMatch
//
//  Created by <NAME> on 2/9/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation
import SpriteKit
import SNZSpriteKitUI

class BankButtonWidget : SNZButtonWidget {

    var points: Int = 0
    var buyableSprite: SKSpriteNode?
    
    override init() {
        super.init()
        
        self.size = CGSizeMake(230, 48)
    }
    
    override func render() {
        super.render()
        
        // position & add icon
        let bankIcon = SKSpriteNode(texture: SKTexture(imageNamed: "savings1"))
        bankIcon.setScale(0.8)
        bankIcon.position = CGPointMake(self.size.width - 32,self.size.height - 32)
        bankIcon.ignoreTouches = true
        self.sprite!.addChild(bankIcon)
        
        // position & add caption
        let bankSpendCaption = SKLabelNode(text: "Tap to spend")
        bankSpendCaption.fontColor = UIColor(red: 0xf7/255, green: 0xef/255, blue: 0xed/255, alpha: 0.8)
        bankSpendCaption.fontSize = 12
        bankSpendCaption.zPosition = 20
        bankSpendCaption.fontName = "Avenir-Black"
        bankSpendCaption.horizontalAlignmentMode = SKLabelHorizontalAlignmentMode.Left
        bankSpendCaption.position = CGPoint(x: SNZSpriteKitUITheme.instance.uiInnerMargins.left, y: SNZSpriteKitUITheme.instance.uiInnerMargins.bottom)
        bankSpendCaption.ignoreTouches = true
        self.sprite!.addChild(bankSpendCaption)
    }

}
{'fraction_non_alphanumeric': 0.1029940119760479, 'fraction_numerical': 0.02874251497005988, 'mean_word_length': 2.6725274725274724, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '353263', 'n_tokens_mistral': 576, 'n_tokens_neox': 534, 'n_words': 111}