aboutsummaryrefslogtreecommitdiff
path: root/gui/collectionGui.js
diff options
context:
space:
mode:
authorNinjune <enderknight537@gmail.com>2022-11-08 13:30:41 -0600
committerNinjune <enderknight537@gmail.com>2022-11-08 13:30:41 -0600
commite72c42345ef32fe9f3eeaf92844c0b77f175fac6 (patch)
treea67ca92dfd4bbd5df1fcdf1beccad9bc0ba36da8 /gui/collectionGui.js
parentf2d535d6979cf6cb04a7245925a5bcf71bee2c67 (diff)
downloadcoleweight-1.5.5.tar.gz
coleweight-1.5.5.tar.bz2
coleweight-1.5.5.zip
1.5.4 Fixed bugs (changelog in discord)v1.5.5
Diffstat (limited to 'gui/collectionGui.js')
-rw-r--r--gui/collectionGui.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/gui/collectionGui.js b/gui/collectionGui.js
new file mode 100644
index 0000000..8197b11
--- /dev/null
+++ b/gui/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