23 lines
680 B
Mason
23 lines
680 B
Mason
import Toybox.WatchUi;
|
|
import Toybox.Lang;
|
|
|
|
class menuTeamsDelegate extends WatchUi.Menu2InputDelegate {
|
|
private var _action as enAction;
|
|
private var _team as enTeam?;
|
|
|
|
function initialize(action as enAction) {
|
|
Menu2InputDelegate.initialize();
|
|
_action = action;
|
|
}
|
|
|
|
function onSelect(item as WatchUi.MenuItem) as Void {
|
|
_team = item.getId() as enTeam;
|
|
WatchUi.popView(WatchUi.SLIDE_DOWN);
|
|
WatchUi.pushView(new playerPicker(), new menuPlayerDelegate(_action, _team), WatchUi.SLIDE_UP);
|
|
}
|
|
|
|
function onCancel() as Boolean {
|
|
WatchUi.popView(WatchUi.SLIDE_DOWN);
|
|
return true;
|
|
}
|
|
} |