From: Laurent Mazet Date: Tue, 15 Sep 2020 20:35:47 +0000 (+0200) Subject: help messages change every 10s X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=5a4eda81f07f6324fc78452823afb6764d819dd7;p=trivabble.git help messages change every 10s --- diff --git a/public/index.html b/public/index.html index d57dc94..15b87bf 100644 --- a/public/index.html +++ b/public/index.html @@ -78,7 +78,7 @@ ParticipantRackScoreTurn Waiting for other participants… -
+

Click on the bag to take one tile.

Click on someone's score to change it.

Who's turn? Click on the Turn button!

diff --git a/public/trivabble.css b/public/trivabble.css index f29f610..990c949 100644 --- a/public/trivabble.css +++ b/public/trivabble.css @@ -47,7 +47,7 @@ html, #board, [draggable], .tile { color: green; } -#clear-game, #help-message, #clear-rack { +#clear-game, #clear-rack { white-space:pre-wrap; } @@ -562,3 +562,12 @@ td.blink { #info-spell-checking a { color:black; } + +#help-messages { + border:1px solid silver; + box-sizing:border-box; + overflow:auto; + width: 20em; + margin-bottom:1px; + height:5em; +} diff --git a/public/trivabble.js b/public/trivabble.js index 2be3b7d..d378966 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -1953,6 +1953,27 @@ } } + function changeHelpMessage() { + if (typeof changeHelpMessage.index === "undefined") { + changeHelpMessage.index = -1; + } + + const helpMessages = document.getElementById("help-messages"); + if (helpMessages) { + const listOfMessages = helpMessages.getElementsByTagName("p"); + if ((changeHelpMessage.index >= 0) && (changeHelpMessage.index