From 5d415a1a601776044d2ddb595d10bc854ef4ef6b Mon Sep 17 00:00:00 2001 From: Daniel Xie Date: Tue, 23 May 2017 21:55:24 -0500 Subject: [PATCH] Fix bug with purchaseHacknetNode(). Improve nano interface --- css/menupages.css | 68 +++++++++++++++++++++++++++++---------- index.html | 20 ++++++------ src/NetscriptEvaluator.js | 1 + 3 files changed, 63 insertions(+), 26 deletions(-) diff --git a/css/menupages.css b/css/menupages.css index 79adcc1cb..3337b8e2b 100644 --- a/css/menupages.css +++ b/css/menupages.css @@ -30,18 +30,25 @@ overflow-y: scroll; } -#script-editor-filename-tag { - padding-top: 10px; - padding-bottom: 0px; - float: left; +#script-editor-buttons-wrapper { + width: 100%; + padding-right: 0xp; + margin-right: 0px; } #script-editor-save-and-close-button, +#script-editor-netscript-doc-button { + display: inline-block; +} + +#script-editor-save-and-close-button { + float:left; +} + #script-editor-netscript-doc-button { float: right; - display: block; - width: 50%; - margin-right: 25%; + padding-right: 0px; + margin-right: 2px; } #script-editor-netscript-doc-warning { @@ -52,13 +59,37 @@ background-color: #666; } +#script-editor-wrapper { + height:100%; + width: 70%; +} + +#script-editor-filename-wrapper { + background-color: #555; + margin-left: 6px; + margin-right: 0px; + padding-left: 6px; + width: 100%; + border: 2px solid white; +} + +#script-editor-filename-tag { + display: inline-block; + padding-top: 10px; + padding-bottom: 0px; + float:center; + background-color: #555; +} + #script-editor-filename { - float: left; +background-color: #555; + display: inline-block; + float: center; resize: none; - color: #66ff33; - width: 70%; - margin: 10px; - padding: 5px; + color: white; + margin: 4px; + + padding: 2px; border: 2px solid white; -webkit-box-shadow: @@ -79,11 +110,14 @@ #script-editor-text { color: #66ff33; - width: 70%; - height: 100%; - margin: 10px; - padding: 5px; - + height: 80%; + width: 100%; + margin-left: 6px; + + padding-left: 6px; + padding-top: 6px; + padding-bottom: 6px; + border: 2px solid white; -webkit-box-shadow: inset 0 0 8px rgba(0,0,0,0.1), diff --git a/index.html b/index.html index 8daf76b08..eb4297c24 100644 --- a/index.html +++ b/index.html @@ -143,17 +143,19 @@
-
-

Script name:

- Save & Close (Ctrl + b) - Netscript Documentation -

Warning: You will lose unsaved content!

+
+
+

Script name:

+
- - -
-

+
+ Save & Close (Ctrl + b) + Netscript Documentation +

Warning: You will lose unsaved content!

+
+
+



diff --git a/src/NetscriptEvaluator.js b/src/NetscriptEvaluator.js index dc7938737..2b2578591 100644 --- a/src/NetscriptEvaluator.js +++ b/src/NetscriptEvaluator.js @@ -755,6 +755,7 @@ function evaluate(exp, workerScript) { Player.loseMoney(cost); Player.hacknetNodes.push(node); + displayHacknetNodesContent(); workerScript.scriptRef.log("Purchased new Hacknet Node with name: " + name); resolve(name); }, CONSTANTS.CodeInstructionRunTime);