Skip to content

Commit

Permalink
Fixed the bug where the right side of the game screen wasn't responsi…
Browse files Browse the repository at this point in the history
…ve anymore after dragging the menu
  • Loading branch information
Joey Jurjens authored and Joey Jurjens committed Apr 19, 2020
1 parent 218a6ca commit bddd9e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions template/Menu.mm
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ -(id)initWithTitle:(NSString *)title_ titleColor:(UIColor *)titleColor_ titleFon
[menuIcon addTarget:self action:@selector(menuIconTapped) forControlEvents:UIControlEventTouchDown];
[self.header addSubview:menuIcon];

scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.header.bounds), menuWidth_, CGRectGetMaxY(self.bounds) - CGRectGetMaxY(self.header.bounds))];
scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, CGRectGetHeight(self.header.bounds), menuWidth_, CGRectGetHeight(self.bounds) - CGRectGetHeight(self.header.bounds))];
scrollView.backgroundColor = switchOffColor_;
[self addSubview:scrollView];

Expand All @@ -96,7 +96,7 @@ -(id)initWithTitle:(NSString *)title_ titleColor:(UIColor *)titleColor_ titleFon
self.menuTitle.textAlignment = NSTextAlignmentCenter;
[self.header addSubview: self.menuTitle];

self.footer = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.bounds) - 1, menuWidth_, 20)];
self.footer = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetHeight(self.bounds) - 1, menuWidth_, 20)];
self.footer.backgroundColor = headerColor_;
CAShapeLayer *footerLayer = [CAShapeLayer layer];
footerLayer.path = [UIBezierPath bezierPathWithRoundedRect:self.footer.bounds byRoundingCorners: UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii: (CGSize){10.0, 10.0}].CGPath;
Expand Down Expand Up @@ -125,7 +125,7 @@ - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
// Update the menu's location when it's being dragged
- (void)menuDragged:(UIPanGestureRecognizer *)pan {
CGPoint newLocation = [pan translationInView:self.superview];
self.frame = CGRectMake(self.lastMenuLocation.x + newLocation.x, self.lastMenuLocation.y + newLocation.y, CGRectGetMaxX(self.frame), CGRectGetMaxY(self.frame));
self.frame = CGRectMake(self.lastMenuLocation.x + newLocation.x, self.lastMenuLocation.y + newLocation.y, CGRectGetWidth(self.frame), CGRectGetHeight(self.frame));
}

- (void)hideMenu:(UITapGestureRecognizer *)tap {
Expand Down
2 changes: 1 addition & 1 deletion template/versionCheck.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
VERSION='0.6.1'
VERSION='0.6.2'
# Don't remove the above line. Serves as the version this script will fetch. Only update when a new version is out.

ERROR='\033[1;31m[*] Error:\033[1;37m '
Expand Down

0 comments on commit bddd9e5

Please sign in to comment.