1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2025-05-12 21:11:05 +00:00

Added single tab toggle

This commit is contained in:
Harley White 2021-05-10 18:27:37 -04:00
parent d5a0b88796
commit 61c5baeadc
5 changed files with 8 additions and 17 deletions

View file

@ -53,10 +53,7 @@ function achievementStyle(layer, id){
function updateWidth() {
var screenWidth = window.innerWidth
var splitScreen = screenWidth >= 1024
if (player.splitMode === "disabled") splitScreen = false
if (player.splitMode === "enabled") splitScreen = true
if (player.forceOneTab) splitScreen = false
tmp.other.screenWidth = screenWidth
tmp.other.splitScreen = splitScreen
tmp.other.lastPoints = player.points

View file

@ -159,10 +159,10 @@ var systemComponents = {
<td><button class="opt" onclick="adjustMSDisp()">Show Milestones: {{ MS_DISPLAYS[MS_SETTINGS.indexOf(player.msDisplay)]}}</button></td>
<td><button class="opt" onclick="toggleOpt('hqTree')">High-Quality Tree: {{ player.hqTree?"ON":"OFF" }}</button></td>
</tr>
<tr>
<td><button class="opt" onclick="toggleOpt('hideChallenges')">Completed Challenges: {{ player.hideChallenges?"HIDDEN":"SHOWN" }}</button></td>
<!-- <td><button class="opt" onclick="toggleOpt('oldStyle')">Style: {{ player.oldStyle?"v1.0":"NEW" }}</button></td>-->
</tr>
<tr>
<td><button class="opt" onclick="toggleOpt('hideChallenges')">Completed Challenges: {{ player.hideChallenges?"HIDDEN":"SHOWN" }}</button></td>
<td><button class="opt" onclick="toggleOpt('forceOneTab'); needsCanvasUpdate = true">Single-Tab Mode: {{ player.forceOneTab?"ALWAYS":"AUTO" }}</button></td>
</tr>
</table>`
},

View file

@ -42,19 +42,11 @@ function setupTemp() {
}
tmp.other = {
screenWidth: window.innerWidth,
splitScreen: window.innerWidth >=1024,
lastPoints: player.points || new Decimal(0),
oomps: new Decimal(0),
held: {
time: null,
id: null,
layer: null,
type: null,
}
}
updateWidth()
temp = tmp
}