From 391037be88dc3b5617b5fec5124e0eb27a2a5415 Mon Sep 17 00:00:00 2001 From: ReznoRMichael Date: Wed, 4 Aug 2021 23:09:35 +0200 Subject: [PATCH] add SetIcon --- src/js/HKCheckCompletion.js | 1 + src/js/hk-functions.js | 16 +++++++++------- src/js/page-functions.js | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/js/HKCheckCompletion.js b/src/js/HKCheckCompletion.js index f0888b7..8ffb3d9 100644 --- a/src/js/HKCheckCompletion.js +++ b/src/js/HKCheckCompletion.js @@ -22,6 +22,7 @@ import { SetIconPartialJournal, SetIconRed, SetIconNone, + SetIcon, ObjectLength, TranslateMapName } from "./hk-functions.js"; diff --git a/src/js/hk-functions.js b/src/js/hk-functions.js index 6b16c3d..486519a 100644 --- a/src/js/hk-functions.js +++ b/src/js/hk-functions.js @@ -53,13 +53,6 @@ function SetIconRed(section = {}, entry = "") { section.entries[entry].icon = "red"; } -/** - * Switches global variable to an "information" symbol - */ -/* function CurrentDataInfo() { - completionSymbol = SYMBOL_INFO; -} */ - /** * Switches global variable to no symbol (span with left padding) */ @@ -68,6 +61,14 @@ function SetIconNone(section = {}, entry = "") { section.entries[entry].icon = "none"; } +/** + * Switches global variable to a chosen symbol + */ + function SetIcon(section = {}, entry = "", icon = "") { + + section.entries[entry].icon = icon; +} + /** * Checks the length of a JavaScript Object like Array.length * @param {object} object JavaScript Object @@ -104,6 +105,7 @@ export { SetIconPartialJournal, SetIconRed, SetIconNone, + SetIcon, ObjectLength, TranslateMapName }; \ No newline at end of file diff --git a/src/js/page-functions.js b/src/js/page-functions.js index dc11aab..800f92a 100644 --- a/src/js/page-functions.js +++ b/src/js/page-functions.js @@ -22,6 +22,7 @@ const SYMBOL_PARTIAL = ""; // "✔ " // const SYMBOL_INFO = ""; // "ℹ " const SYMBOL_CLOCK = ""; // "🕑 " const SYMBOL_FILE = ""; // "📁" +const SYMBOL_BINDING_NAIL = ""; // Nail Binding const SYMBOL_EMPTY = ""; const FLEUR_DIVIDE = "
"; const WIKI_LINK = "https://hollowknight.fandom.com/wiki/";