From 6fe0ec1ea544685bbabecd131d3ae30ba1be993e Mon Sep 17 00:00:00 2001 From: Daniel Xie Date: Wed, 14 Jun 2017 20:19:52 -0500 Subject: [PATCH] Added dynamic array functioanlity. Refactored tail so that it displays a dynamic popup with log contents --- css/popupboxes.css | 18 +++-- index.html | 9 +++ src/Constants.js | 9 ++- src/NetscriptEvaluator.js | 34 ++++----- src/NetscriptFunctions.js | 126 +++++++++++++++++---------------- src/NetscriptParser.js | 47 ++++++++---- src/NetscriptWorker.js | 2 +- src/Player.js | 6 +- src/Terminal.js | 31 +++++++- src/engine.js | 4 ++ utils/DialogBox.js | 28 -------- utils/LogBox.js | 58 +++++++++++++++ utils/PurchaseRamForHomeBox.js | 2 +- 13 files changed, 236 insertions(+), 138 deletions(-) create mode 100644 utils/LogBox.js diff --git a/css/popupboxes.css b/css/popupboxes.css index 5e4ed17fb..0d0c019ba 100644 --- a/css/popupboxes.css +++ b/css/popupboxes.css @@ -10,10 +10,11 @@ overflow: auto; /* Enable scroll if needed */ /*background-color: black; /* Fallback color */ /*background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ - background-color: var(--my-background-color); + background-color: rbga(var(--my-background-color), 0.4); } -.dialog-box-container { +.dialog-box-container, +#log-box-container { display: block; position: absolute; z-index: 2; @@ -28,14 +29,15 @@ border: 5px solid var(--my-highlight-color); } -.dialog-box-content { +.dialog-box-content, +#log-box-content { z-index: 2; background-color: var(--my-background-color); padding: 10px; - border: 5px solid var(--my-highlight-color);; } -.dialog-box-close-button { +.dialog-box-close-button, +#log-box-close { color: #aaa; float: right; font-size: 20px; @@ -49,7 +51,9 @@ } .dialog-box-close-button:hover, -.dialog-box-close-button:focus { +.dialog-box-close-button:focus, +#log-box-close:hover, +#log-box-close:focus { color: white; text-decoration: none; cursor: pointer; @@ -61,7 +65,7 @@ } #purchase-server-box-content { - background-color: background-color: var(--my-background-color); + background-color: var(--my-background-color); margin: 15% auto; /* 15% from the top and centered */ padding: 12px; border: 5px solid var(--my-highlight-color);; diff --git a/index.html b/index.html index 3f1f94613..0af867fcf 100644 --- a/index.html +++ b/index.html @@ -25,6 +25,7 @@ + @@ -645,6 +646,14 @@ Heist + +
+
+ × +

+
+
+