22 lines
574 B
Mason
22 lines
574 B
Mason
import Toybox.WatchUi;
|
|
import Toybox.Lang;
|
|
|
|
class menuGoalsDelegate extends WatchUi.Menu2InputDelegate {
|
|
private var _player as Number?;
|
|
private var _team as enTeam?;
|
|
private var _goal as enGoal?;
|
|
|
|
function initialize(team as enTeam, player as Number) {
|
|
_player = player;
|
|
_team = team;
|
|
Menu2InputDelegate.initialize();
|
|
}
|
|
|
|
function onSelect(item as WatchUi.MenuItem) as Void {
|
|
_goal = item.getId() as enGoal;
|
|
$.gMatch.recordGoal(_team, _goal, _player);
|
|
|
|
WatchUi.popView(WatchUi.SLIDE_DOWN);
|
|
|
|
}
|
|
} |