29 lines
733 B
Mason
29 lines
733 B
Mason
import Toybox.WatchUi;
|
|
import Toybox.Lang;
|
|
|
|
class menuActionsDelegate extends WatchUi.Menu2InputDelegate {
|
|
private var _action as enAction?;
|
|
|
|
function initialize() {
|
|
Menu2InputDelegate.initialize();
|
|
}
|
|
|
|
function onSelect(item as WatchUi.MenuItem) as Void {
|
|
_action = item.getId() as enAction;
|
|
switch (_action){
|
|
case QUIT:
|
|
closeApp();
|
|
break;
|
|
|
|
default:
|
|
WatchUi.popView(WatchUi.SLIDE_DOWN);
|
|
WatchUi.pushView($.gMenuTeams, new menuTeamsDelegate(_action), WatchUi.SLIDE_UP);
|
|
}
|
|
}
|
|
|
|
function onCancel() as Boolean {
|
|
WatchUi.popView(WatchUi.SLIDE_DOWN);
|
|
return true;
|
|
}
|
|
|
|
} |