aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-29 19:56:46 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-12-29 19:56:46 +0800
commit66b356e8fdb1866293729d6404001facc2820832 (patch)
tree54f8c6acbbc0fdcbccbc1612cd09b3c9ff4ec420 /features
parenta1b64e42345a2c5b2ba738bd15e8a87be42bfadc (diff)
downloadSoopyV2-66b356e8fdb1866293729d6404001facc2820832.tar.gz
SoopyV2-66b356e8fdb1866293729d6404001facc2820832.tar.bz2
SoopyV2-66b356e8fdb1866293729d6404001facc2820832.zip
add networth leaderboard sometime message
Diffstat (limited to 'features')
-rw-r--r--features/networthGUI/index.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/features/networthGUI/index.js b/features/networthGUI/index.js
index c027393..62433d2 100644
--- a/features/networthGUI/index.js
+++ b/features/networthGUI/index.js
@@ -115,7 +115,7 @@ class NetworthPage extends GuiPage {
box.addChild(new SoopyMarkdownElement().setLocation(0,0,1,1).setText(data.items.filter(i=>i.name).splice(0,5).map(a=>{
let name = (a.name.startsWith("§f") || a.name.startsWith("[Lvl "))?a.name.replace("§f","§7"):a.name
- return "§0" + name + ": §2$" + numberWithCommas(Math.round(a.p)).replace(/,/g, "§7,§2")
+ return "§0" + name + "§0: §2$" + numberWithCommas(Math.round(a.p)).replace(/,/g, "§7,§2")
}).join("\n")))
let boxName = new SoopyTextElement().setLocation(i%2===0?0:0.525, 0.4+Math.floor(i/2)*0.35, 0.475, 0.05).setText("§0" + renderName + "§0: §2$" + numberWithCommas(Math.round(data.total)).replace(/,/g, "§7,§2"))
@@ -123,6 +123,9 @@ class NetworthPage extends GuiPage {
this.statArea.addChild(box)
this.statArea.addChild(boxName)
})
+
+ this.statArea._scrollAmount = 0
+ this.statArea.location.scroll.y.set(0,100)
}
onOpen(){
@@ -130,6 +133,13 @@ class NetworthPage extends GuiPage {
this.playerLoad = Player.getName()
this.updateData(Player.getName())
}).start()
+
+ let sidebar = new SoopyGuiElement().setLocation(0.1,0.1,0.8,0.8).setScrollable(true)
+ this.openSidebarPage(sidebar)
+ let markdown = new SoopyMarkdownElement().setText("There will be a networth leaderboard here once enough players networths have been loaded and added to the leaderboard")
+ sidebar.addChild(markdown)
+
+ sidebar.setScrollable(true)
}
}