aboutsummaryrefslogtreecommitdiff
path: root/render/collectionGui.js
diff options
context:
space:
mode:
authorNinjune x <enderknight537@gmail.com>2022-11-17 16:56:06 -0600
committerNinjune x <enderknight537@gmail.com>2022-11-17 16:56:06 -0600
commitfb63481d2c5b7b468df6c5ebdee30178bc9155f5 (patch)
tree3ec467f8acb9594c7b5547426a3b640856dc7e37 /render/collectionGui.js
parent9085ac77ce364572b14f132b64ead5cde2194607 (diff)
downloadcoleweight-fb63481d2c5b7b468df6c5ebdee30178bc9155f5.tar.gz
coleweight-fb63481d2c5b7b468df6c5ebdee30178bc9155f5.tar.bz2
coleweight-fb63481d2c5b7b468df6c5ebdee30178bc9155f5.zip
1.6.0 Changelog in releasesv1.6.1
Diffstat (limited to 'render/collectionGui.js')
-rw-r--r--render/collectionGui.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/render/collectionGui.js b/render/collectionGui.js
new file mode 100644
index 0000000..8197b11
--- /dev/null
+++ b/render/collectionGui.js
@@ -0,0 +1,43 @@
+/*import constants from "../util/constants"
+const PREFIX = constants.PREFIX
+
+let collectionGui = new Gui(),
+ collection = ""
+
+export function trackCollection(arg)
+{
+ switch(arg)
+ {
+ case "obby":
+ case "obsidian":
+ collection = "OBSIDIAN"
+ break
+ default:
+ ChatLib.chat(`${PREFIX}&eThat is not a valid collection! (or is not supported)`)
+ }
+}
+
+export function moveCollection()
+{
+ collectionGui.open()
+}
+
+register("dragged", (dx, dy, x, y) => {
+ if (!collectionGui.isOpen()) return
+ constants.data.collectionX = x
+ constants.data.collectionY = y
+ constants.data.save()
+})
+
+register("renderOverlay", () => {
+ if (cwGui.isOpen())
+ {
+ let txt = "Please set your api key with /cw setkey (key)!"
+ if (constants.data.api_key != undefined)
+ txt = "Click anywhere to move!"
+ Renderer.drawStringWithShadow(txt, Renderer.screen.getWidth()/2 - Renderer.getStringWidth(txt)/2, Renderer.screen.getHeight()/2)
+ Renderer.drawStringWithShadow(`&aCollection: &b0\n&aCW/hr: &b0\n&aUptime: &b0m\n&aColeweight Gained: &b0`, constants.data.collectionX, constants.data.collectionY)
+ }
+ if(collection == "") return
+ coleweight > 1000 ?collectionMessage = `&b${coleweight.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`: coleweightMessage = `&b${coleweight.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`
+})*/ \ No newline at end of file