Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void) rotateUpperPanel: (BOOL) isPortrait
- {
- BOOL gtoolsPurchased = [delegate gtoolsPurchaseFlag];
- BOOL toolspackPurchased = [delegate toolspackPurchaseFlag];
- borderView.hidden = isPanelOnTop;
- borderView.frame = CGRectMake(0, 0, isPortrait? 320:480, 1);
- int upButtonHeight = [self heightForButton];
- upperPanel.frame = isPanelOnTop ? (isPortrait ? CGRectMake(0, 0, 320, toolBarHeight) : CGRectMake(0, 0, 480, toolBarHeight)) : (isPortrait ? CGRectMake(0, 480 - titleBarHeightPortrait, 320, toolBarHeight) : CGRectMake(0, 320 - titleBarHeightLandscape, 480, toolBarHeight));
- [self makeDividerPanel:isPortrait];
- int leftShift = 0;
- int btnCount = 0;
- btnMetronome.frame = CGRectMake(leftShift, 0, [self widthForButtonWithNumber:btnCount andOrientation:isPortrait], upButtonHeight);
- [btnMetronome setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:NO]] forState:UIControlStateNormal];
- [btnMetronome setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:YES]] forState:UIControlStateHighlighted];
- [self fixIconView:btnMetronome withNeedTransparent:!gtoolsPurchased];
- leftShift += [self widthForButtonWithNumber:btnCount andOrientation:isPortrait] + 1;
- btnCount++;
- btnFont.frame = CGRectMake(leftShift, 0, [self widthForButtonWithNumber:btnCount andOrientation:isPortrait], upButtonHeight);
- [btnFont setBackgroundImage:[UIImage imageNamed: [self imageForButtonWithOrientation:isPortrait andActive:NO]] forState:UIControlStateNormal];
- [btnFont setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:YES]] forState:UIControlStateHighlighted];
- [self fixIconView:btnFont withNeedTransparent:!toolspackPurchased];
- leftShift += [self widthForButtonWithNumber:btnCount andOrientation:isPortrait] + 1;
- btnCount++;
- btnPrint.frame = CGRectMake(leftShift, 0, [self widthForButtonWithNumber:btnCount andOrientation:isPortrait], upButtonHeight);
- [btnPrint setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:NO]] forState:UIControlStateNormal];
- [btnPrint setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:YES]] forState:UIControlStateHighlighted];
- [self fixIconView:btnPrint withNeedTransparent:!toolspackPurchased];
- leftShift += [self widthForButtonWithNumber:btnCount andOrientation:isPortrait] + 1;
- btnCount++;
- btnFormating.frame = CGRectMake(leftShift, 0, [self widthForButtonWithNumber:btnCount andOrientation:isPortrait], upButtonHeight);
- [btnFormating setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:NO]] forState:UIControlStateNormal];
- [btnFormating setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:YES]] forState:UIControlStateHighlighted];
- [self fixIconView:btnFormating withNeedTransparent:!toolspackPurchased];
- leftShift += [self widthForButtonWithNumber:btnCount andOrientation:isPortrait] + 1;
- btnCount++;
- btnMusic.frame = CGRectMake(leftShift, 0, [self widthForButtonWithNumber:btnCount andOrientation:isPortrait], upButtonHeight);
- [btnMusic setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:NO]] forState:UIControlStateNormal];
- [btnMusic setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:YES]] forState:UIControlStateHighlighted];
- [self fixIconView:btnMusic withNeedTransparent:NO];
- if (hasChords)
- {
- leftShift += [self widthForButtonWithNumber:btnCount andOrientation:isPortrait] + 1;
- btnCount++;
- btnTranspose.frame = CGRectMake(leftShift, 0, [self widthForButtonWithNumber:btnCount andOrientation:isPortrait], upButtonHeight);
- [btnTranspose setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:NO]] forState:UIControlStateNormal];
- [btnTranspose setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:YES]] forState:UIControlStateHighlighted];
- [self fixIconView:btnTranspose withNeedTransparent:NO];
- }
- leftShift += [self widthForButtonWithNumber:btnCount andOrientation:isPortrait] + 1;
- btnCount++;
- btnAutoScroll.frame = CGRectMake(leftShift, 0, [self widthForButtonWithNumber:btnCount andOrientation:isPortrait], upButtonHeight);
- [btnAutoScroll setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:NO]] forState:UIControlStateNormal];
- [btnAutoScroll setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:YES]] forState:UIControlStateHighlighted];
- [self fixIconView:btnAutoScroll withNeedTransparent:NO];
- UIImage *buttonbg = [UIImage imageNamed:@"buttonsbg.png"];
- btnScroll.frame = CGRectMake(isPortrait ? 267 : 427, isPanelOnTop ? 0 : (isPortrait ? 480 - 39 : 320 - 39), 53, 39);
- [btnScroll setBackgroundColor:[UIColor colorWithPatternImage:buttonbg]];
- [btnScroll setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:isScrollAction]] forState:UIControlStateNormal];
- [btnScroll setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:YES]] forState:UIControlStateHighlighted];
- [self fixIconView:btnScroll withNeedTransparent:NO];
- btnFullscreen.frame = CGRectMake(isPortrait ? 212 : 372, isPanelOnTop ? 0 : (isPortrait ? 480 - 39 : 320 - 39), 53, 39);
- [btnFullscreen setBackgroundColor:[UIColor colorWithPatternImage:buttonbg]];
- [btnFullscreen setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:isScrollAction]] forState:UIControlStateNormal];
- [btnFullscreen setBackgroundImage:[UIImage imageNamed:[self imageForButtonWithOrientation:isPortrait andActive:YES]] forState:UIControlStateHighlighted];
- [self fixIconView:btnFullscreen withNeedTransparent:NO];
- [self setButtons:isFontAction second:isFormatAction third:isTransposeAction fourth:isScrollAction five:isPrintAction six:isMusicAction];
- }
Advertisement
Add Comment
Please, Sign In to add comment