| @@ -61,6 +61,14 @@ a:hover { | |||||
| color: #eee; | color: #eee; | ||||
| } | } | ||||
| #tags-header { | |||||
| font-size: 36px; | |||||
| } | |||||
| .tag { | |||||
| font-size: 24px; | |||||
| } | |||||
| .modal { | .modal { | ||||
| position: fixed; | position: fixed; | ||||
| z-index: 1; | z-index: 1; | ||||
| @@ -35,6 +35,8 @@ | |||||
| </select> | </select> | ||||
| </div> | </div> | ||||
| <button id="start-button">Start</button> | <button id="start-button">Start</button> | ||||
| <div id="tags-header">Tags</div> | |||||
| <div id="tags"></div> | |||||
| </div> | </div> | ||||
| <div class="hidden-scene" id="game"> | <div class="hidden-scene" id="game"> | ||||
| <div id="info-area"> | <div id="info-area"> | ||||
| @@ -114,6 +114,21 @@ function initStart() { | |||||
| options[story.id] = story; | options[story.id] = story; | ||||
| }) | }) | ||||
| select.addEventListener("change", event => { | |||||
| const holder = document.querySelector("#tags"); | |||||
| holder.innerHTML = ""; | |||||
| const tags = stories.filter(s => s.id == [event.target.value])[0].tags; | |||||
| tags.forEach(tag => { | |||||
| const div = document.createElement("div"); | |||||
| div.textContent = tag; | |||||
| div.classList.add("tag"); | |||||
| holder.appendChild(div); | |||||
| }) | |||||
| }); | |||||
| const start = document.querySelector("#start-button"); | const start = document.querySelector("#start-button"); | ||||
| start.addEventListener("click", (event) => { | start.addEventListener("click", (event) => { | ||||
| @@ -1,6 +1,9 @@ | |||||
| stories.push({ | stories.push({ | ||||
| "id": "demo", | "id": "demo", | ||||
| "name": "Tech Demo", | "name": "Tech Demo", | ||||
| "tags": [ | |||||
| "Memes" | |||||
| ], | |||||
| "intro": { | "intro": { | ||||
| "start": "Home", | "start": "Home", | ||||
| "setup": state => { | "setup": state => { | ||||
| @@ -1,6 +1,10 @@ | |||||
| stories.push({ | stories.push({ | ||||
| id: "fen-snack", | id: "fen-snack", | ||||
| name: "Fen's Food", | name: "Fen's Food", | ||||
| tags: [ | |||||
| "Prey", | |||||
| "Digestion" | |||||
| ], | |||||
| sounds: [ | sounds: [ | ||||
| "sfx/digested-test.ogg", | "sfx/digested-test.ogg", | ||||
| "loop/fen-stomach.ogg", | "loop/fen-stomach.ogg", | ||||