diff --git a/Cube4Fun/Animations.swift b/Cube4Fun/Animations.swift index 6e5e52b..9da3266 100644 --- a/Cube4Fun/Animations.swift +++ b/Cube4Fun/Animations.swift @@ -94,12 +94,13 @@ class Animations: NSObject { _animationArray.append(animArray[i] as! NSMutableDictionary) //println("append Animation count: \(_animationArray.count)") } + self.setSelectedAnimationID(0) _gameView.resetView() __tableView.reloadData() } func getAnimation(id: Int) -> (NSDictionary) { - println(_animationArray.count) + //println(_animationArray.count) let myAnimation = _animationArray[id] as NSDictionary return myAnimation } @@ -269,7 +270,7 @@ class Animations: NSObject { } func setLEDColor(color: UInt8, led: Int) { - println("Led pressed: \(led)") + //println("Led pressed: \(led)") var myByte: [UInt8] = [color] let myData: NSMutableData = (self.getAnimation(_animationSelected)).objectForKey(AnimFrames) as! NSMutableData let bytePosition = NSMakeRange(((self.getAnimationFrameID()-1)*64)+led, 1) diff --git a/Cube4Fun/AppDelegate.swift b/Cube4Fun/AppDelegate.swift index 8d1af14..ca5feb3 100644 --- a/Cube4Fun/AppDelegate.swift +++ b/Cube4Fun/AppDelegate.swift @@ -142,4 +142,13 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSTextFieldDelegate { } } } + + @IBAction func cmdCopyPressed(send: AnyObject) { + println("cmd c pressed") + } + + @IBAction func cmdPastePressed(send: AnyObject) { + println("cmd v pressed") + } + } diff --git a/Cube4Fun/Base.lproj/MainMenu.xib b/Cube4Fun/Base.lproj/MainMenu.xib index 070572a..b43e116 100644 --- a/Cube4Fun/Base.lproj/MainMenu.xib +++ b/Cube4Fun/Base.lproj/MainMenu.xib @@ -40,7 +40,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -151,12 +151,12 @@ - + - + @@ -509,7 +509,7 @@ - + @@ -559,7 +559,7 @@ - + @@ -631,24 +631,13 @@ - + diff --git a/Cube4Fun/GameView.swift b/Cube4Fun/GameView.swift index fed3f39..8dd2455 100644 --- a/Cube4Fun/GameView.swift +++ b/Cube4Fun/GameView.swift @@ -545,8 +545,19 @@ class GameView: SCNView { super.mouseDragged(theEvent) } + override func flagsChanged(theEvent: NSEvent) { +// println(theEvent.keyCode) + } + override func keyDown(theEvent: NSEvent) { - + + /* + if theEvent.modifierFlags & .CommandKeyMask != nil { + println("cmd pressed") + } +*/ + + switch (theEvent.keyCode) { case 123: self.rotateCamera(0.0, y: -0.1)