display only one (current) hint

This commit is contained in:
ReznoRMichael 2021-07-03 22:57:43 +02:00
commit e08d91d495
4 changed files with 22 additions and 5 deletions

View file

@ -65,6 +65,7 @@ const HK = {
hints: {
h2: "My friend Elderbug once told me about...",
id: "hk-hints",
current: "fireballLevel",
entries: {
fireballLevel: {
spoiler: "...a mysterious shaman living in a dwelling below the town of Dirtmouth"

View file

@ -184,8 +184,15 @@ function GenerateInnerHTML(sections) {
textFill += CompletionFill(sections[section]);
/* create all main entries */
for (let entry in entries) {
textFill += SingleEntryFill(section, entries[entry]);
switch (section) {
case "hints":
textFill += SingleEntryFill(section, entries[sections[section].current]);
break;
default:
for (let entry in entries) {
textFill += SingleEntryFill(section, entries[entry]);
}
}
/* Cumulate all section texts into one variable for final HTML filling. End section div tag */