-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
199 lines (183 loc) · 10.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<html>
<head>
<title>Twilight Princess Item Tracker</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<script src="script/items.js"></script>
<script src="script/chests.js"></script>
<script type="text/javascript">
if (document.addEventListener) { // IE >= 9; other browsers
document.addEventListener('contextmenu', function (e) {
//Runs when you right click to bring up context menu
if (mouseOverItem == true) {
//We might still want context menu while in edit mode.
if (!editmode) {
//Call the method that handles right clicking.
gridItemRClick(mouseLastOverR, mouseLastOverC, mouseLastOverCor);
e.preventDefault();
}
}
}, false);
} else { // IE < 9
document.attachEvent('oncontextmenu', function () {
if (mouseOverItem == true) {
if (!editmode) {
gridItemRClick(mouseLastOverR, mouseLastOverC, mouseLastOverCor);
//This is method used in old browsers
window.event.returnValue = false;
}
}
});
}
//Set up global variables for chest logic and for backend functions
var dungeonChest = 0;
var dungeonChestOld = 0;
var c = 0;
var FaronEscape = false;
var TwilightSkip = false;
var SkipMDH = false;
var SkipIntro = false;
var EarlyDesert = false;
var EarlyCits = false;
var RemoveBoxes = false;
var OpenGates = false;
var MinesPatch = false;
var glitchedLogic = false;
var NoBottleReq = false;
var EarlyHyruleCastle = false;
var EscortSkip = false;
var EarlyToT = false;
var EarlyPoT = false;
var TaloMap = false;
//creates the menu and sets it up
function openCity(cityName) {
var i;
var x = document.getElementsByClassName("city");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
document.getElementById(cityName).style.display = "block";
}
</script>
<script src="script/main.js"></script>
<!--Creates the layout of the item tracker, blank space between the two trackers, and the map tracker-->
<div id='layoutdiv'>
<div id='itemdiv' oncontextmenu="gridItemRClick()" class='itemdiv'>
</div>
<div id='blankspace' class='blankspace'>
</div>
<div id='mapdiv' class='mapdiv'>
<div id='submapdiv' class='submapdiv'>
<div align='center'><span id='submaparea' style="font-size:20px">Hyrule</span></div>
<hr style="margin-top: 4px; margin-bottom: 4px">
<ul onselectstart="return false" id='submaplist' style="margin-top: 4px; margin-bottom: 4px; overflow-y: auto; height: 232px;"></ul>
</div>
<div id='checkCounter' style="background-color: black; position:relative; margin-left: 70%; margin-top: 935px; margin-botton: 0px;">4</div>
</div>
</div>
<!-- Setting panel-->
<button id='settingsbutton' type='button' onclick='showSettings(this)'>🔧</button>
<fieldset id='settings' class='settings'>
<legend>Settings</legend>
<div class="w3-bar w3-black">
<button class="w3-bar-item w3-button" onclick="openCity('TrackerOptions')">Tracker Options</button>
<button class="w3-bar-item w3-button" onclick="openCity('CheckOptions')">Check Options</button>
<button class="w3-bar-item w3-button" onclick="openCity('CosmeticChanges')">CosmeticChanges</button>
<button class="w3-bar-item w3-button" onclick="openCity('SkipOptions')">Skip Options</button>
</div>
<div id="TrackerOptions" class="w3-container city">
<p>Allow you to Modify how the tracker functions.</p>
<fieldset>
<legend>Item Tracker</legend>
<button type="button" onclick="EditMode()">Edit Mode</button>
<button type="button" onclick="ResetLayout()">Reset Layout</button>
<button type="button" onclick="ResetTracker()">Reset Tracker</button>
<br>
Size<input type="range" name='itemdivsize' id='itemrange' value='100' max='200' min='1' onchange="setZoom('itemdiv', this)">
<span id='itemdivsize'>100%</span><br>
<input type="checkbox" name="showprizes" onchange="showPrizes(this)">Show Dungeon Items (BETA)<br>
<input type="checkbox" name="removeboxes" onchange="setRemoveBoxes(this)">Remove Box From Behind Items<br>
</fieldset>
<fieldset>
<legend>Map Tracker</legend>
<input type="checkbox" name="showmap" checked='true' onchange="showTracker('mapdiv', this)">Enabled<br>
Size<input type="range" name='mapdivsize' id='maprange' value='100' max='200' min='1' onchange="setZoom('mapdiv', this)">
<span id='mapdivsize'>100%</span><br>
Position:
<input type='radio' name='mapposition' value='Side' checked='true' onclick="setOrder(false)">Side
<input type='radio' name='mapposition' value='Below' onclick="setOrder(true)">Below<br>
</fieldset>
</div>
<div id="CheckOptions" class="w3-container city" style="display:none">
<p>Allows you to sort by different types of checks.</p>
<fieldset>
<legend>Logic Options</legend>
<input type='radio' name='glitchedLogic' value='Normal' checked='true' onclick="setGlitchedLogicOff()">Standard Logic
<input type='radio' name='glitchedLogic' value='Glitched' onclick="setGlitchedLogicOn()">Glitched Logic<br>
<br>
<input type='radio' name='checktracker' value="map" id="maptracker" checked='true' onclick="setMapTracker()">Map Tracker
<input type='radio' name='checktracker' value="poe" id="poetracker" onclick="setPoeTracker()">Poe Tracker<br>
<input type='radio' name='checktracker' value="bug" id="bugtracker" onclick="setBugTracker()">Bug Tracker<br>
<input type='radio' name='checktracker' value="shop" id="shoptracker" onclick="setShopTracker()">Shop Tracker<br>
</fieldset>
</div>
<div id="CosmeticChanges" class="w3-container city" style="display:none">
<p>Allows you to modify how the tracker looks.</p>
<fieldset>
<legend>Cosmetic Changes</legend>
Map Distance<input type="range" name='trackerDistance' id='trackerDistanceID' value='1' max='100' min='0' onchange="setDistance('blankspace', this)">
<span id='blankspacesize'>1%</span><br>
Tracker Opacity<input type="range" name='trackerOpacity' id='trackerOpacityID' value='100' max='100' min='0' onchange="setOpacity('tracker', this)">
<span id='trackersize'>100%</span><br>
Background Image:
<select>
<option id="none">None</option>
<option id="castle">Castle</option>
<option id="meadow">Meadow</option>
<option id="bridge">Bridge</option>
</select>
<button onclick="setBackground()">Set</button><br>
<input type="checkbox" name="talomap" onchange="setTaloMap(this)">Talo's Map of Hyrule<br>
</fieldset>
</div>
<div id="SkipOptions" class="w3-container city" style="display:none">
<p>Select the Skips you have enabled to make the logic more accurate</p>
<fieldset>
<legend>Skip Options</legend>
<input type="checkbox" name="faronescape" onchange="setFaronEscape(this)">Faron Escape<br>
<input type="checkbox" name="twilightskip" onchange="setTwilightSkip(this)">Twilight Skip<br>
<input type="checkbox" name="skipmdh" onchange="setSkipMdh(this)">Skip MDH<br>
<input type="checkbox" name="skipintro" onchange="setSkipIntro(this)">Skip Intro<br>
<input type="checkbox" name="earlydesert" onchange="setEarlyDesert(this)">Early Desert<br>
<input type="checkbox" name="earlycits" onchange="setEarlyCits(this)">Early CiTS<br>
<input type="checkbox" name="opengates" onchange="setOpenGates(this)">Open Field Gates<br>
<input type="checkbox" name="minespatch" onchange="setMinesPatch(this)">Goron Mines Patch<br>
<input type="checkbox" name="nobottlereq" onchange="setNoBottleReq(this)">No Shop Bottle Requirement?<br>
<input type="checkbox" name="earlyHyruleCastle" onchange="setEarlyHyruleCastle(this)">Early Hyrule Castle<br>
<input type="checkbox" name="escortskip" onchange="setEscortSkip(this)">Escort Skip<br>
<input type="checkbox" name="earlytot" onchange="setEarlyToT(this)">Early ToT<br>
<input type="checkbox" name="earlypot" onchange="setEarlyPoT(this)">Early PoT<br>
</fieldset>
</div>
</fieldset>
<table id='itemconfig' class='itemconfig' style='display:none'></table>
<script>
init();
</script>
<br />
<br />
<footer style='bottom:0; width:100%; text-align: center; position: relative; color:grey'>
<center>
<div id='credits' style="background-color:black; width:25%; text-align: center;">
Twilight Princess Randomizer Tracker v1.8 by Lunar Soap<br />
With help and inspiration from <a href="https://github.com/TreZc0">TreZc0</a> and <a href="https://github.com/TestRunnerSRL">TestRunner</a>
</div>
</center>
</footer>
</body>
</html>