add multiplicator
This commit is contained in:
parent
11a2eb194a
commit
fc8c56eb40
@ -86,6 +86,7 @@
|
|||||||
Blackscreen: <input id="blackScreenCheck" checked="checked" type="checkbox">
|
Blackscreen: <input id="blackScreenCheck" checked="checked" type="checkbox">
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
Multiplikator: <input id="pointMultiplicator" type="number" name="" value="1" style="width: 50px;"><br>
|
||||||
<button id="startScheinchenbtn" value="1"><i class="fa fa-play"></i> Schweinchen</button><br>
|
<button id="startScheinchenbtn" value="1"><i class="fa fa-play"></i> Schweinchen</button><br>
|
||||||
<button id="startScheinchenbtn2" value="2"><i class="fa fa-play"></i> Schweinchen (2x)</button><br>
|
<button id="startScheinchenbtn2" value="2"><i class="fa fa-play"></i> Schweinchen (2x)</button><br>
|
||||||
<button id="startScheinchenbtn3" value="3"><i class="fa fa-play"></i> Schweinchen (3x)</button><br>
|
<button id="startScheinchenbtn3" value="3"><i class="fa fa-play"></i> Schweinchen (3x)</button><br>
|
||||||
|
@ -45,6 +45,7 @@ $(document).ready(function() {
|
|||||||
$("button[id^='startScheinchenbtn']").each(function(){
|
$("button[id^='startScheinchenbtn']").each(function(){
|
||||||
$(this).click(function() {
|
$(this).click(function() {
|
||||||
var status = $(this).attr('value');
|
var status = $(this).attr('value');
|
||||||
|
$("#pointMultiplicator").val(status)
|
||||||
console.log('status' + status);
|
console.log('status' + status);
|
||||||
wsSend("setRunde", status);
|
wsSend("setRunde", status);
|
||||||
$(this).attr("disabled", "disabled");
|
$(this).attr("disabled", "disabled");
|
||||||
@ -113,13 +114,13 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$("#pointsToTheLeft").click(function() {
|
$("#pointsToTheLeft").click(function() {
|
||||||
var points = parseFloat($(".pointsLeft").text()) + parseFloat($("#SumRes").text());
|
var points = parseFloat($(".pointsLeft").text()) + parseFloat($("#SumRes").text())*$("#pointMultiplicator").val();
|
||||||
wsSend("setLeftPoints", points);
|
wsSend("setLeftPoints", points);
|
||||||
$("#SumRes").text("0");
|
$("#SumRes").text("0");
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#pointsToTheRight").click(function() {
|
$("#pointsToTheRight").click(function() {
|
||||||
var points = parseFloat($(".pointsRight").text()) + parseFloat($("#SumRes").text());
|
var points = parseFloat($(".pointsRight").text()) + parseFloat($("#SumRes").text())*$("#pointMultiplicator").val();
|
||||||
wsSend("setRightPoints", points);
|
wsSend("setRightPoints", points);
|
||||||
$("#SumRes").text("0");
|
$("#SumRes").text("0");
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user