1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-24 09:21:46 +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

@ -1,5 +1,6 @@
# The Modding Tree changelog: # The Modding Tree changelog:
- Added a setting to always use single-tab mode.
- Added directMult, which multiplies gain after exponents and softcaps. It actually multiplies gain for static layers. - Added directMult, which multiplies gain after exponents and softcaps. It actually multiplies gain for static layers.
- Added onEnter and onExit for challenges. - Added onEnter and onExit for challenges.
- Added documentation on how gainMult/Exp work for static layers. - Added documentation on how gainMult/Exp work for static layers.

View file

@ -53,10 +53,7 @@ function achievementStyle(layer, id){
function updateWidth() { function updateWidth() {
var screenWidth = window.innerWidth var screenWidth = window.innerWidth
var splitScreen = screenWidth >= 1024 var splitScreen = screenWidth >= 1024
if (player.splitMode === "disabled") splitScreen = false if (player.forceOneTab) splitScreen = false
if (player.splitMode === "enabled") splitScreen = true
tmp.other.screenWidth = screenWidth tmp.other.screenWidth = screenWidth
tmp.other.splitScreen = splitScreen tmp.other.splitScreen = splitScreen
tmp.other.lastPoints = player.points 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="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> <td><button class="opt" onclick="toggleOpt('hqTree')">High-Quality Tree: {{ player.hqTree?"ON":"OFF" }}</button></td>
</tr> </tr>
<tr> <tr>
<td><button class="opt" onclick="toggleOpt('hideChallenges')">Completed Challenges: {{ player.hideChallenges?"HIDDEN":"SHOWN" }}</button></td> <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>--> <td><button class="opt" onclick="toggleOpt('forceOneTab'); needsCanvasUpdate = true">Single-Tab Mode: {{ player.forceOneTab?"ALWAYS":"AUTO" }}</button></td>
</tr> </tr>
</table>` </table>`
}, },

View file

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

View file

@ -19,6 +19,7 @@ function startPlayerBase() {
hasNaN: false, hasNaN: false,
hideChallenges: false, hideChallenges: false,
showStory: true, showStory: true,
forceOneTab: false,
points: modInfo.initialStartPoints, points: modInfo.initialStartPoints,
subtabs: {}, subtabs: {},
lastSafeTab: (readData(layoutInfo.showTree) ? "none" : layoutInfo.startTab) lastSafeTab: (readData(layoutInfo.showTree) ? "none" : layoutInfo.startTab)