diff options
Diffstat (limited to 'Classes/TutorialBubble.m')
-rw-r--r-- | Classes/TutorialBubble.m | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Classes/TutorialBubble.m b/Classes/TutorialBubble.m index b85aa31..74f667f 100644 --- a/Classes/TutorialBubble.m +++ b/Classes/TutorialBubble.m | |||
@@ -134,6 +134,17 @@ | |||
134 | boxLoc = CGPointMake(CGRectGetMaxX(spriteBounds), CGRectGetMaxY(spriteBounds) - self.frame.size.height); | 134 | boxLoc = CGPointMake(CGRectGetMaxX(spriteBounds), CGRectGetMaxY(spriteBounds) - self.frame.size.height); |
135 | arrowLoc = CGPointMake(0, button.frame.size.height - spriteBounds.size.height/2 + 4); | 135 | arrowLoc = CGPointMake(0, button.frame.size.height - spriteBounds.size.height/2 + 4); |
136 | } | 136 | } |
137 | } else { | ||
138 | arrowRotation = 180; | ||
139 | |||
140 | if (CGRectGetMidX(spriteBounds) < button.frame.size.width) | ||
141 | { | ||
142 | boxLoc = CGPointMake(0, CGRectGetMaxY(spriteBounds)-4); | ||
143 | arrowLoc = CGPointMake(spriteBounds.origin.x+4, 0); | ||
144 | } else { | ||
145 | boxLoc = CGPointMake(CGRectGetMaxX(spriteBounds) - self.frame.size.width, CGRectGetMaxY(spriteBounds)-4); | ||
146 | arrowLoc = CGPointMake(button.frame.size.width - spriteBounds.size.width/2 + 4, 0); | ||
147 | } | ||
137 | } | 148 | } |
138 | 149 | ||
139 | CGImageRef framestuff = [[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"framestuff" ofType:@"png"]] CGImage]; | 150 | CGImageRef framestuff = [[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"framestuff" ofType:@"png"]] CGImage]; |
@@ -153,8 +164,6 @@ | |||
153 | 164 | ||
154 | - (void)buttonPressed:(id)sender | 165 | - (void)buttonPressed:(id)sender |
155 | { | 166 | { |
156 | [self removeFromSuperview]; | ||
157 | |||
158 | if (target != nil) | 167 | if (target != nil) |
159 | { | 168 | { |
160 | [target performSelector:action]; | 169 | [target performSelector:action]; |