Permalink
Browse files

Added Info Layer

  • Loading branch information...
1 parent a1bacef commit 6ae29c4db4c680ce7285faeed4fad0ffb7074e82 @fluxama committed Jul 7, 2012
Showing with 1,880 additions and 132 deletions.
  1. +4 −4 DoctorOm/AppDelegate.m
  2. BIN DoctorOm/InstrumentImages/AboutLayer-hd.png
  3. BIN DoctorOm/InstrumentImages/Drom-ipad.png
  4. BIN DoctorOm/InstrumentImages/Drom2-ipad.png
  5. BIN DoctorOm/InstrumentImages/Drom3-ipad.png
  6. BIN DoctorOm/InstrumentImages/InfoLayer-hd.png
  7. BIN DoctorOm/InstrumentImages/InfoLayer.png
  8. +2 −2 DoctorOm/InstrumentPlists/Drom.plist
  9. +3 −3 DoctorOm/InstrumentPlists/settings.plist
  10. BIN DoctorOm/Resources/Default-ipad.png
  11. +2 −0 DoctorOm/Resources/Info.plist
  12. BIN DoctorOm/Resources/InfoDrom.png
  13. BIN DoctorOm/Resources/InfoDromSelected.png
  14. BIN DoctorOm/Resources/InfoFacebook.png
  15. BIN DoctorOm/Resources/InfoFacebookSelected.png
  16. BIN DoctorOm/Resources/InfoFluxama.png
  17. BIN DoctorOm/Resources/InfoFluxamaSelected.png
  18. BIN DoctorOm/Resources/InfoNM.png
  19. BIN DoctorOm/Resources/InfoNMSelected.png
  20. BIN DoctorOm/Resources/InfoTwitter.png
  21. BIN DoctorOm/Resources/InfoTwitterSelected.png
  22. BIN DoctorOm/SynthBuilder/ControlImages/Slider-ipad.png
  23. +34 −0 DoctorOm/SynthBuilder/Scenes/HelpScene.h
  24. +108 −0 DoctorOm/SynthBuilder/Scenes/HelpScene.m
  25. +9 −0 DoctorOm/SynthBuilder/Scenes/InstrumentScene.h
  26. +106 −5 DoctorOm/SynthBuilder/Scenes/InstrumentScene.m
  27. +1 −22 DoctorOm/SynthBuilder/Scenes/MenuScene.m
  28. +1 −1 DoctorOm/SynthBuilder/Scenes/NavMenu.m
  29. +137 −81 Drom.xcodeproj/project.pbxproj
  30. +1 −1 Drom.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  31. BIN Drom.xcodeproj/project.xcworkspace/xcuserdata/swallace.xcuserdatad/UserInterfaceState.xcuserstate
  32. +12 −13 Drom.xcodeproj/xcuserdata/swallace.xcuserdatad/xcschemes/DoctorOm.xcscheme
  33. BIN Icon.png
  34. BIN NewPot.png
  35. BIN NewSlider.png
  36. +1,460 −0 pd-drom.pd
  37. BIN untitled folder/knob_01-ipad.png
  38. BIN untitled folder/knob_02-ipad.png
  39. BIN untitled folder/knob_select_01-ipad.png
  40. BIN untitled folder/knob_select_02-ipad.png
  41. BIN untitled folder/led-ipad.png
  42. BIN untitled folder/slider_02-ipad.png
  43. BIN untitled folder/switch-ipad.png
  44. BIN untitled folder/switch-iphone.png
View
@@ -26,16 +26,16 @@ @implementation AppController
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if (IS_IPAD()) {
- THUMBW = 1024;
- THUMBH = 768;
+ THUMBW = 768;
+ THUMBH = 512;
PADW = 40;
SCREEN_CENTER_X = 512;
SCREEN_CENTER_Y = 384;
BUTTON_Y = 60;
ABOUT_IMAGE_WIDTH = 1000;
} else {
- THUMBW = 480;
- THUMBH = 320;
+ THUMBW = 360;
+ THUMBH = 240;
PADW = 20;
SCREEN_CENTER_X = 240;
SCREEN_CENTER_Y = 160;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -50,7 +50,7 @@
<key>sweep_angle</key>
<integer>0</integer>
<key>value</key>
- <integer>0</integer>
+ <real>0.5</real>
<key>value2</key>
<integer>0</integer>
<key>value3</key>
@@ -96,7 +96,7 @@
<key>sweep_angle</key>
<integer>0</integer>
<key>value</key>
- <integer>0</integer>
+ <real>0.5</real>
<key>value2</key>
<integer>0</integer>
<key>value3</key>
@@ -4,9 +4,9 @@
<dict>
<key>instruments</key>
<array>
- <string>DoctorOm</string>
- <string>DoctorOm2</string>
- <string>DoctorOm3</string>
+ <string>Drom</string>
+ <string>Drom2</string>
+ <string>Drom3</string>
</array>
</dict>
</plist>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -27,6 +27,8 @@
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,34 @@
+//
+// HelpScene.h
+// Drom
+//
+// Created by Shawn Wallace on 7/7/12.
+// Copyright 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "cocos2d.h"
+
+@class HelpLayer;
+
+@interface HelpScene : CCScene
+{
+ HelpLayer *hl;
+}
+
+@end
+
+@interface HelpLayer : CCLayer
+{
+ CCMenu *menu;
+ float menu_x;
+ float menu_y;
+ float row;
+ float col;
+ float current_col;
+ bool screenIsTouched;
+}
+
+-(void)exitAbout: (id) sender;
+
+@end
@@ -0,0 +1,108 @@
+//
+// HelpScene.m
+// Drom
+//
+// Created by Shawn Wallace on 7/7/12.
+// Copyright 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "HelpScene.h"
+#import "MenuScene.h"
+
+
+@implementation HelpScene
+- (id) init {
+ self = [super init];
+ if (self != nil) {
+ CCSprite * bg = [CCSprite spriteWithFile:@"menuBackground.png"];
+
+ [bg setPosition:ccp(SCREEN_CENTER_X, SCREEN_CENTER_Y)];
+ if (IS_IPAD()) {
+ bg.scale = 2.5;
+ }
+ [self addChild:bg z:0];
+
+ hl = [HelpLayer node];
+ [self addChild:hl z:1];
+ }
+
+ return self;
+}
+
+-(void) dealloc
+{
+ CCLOG(@"Releasing HelpScene");
+ [super dealloc];
+}
+
+@end
+
+@implementation AboutLayer
+
+CGPoint startTouch;
+CGPoint endLocation;
+float origX;
+float deltaX;
+float incX;
+float xAtFirstTouch;
+float xAtLastMove;
+float menuWidth;
+
+- (id) init {
+ self = [super init];
+ if (self != nil) {
+ menu = [CCMenu menuWithItems:nil ];
+
+ CCMenuItemImage *exitButton = [CCMenuItemImage
+ itemWithNormalImage:@"AboutButton.png"
+ selectedImage:@"AboutButton.png"
+ target:self
+ selector:@selector(exitAbout:)];
+ [menu addChild:exitButton z:30];
+ [menu setAnchorPoint:ccp(0,0)];
+ if (IS_IPAD()) {
+ [menu setPosition:ccp(240*IPAD_MULT, 15*IPAD_MULT+IPAD_BOT_TRIM+20)];
+ } else {
+ [menu setPosition:ccp(240, 15)];
+ }
+ [self addChild:menu z:50];
+
+ self.isTouchEnabled = YES;
+ screenIsTouched = FALSE;
+ endLocation = ccp(menu.position.x, menu.position.y);
+ startTouch = ccp(menu.position.x, menu.position.y);
+
+ CCSprite * bg = [CCSprite spriteWithFile:@"AboutLayer.png"];
+ //[bg setAnchorPoint:ccp(0,0)];
+ [bg setPosition:ccp(SCREEN_CENTER_X, SCREEN_CENTER_Y)];
+ [self addChild:bg z:0];
+ }
+
+ return self;
+}
+
+-(void)exitHelp: (id) sender {
+ MenuScene *ms = [MenuScene node];
+ [[CCDirector sharedDirector] replaceScene:[CCTransitionFlipY transitionWithDuration:0.5f scene:ms]];
+}
+
+- (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
+{
+}
+
+- (void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
+{
+}
+
+- (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
+{
+}
+
+-(void) dealloc
+{
+ CCLOG(@"Releasing AboutLayer");
+ [super dealloc];
+
+}
+
+@end
@@ -22,11 +22,20 @@
NSString *instrument_name;
InstrumentLayer *layer;
CCLayer *helpLayer;
+ CCLayer *infoLayer;
CCMenu *helpMenu;
+ CCMenu *infoMenu;
NavMenu *nav_menu;
}
+
-(void) loadInstrument;
- (void) toggleHelp: (id)sender;
+- (void) toggleInfo: (id)sender;
+- (void) gotoNM: (id)sender;
+- (void) gotoDrom: (id)sender;
+- (void) gotoFB: (id)sender;
+- (void) gotoTwitter: (id)sender;
+- (void) gotoWeb: (id)sender;
@property (copy, nonatomic) NSString *instrument_name;
@@ -36,19 +36,88 @@ -(id) init {
[self addChild:nav_menu z:50];
[nav_menu moveToClosedState];
+ // Create the Info Menu
+ infoLayer = [CCSprite spriteWithFile:@"InfoLayer.png"];
+ [infoLayer setPosition:ccp(SCREEN_CENTER_X, SCREEN_CENTER_Y)];
+ [infoLayer setVisible:false];
+ [self addChild:infoLayer z:100];
+
+ infoMenu = [CCMenu menuWithItems:nil ];
+
+ CCMenuItemImage *infoNM = [CCMenuItemImage
+ itemWithNormalImage:@"InfoNM.png"
+ selectedImage:@"InfoNMSelected.png"
+ target:self
+ selector:@selector(gotoNM:)];
+ CCMenuItemImage *infoDrom = [CCMenuItemImage
+ itemWithNormalImage:@"InfoDrom.png"
+ selectedImage:@"InfoDromSelected.png"
+ target:self
+ selector:@selector(gotoDrom:)];
+
+ CCMenuItemImage *infoFB = [CCMenuItemImage
+ itemWithNormalImage:@"InfoFacebook.png"
+ selectedImage:@"InfoFacebookSelected.png"
+ target:self
+ selector:@selector(gotoFB:)];
+
+ CCMenuItemImage *infoTwitter = [CCMenuItemImage
+ itemWithNormalImage:@"InfoTwitter.png"
+ selectedImage:@"InfoTwitterSelected.png"
+ target:self
+ selector:@selector(gotoTwitter:)];
+
+ CCMenuItemImage *infoWeb = [CCMenuItemImage
+ itemWithNormalImage:@"InfoFluxama.png"
+ selectedImage:@"InfoFluxamaSelected.png"
+ target:self
+ selector:@selector(gotoWeb:)];
+
+ [infoMenu addChild:infoNM];
+ [infoMenu addChild:infoDrom];
+ [infoMenu addChild:infoFB];
+ [infoMenu addChild:infoTwitter];
+ [infoMenu addChild:infoWeb];
+
+ [infoMenu alignItemsHorizontallyWithPadding:5];
+ if (IS_IPAD()) {
+ [helpMenu setPosition:ccp(SCREEN_CENTER_X, SCREEN_CENTER_Y)];
+ } else {
+ [helpMenu setPosition:ccp(SCREEN_CENTER_X, SCREEN_CENTER_Y)];
+ }
+ [infoMenu setVisible:false];
+ [self addChild:infoMenu z:150];
+
+ CCMenu *exitButtonMenu = [CCMenu menuWithItems:nil ];
+
+ CCMenuItemImage *exitInfoButton = [CCMenuItemImage
+ itemWithNormalImage:@"navMenuExit.png"
+ selectedImage:@"navMenuExit.png"
+ target:self
+ selector:@selector(toggleInfo:)];
+ [exitButtonMenu addChild:exitInfoButton];
+ if (IS_IPAD()) {
+ [exitButtonMenu setPosition:ccp(1000, 25)];
+ } else {
+ [exitButtonMenu setPosition:ccp(465, 15)];
+ }
+ [infoLayer addChild:exitButtonMenu z:150];
+
+ // Create the Help Menu
+
helpMenu = [CCMenu menuWithItems:nil ];
CCMenuItemImage *exitHelpButton = [CCMenuItemImage
- itemWithNormalImage:@"navMenuExit.png"
- selectedImage:@"navMenuExit.png"
- target:self
- selector:@selector(toggleHelp:)];
+ itemWithNormalImage:@"navMenuExit.png"
+ selectedImage:@"navMenuExit.png"
+ target:self
+ selector:@selector(toggleHelp:)];
[helpMenu addChild:exitHelpButton];
if (IS_IPAD()) {
[helpMenu setPosition:ccp(1000, 25)];
} else {
- [helpMenu setPosition:ccp(465, 20)];
+ [helpMenu setPosition:ccp(465, 15)];
}
[helpMenu setVisible:false];
[self addChild:helpMenu z:150];
@@ -58,6 +127,9 @@ -(id) init {
[helpLayer setVisible:false];
[self addChild:helpLayer z:100];
+
+
+
}
return self;
}
@@ -76,6 +148,35 @@ -(void) toggleHelp: (id)sender {
nav_menu.visible = !nav_menu.visible;
}
+-(void) toggleInfo: (id)sender {
+ infoMenu.visible = !infoLayer.visible;
+ infoLayer.visible = !infoLayer.visible;
+ layer.visible = !layer.visible;
+ nav_menu.visible = !nav_menu.visible;
+}
+
+- (void) gotoNM: (id)sender {
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://itunes.com/apps/Noisemusick"]];
+}
+- (void) gotoDrom: (id)sender {
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-apps://itunes.com/apps/Drom"]];
+
+}
+- (void) gotoFB: (id)sender {
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.facebook.com/fluxamacorp"]];
+
+}
+- (void) gotoTwitter: (id)sender {
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.twitter.com/fluxama"]];
+
+}
+- (void) gotoWeb: (id)sender {
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.fluxama.com"]];
+
+}
+
+
+
- (void) dealloc
{
//CCLOG(@"Dealloc InstrumentScene");
Oops, something went wrong.

0 comments on commit 6ae29c4

Please sign in to comment.