This commit is contained in:
2019-10-29 02:16:26 +01:00
parent ecfb08fb4d
commit 7a8978a4f6
3 changed files with 21 additions and 16 deletions

View File

@ -12,12 +12,12 @@
<div id="actions">
<?php
function addButton($action, $label) {
echo " <div>$label</div>\n";
echo " <button type='button' onclick='changeKey(this, \"$action\")'>\n";
echo " <script>getKey(\"$action\")</script>\n";
echo " </button>\n";
}
?>
<div><?=$label?></div>
<button type='button' onclick='changeKey(this, "<?=$action?>")'>
<script>getKey("<?=$action?>")</script>
</button>
<?php }
addButton("moveLeft", "GAUCHE");
addButton("moveRight", "DROITE");
addButton("softDrop", "CHUTE LENTE");