diff --git a/UI/index.html b/UI/index.html
index 9136fe2..ab98f26 100644
--- a/UI/index.html
+++ b/UI/index.html
@@ -80,20 +80,24 @@ function updateEvent() {
window.UI.display[handID] = elementPlace("#hands","Hand_"+hand.name,"hand"+(hand.name == window.gameState.active.hand ? " selected" : ""),"li");
window.UI.display[handID].controls = elementPlace("#Hand_"+hand.name,null,"controls","div");
window.UI.display[handID].controls.innerHTML = "
"+hand.name+"
";
- // Muligan Hand
- // Delete Hand
+// Muligan Hand
+// Delete Hand
window.UI.display[handID].cards = elementPlace("#Hand_"+hand.name,hand.name+"_cards",null,"ol");
hand.cards.forEach(function (card,index) {
window.UI.display[handID].cards[index] = elementPlace("#"+hand.name+"_cards",null,"card","li");
window.UI.display[handID].cards[index].innerHTML = card;
- // Play Card
+// Play Card
});
window.UI.display[handID].onclick = function () {
window.gameState.active.hand = hand.name;
updateEvent();
}
});
- // Add Hand
+ buttonAdd("#hands",null,"+",function () {
+ popupDialog("addHand","Please name new hand",true, inputDialog,{"inputType":"text"},function (newHandName) {
+ window.gameSession.send('{"action":"add","type":"hand","id":"'+newHandName+'"}');
+ });
+ }, "add_button", "li");
}
if (window.UI.menu.pools.button.checked) {
elementPlace("#display","pools",null,"ol");
@@ -109,7 +113,11 @@ function updateEvent() {
updateEvent();
}
});
- // Add Pool
+ buttonAdd("#pools",null,"+",function () {
+ popupDialog("addHand","Please name new pool",true, inputDialog,{"inputType":"text"},function (newPoolName) {
+ window.gameSession.send('{"action":"add","type":"pool","id":"'+newPoolName+'"}');
+ });
+ }, "add_button", "li");
}
}