update
This commit is contained in:
1 parent
f7bcbc53ef
commit
65b26786a0
39 files changed
+4710
-3044
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import Toybox.WatchUi;
|
||||
import Toybox.Lang;
|
||||
|
||||
class menuCardsDelegate extends WatchUi.Menu2InputDelegate {
|
||||
private var _player as Number?;
|
||||
private var _team as enTeam?;
|
||||
private var _card as enCard?;
|
||||
private var _mins as Number?;
|
||||
|
||||
function initialize(team as enTeam, player as Number) {
|
||||
_player = player;
|
||||
_team = team;
|
||||
Menu2InputDelegate.initialize();
|
||||
}
|
||||
|
||||
function onSelect(item as WatchUi.MenuItem) as Void {
|
||||
_card = item.getId() as enCard;
|
||||
switch(_card){
|
||||
case GREEN:
|
||||
_mins = 2;
|
||||
break;
|
||||
case YELLOW:
|
||||
_mins = 5;
|
||||
break;
|
||||
case RED:
|
||||
_mins = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
$.gMatch.recordCard(_team, _card, _player, _mins);
|
||||
WatchUi.popView(WatchUi.SLIDE_DOWN);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user