checkboxes event functions + docs
This commit is contained in:
parent
8a365f6a84
commit
f2eba3fbda
4 changed files with 16 additions and 11 deletions
File diff suppressed because one or more lines are too long
|
|
@ -200,11 +200,13 @@
|
|||
|
||||
<div class="checkboxes">
|
||||
<label for="checkbox-hints" class="checkbox-label" title="Check to see an optional clue for your first playthrough based on your save's progress.">
|
||||
<input type="checkbox" name="checkboxes" id="checkbox-hints" value="hints-off" onclick="CheckboxHintsToggle();">
|
||||
<!-- <input type="checkbox" name="checkboxes" id="checkbox-hints" value="hints-off" onclick="CheckboxHintsToggle();"> -->
|
||||
<input type="checkbox" name="checkboxes" id="checkbox-hints" value="hints-off">
|
||||
<span class="checkmark"></span>Hints
|
||||
</label>
|
||||
<label for="checkbox-spoilers" class="checkbox-label" title="Check to show every item's locations and costs. Hidden by default.">
|
||||
<input type="checkbox" name="checkboxes" id="checkbox-spoilers" value="spoilers-off" onclick="CheckboxSpoilersToggle();">
|
||||
<!-- <input type="checkbox" name="checkboxes" id="checkbox-spoilers" value="spoilers-off" onclick="CheckboxSpoilersToggle();"> -->
|
||||
<input type="checkbox" name="checkboxes" id="checkbox-spoilers" value="spoilers-off">
|
||||
<span class="checkmark"></span>Spoilers
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -85,11 +85,13 @@
|
|||
|
||||
<div class="checkboxes">
|
||||
<label for="checkbox-hints" class="checkbox-label" title="Check to see an optional clue for your first playthrough based on your save's progress.">
|
||||
<input type="checkbox" name="checkboxes" id="checkbox-hints" value="hints-off" onclick="CheckboxHintsToggle();">
|
||||
<!-- <input type="checkbox" name="checkboxes" id="checkbox-hints" value="hints-off" onclick="CheckboxHintsToggle();"> -->
|
||||
<input type="checkbox" name="checkboxes" id="checkbox-hints" value="hints-off">
|
||||
<span class="checkmark"></span>Hints
|
||||
</label>
|
||||
<label for="checkbox-spoilers" class="checkbox-label" title="Check to show every item's locations and costs. Hidden by default.">
|
||||
<input type="checkbox" name="checkboxes" id="checkbox-spoilers" value="spoilers-off" onclick="CheckboxSpoilersToggle();">
|
||||
<!-- <input type="checkbox" name="checkboxes" id="checkbox-spoilers" value="spoilers-off" onclick="CheckboxSpoilersToggle();"> -->
|
||||
<input type="checkbox" name="checkboxes" id="checkbox-spoilers" value="spoilers-off">
|
||||
<span class="checkmark"></span>Spoilers
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1160,7 +1160,6 @@ function CheckHintsTrue(divId, dataObject, playerData, worldData) {
|
|||
*/
|
||||
function HKReadTextArea(textAreaId = "") {
|
||||
|
||||
console.log("HKReadTextArea()");
|
||||
// refresh and prepare document for filling with data from the save
|
||||
InitialHTMLPopulate(HK.DIV_ID);
|
||||
|
||||
|
|
@ -1451,19 +1450,21 @@ document.getElementById("save-location-input").addEventListener("click", (e) =>
|
|||
SelectCopyInputText(e, "save-location-input-tooltip", "Copied save file location to clipboard");
|
||||
}, false);
|
||||
|
||||
// Choose File input field
|
||||
document.getElementById("save-location-input").addEventListener("mouseout", () => {
|
||||
FillInnerHTML("save-location-input-tooltip", "Click once to copy to clipboard");
|
||||
}, false);
|
||||
|
||||
// Make functions global so they can be used on click and change events (for Webpack)
|
||||
// window.HKReadTextArea = HKReadTextArea;
|
||||
window.CheckboxSpoilersToggle = CheckboxSpoilersToggle;
|
||||
window.CheckboxHintsToggle = CheckboxHintsToggle;
|
||||
|
||||
// Analyze Text button
|
||||
document.getElementById("save-area-read").addEventListener("click", () => {
|
||||
HKReadTextArea("save-area");
|
||||
}, false);
|
||||
|
||||
// Checkboxes functions
|
||||
document.getElementById("checkbox-hints").addEventListener("click", CheckboxHintsToggle, false);
|
||||
document.getElementById("checkbox-spoilers").addEventListener("click", CheckboxSpoilersToggle, false);
|
||||
|
||||
export {
|
||||
// to use in LoadSaveFile.js for auto-analyzing file after decoding
|
||||
HKReadTextArea
|
||||
};
|
||||
Loading…
Reference in a new issue