Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
hectormatos2011 committed Apr 23, 2014
1 parent 5ac530e commit ae1429f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,22 @@ For even further customization, you could use your own view for the menu item's
}
```

For some cases, a developer would want to add a contextual menu to a moving sprite in their game to access options for it (Ex. Defend, Attack, Run Away)
In cases like this, you would probably want to pause your game to allow the user to select an option without affecting gameplay. To do this, you can implement the delegate methods contextualMenuActivated: and contextualMenuDismissed:

```objectivec
- (void)contextualMenuActivated:(BAMContextualMenu *)contextualMenu
{
//Pause your game here.
}

- (void)contextualMenuDismissed:(BAMContextualMenu *)contextualMenu
{
//Unpause your game here.
}
```


Also, if you have need for this sort of thing, you can remove the contextualMenu at any time by calling removeContextualMenuFromView:.

```objectivec
Expand Down

0 comments on commit ae1429f

Please sign in to comment.