vieux can control their blurred state
This commit is contained in:
parent
c94119e173
commit
751ce62099
1 changed files with 6 additions and 1 deletions
|
@ -35,7 +35,10 @@
|
||||||
<div id="below">
|
<div id="below">
|
||||||
<form id="state">
|
<form id="state">
|
||||||
<input type="checkbox" id="shown" name="shown" onclick='sendState()' />
|
<input type="checkbox" id="shown" name="shown" onclick='sendState()' />
|
||||||
<label for="shown">Visible</label></br>
|
<label for="shown">Visible</label>
|
||||||
|
|
||||||
|
<input type="checkbox" id="blurred" name="blurred" onclick='sendState()' />
|
||||||
|
<label for="shown">Brouillé</label></br>
|
||||||
|
|
||||||
<input type="radio" id="npc0" name="npc" value=0 onclick='sendState()' />
|
<input type="radio" id="npc0" name="npc" value=0 onclick='sendState()' />
|
||||||
<label for="npc0">Traqueur</label>
|
<label for="npc0">Traqueur</label>
|
||||||
|
@ -74,12 +77,14 @@
|
||||||
for(entry of data)
|
for(entry of data)
|
||||||
nState[entry[0]] = entry[1];
|
nState[entry[0]] = entry[1];
|
||||||
nState.shown = "shown" in nState;
|
nState.shown = "shown" in nState;
|
||||||
|
nState.blurred = "blurred" in nState;
|
||||||
nState.tracker = nState.npc == 0;
|
nState.tracker = nState.npc == 0;
|
||||||
socket.emit('changeState', nState);
|
socket.emit('changeState', nState);
|
||||||
}
|
}
|
||||||
|
|
||||||
socket.on('newState', function(state){
|
socket.on('newState', function(state){
|
||||||
document.querySelector("#shown").checked = state.shown;
|
document.querySelector("#shown").checked = state.shown;
|
||||||
|
document.querySelector("#blurred").checked = state.blurred;
|
||||||
document.querySelector("#npc0").checked = state.npc == 0;
|
document.querySelector("#npc0").checked = state.npc == 0;
|
||||||
document.querySelector("#npc1").checked = state.npc == 1;
|
document.querySelector("#npc1").checked = state.npc == 1;
|
||||||
document.querySelector("#npc2").checked = state.npc == 2;
|
document.querySelector("#npc2").checked = state.npc == 2;
|
||||||
|
|
Loading…
Reference in a new issue