Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean axisMoved(Controller arg0, int arg1, float arg2) {
- if(arg2 < this.JOY_TRIGGER_SENSITIVITY*-1){
- MenuUp();
- }else if(arg2 > this.JOY_TRIGGER_SENSITIVITY){
- MenuDown();
- }
- return false;
- }
- @Override
- public boolean povMoved(Controller arg0, int arg1, PovDirection arg2) {
- if(arg2 == PovDirection.north || arg2 == PovDirection.west || arg2 == PovDirection.northWest){
- MenuUp();
- }
- if(arg2 == PovDirection.south || arg2 == PovDirection.east || arg2 == PovDirection.southEast){
- MenuDown();
- }
- return false;
- }
- private void MenuCancel() {
- if(Amygdala.current().getScreen() instanceof ButtonMenu){
- ((ButtonMenu)Amygdala.current().getScreen()).MenuCancel();
- }
- }
- private void MenuOk() {
- if(Amygdala.current().getScreen() instanceof ButtonMenu){
- ((ButtonMenu)Amygdala.current().getScreen()).MenuOk();
- }
- }
- private void MenuDown() {
- if(Amygdala.current().getScreen() instanceof ButtonMenu){
- ((ButtonMenu)Amygdala.current().getScreen()).MenuDown();
- }
- }
- private void MenuUp() {
- if(Amygdala.current().getScreen() instanceof ButtonMenu){
- ((ButtonMenu)Amygdala.current().getScreen()).MenuUp();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement