From e248e10b9983a8fe2bf0b2c9bdb4e4f1ee738756 Mon Sep 17 00:00:00 2001 From: Acamaeda Date: Sat, 31 Oct 2020 23:05:50 -0400 Subject: [PATCH] Finished "hide tree" functionality and back button, a few other fixes --- demo.html | 3 +- index.html | 129 ++++++++++++---------------------------------------- js/tree.js | 3 +- js/utils.js | 5 +- style.css | 7 ++- 5 files changed, 42 insertions(+), 105 deletions(-) diff --git a/demo.html b/demo.html index f7440a4..4511971 100644 --- a/demo.html +++ b/demo.html @@ -47,6 +47,7 @@
{{VERSION.withoutName}}
+

i
@@ -69,7 +70,7 @@ - +
diff --git a/index.html b/index.html index b597799..509fefd 100644 --- a/index.html +++ b/index.html @@ -4,27 +4,28 @@ - - + + - + - - + + + -
- +
+
-

Loading... (If this takes too long it means there was a serious error!)

+

Loading... (If this takes too long it means there was a serious error!)←

-
-
+
+

{{modInfo.name}} {{VERSION.withoutName}}



Congratulations! You have reached the end and beaten this game, but for now...


@@ -42,37 +43,13 @@


Oh, you are still reading this?


-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - -
-
-
+
+ +
{{VERSION.withoutName}}
- -

i
+ + +

i
-
- -
Dev Speed: {{format(player.devSpeed)}}x
-
- -
Offline Time: {{formatTime(player.offTime.remain)}}
-
- -
Reach {{formatWhole(ENDGAME)}} to beat the game!
-
-
- You have -

{{format(player.points)}}

- {{modInfo.pointsName}} -
- ({{format(getPointGen())}}/sec) -
-
+
-
+




- - -
-
- + -
- + + +
+
+
+
+ +
diff --git a/js/tree.js b/js/tree.js index 213dc4c..3c51c6f 100644 --- a/js/tree.js +++ b/js/tree.js @@ -14,6 +14,7 @@ addNode("spook", { }, ) + addLayer("tree-tab", { - tabFormat: ["tree", function() {layoutInfo.treeLayout ? layoutInfo.treeLayout : TREE_LAYERS}] + tabFormat: [["tree", function() {return (layoutInfo.treeLayout ? layoutInfo.treeLayout : TREE_LAYERS)}]] }) \ No newline at end of file diff --git a/js/utils.js b/js/utils.js index cdb119e..c44ff02 100644 --- a/js/utils.js +++ b/js/utils.js @@ -100,6 +100,7 @@ function startPlayerBase() { showStory: true, points: modInfo.initialStartPoints, subtabs: {}, + lastSafeTab: (layoutInfo.showTree ? "none" : "layoutInfo.startTab") } } @@ -601,14 +602,14 @@ function showTab(name) { var toTreeTab = name == "none" player.tab = name - + if (player.navTab == "none" && (tmp[name].row !== "side") && (tmp[name].row !== "otherside")) player.lastSafeTab = name delete player.notify[name] needCanvasUpdate = true } function goBack() { if (player.navTab !== "none") showTab("none") - else showTab(layoutInfo.startTab) + else showTab(player.lastSafeTab) } function notifyLayer(name) { diff --git a/style.css b/style.css index ab17ab4..e85e246 100644 --- a/style.css +++ b/style.css @@ -74,6 +74,7 @@ h1, h2, h3, b, input { font-family: "Lucida Console", "Courier New", monospace; color: rgba(0, 0, 0, 0.5); text-shadow: var(--hqProperty3); + padding: 0; } @@ -88,6 +89,8 @@ h1, h2, h3, b, input { font-family: "Lucida Console", "Courier New", monospace; color: rgba(0, 0, 0, 0.5); text-shadow: var(--hqProperty3); + padding: 0; + } .smallNode { @@ -101,6 +104,8 @@ h1, h2, h3, b, input { font-family: "Lucida Console", "Courier New", monospace; color: rgba(0, 0, 0, 0.5); text-shadow: var(--hqProperty3); + padding: 0; + } @@ -156,7 +161,7 @@ h1, h2, h3, b, input { .other-back { position: absolute; - top: 10px; + top: 0px; left: 60px; background-color: transparent; border: 1px solid transparent;