diff --git a/src/main/resources/templates/overlay.html b/src/main/resources/templates/overlay.html index bedb2a4..631eeff 100644 --- a/src/main/resources/templates/overlay.html +++ b/src/main/resources/templates/overlay.html @@ -61,7 +61,9 @@ document.addEventListener("DOMContentLoaded", async() => { await diceBox.init() + let timeout = 0; evtSource.addEventListener("message", function (event) { + clearInterval(timeout); let data = JSON.parse(event.data); diceBox.onRollComplete = (rollResult) => { let httpRequest = new XMLHttpRequest(); @@ -74,7 +76,7 @@ results: rollResult, } )) if ({clearAfter} > 0) { - setTimeout(() => diceBox.clear(), {clearAfter} * 1000) + timeout = setTimeout(() => diceBox.clear(), {clearAfter} * 1000) } } diff --git a/src/main/resources/templates/pub/index.html b/src/main/resources/templates/pub/index.html index 71cd0ec..34f4b94 100644 --- a/src/main/resources/templates/pub/index.html +++ b/src/main/resources/templates/pub/index.html @@ -13,7 +13,6 @@ .collapsible { background-color: #333333; color: black; - cursor: pointer; margin-top: 10px; padding: 18px; width: 100%; @@ -39,6 +38,14 @@ background: #333333; color: #fff } + + button:hover { + background: #444444; + } + button:active { + background: #222222; + } + input { margin: 10px; } @@ -106,6 +113,11 @@ color: #000 } + + .overlayButton:hover { + background: transparent; + } + .tooltip { position: fixed; border-radius: 0.5rem; @@ -133,10 +145,10 @@

Dice-Tower

-
-
-
- +
+
+
+

-

Example Commands: "1d6", "2d8 1d100", "1d4 and 1d6", "2d20 & 1d2, "5d6+10"

- -

- - +
+
+ + + + + + + + + + + +
+
+ + + + +
+ +
+ + +
@@ -206,8 +236,39 @@
This saves your current theme and theme color for current Name
+
+ Example Commands: "1d6", "2d8 1d100", "1d4 and 1d6", "2d20 & 1d2, "5d6+10" +
+ +
+
+

How-To

+
    +
  • Join a room by entering your character name and the name of the room
  • +
  • Open your Dice-Overlay either in a new Tab or as a browser source in OBS
  • +
      +
    • Only open your Dice-Overlay once!
    • +
    • You can configure your Overlay with query parameters (more information at the info element next to the link)
    • +
    +
  • Configure your dice
  • +
  • Save your dice configuration
  • +
  • Start rolling
  • +
+
+