From 61c5baeadcc35824d5755464e76c3cb83dfffbdf Mon Sep 17 00:00:00 2001 From: Harley White Date: Mon, 10 May 2021 18:27:37 -0400 Subject: [PATCH] Added single tab toggle --- changelog.md | 1 + js/technical/displays.js | 5 +---- js/technical/systemComponents.js | 8 ++++---- js/technical/temp.js | 10 +--------- js/utils/save.js | 1 + 5 files changed, 8 insertions(+), 17 deletions(-) diff --git a/changelog.md b/changelog.md index 52b7934..8f5c37a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 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 onEnter and onExit for challenges. - Added documentation on how gainMult/Exp work for static layers. diff --git a/js/technical/displays.js b/js/technical/displays.js index 0776deb..1652d8e 100644 --- a/js/technical/displays.js +++ b/js/technical/displays.js @@ -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 diff --git a/js/technical/systemComponents.js b/js/technical/systemComponents.js index fefaef3..02b3e69 100644 --- a/js/technical/systemComponents.js +++ b/js/technical/systemComponents.js @@ -159,10 +159,10 @@ var systemComponents = { - - - - + + + + ` }, diff --git a/js/technical/temp.js b/js/technical/temp.js index 0e8ecd8..8430a95 100644 --- a/js/technical/temp.js +++ b/js/technical/temp.js @@ -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 } diff --git a/js/utils/save.js b/js/utils/save.js index 5f8586f..8fe2315 100644 --- a/js/utils/save.js +++ b/js/utils/save.js @@ -19,6 +19,7 @@ function startPlayerBase() { hasNaN: false, hideChallenges: false, showStory: true, + forceOneTab: false, points: modInfo.initialStartPoints, subtabs: {}, lastSafeTab: (readData(layoutInfo.showTree) ? "none" : layoutInfo.startTab)