better highlight setting (hover, ghost)

This commit is contained in:
Thibault Duplessis 2014-10-19 17:25:15 +02:00
parent 5db9fd1ccc
commit 25a7afe51c
3 changed files with 9 additions and 6 deletions

View file

@ -24,14 +24,14 @@
<h2>Show board highlights (last move and check)</h2>
@base.radios(form("highlight"), Seq(0 -> "No", 1 -> "Yes"))
</li>
<li>
<h2>Show board coordinates (A-H, 1-8)</h2>
@base.radios(form("coords"), Pref.Coords.choices)
</li>
<li>
<h2>Show piece destinations (valid moves and premoves)</h2>
@base.radios(form("destination"), Seq(0 -> "No", 1 -> "Yes"))
</li>
<li>
<h2>Show board coordinates (A-H, 1-8)</h2>
@base.radios(form("coords"), Pref.Coords.choices)
</li>
</ul>
</fieldset>
<fieldset>

View file

@ -79,8 +79,8 @@ body.coords_2 .cg-square[data-coord-y]::before {
body.coords_2.is3d .cg-square[data-coord-y]::before {
top: 24px;
}
.manipulable .cg-square:hover,
.manipulable .cg-square.drag-over {
body.highlight .manipulable .cg-square:hover,
body.highlight .manipulable .cg-square.drag-over {
background: rgba(255, 255, 255, 0.1);
}
.cg-board .cg-square.move-dest {

View file

@ -33,6 +33,9 @@ function makeConfig(data, fen) {
unset: m.redraw
}
},
draggable: {
showGhost: data.pref.highlight
},
events: {
capture: $.sound.take
}