diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-01-14 15:09:02 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-01-14 15:09:02 +0800 |
commit | 4fd8b9502464c8c588221d175eb1d3bbf770dce2 (patch) | |
tree | 4da7c04188d5e1cf8596c55244fbd8fcca63878e /features/settings/settingThings/location.js | |
parent | 40e2170876141da9b3739ed60fb5b90ff067e1c6 (diff) | |
download | SoopyV2-4fd8b9502464c8c588221d175eb1d3bbf770dce2.tar.gz SoopyV2-4fd8b9502464c8c588221d175eb1d3bbf770dce2.tar.bz2 SoopyV2-4fd8b9502464c8c588221d175eb1d3bbf770dce2.zip |
add exp/hour, runs/hour and average time per run (including downtime inbetween)
Diffstat (limited to 'features/settings/settingThings/location.js')
-rw-r--r-- | features/settings/settingThings/location.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/features/settings/settingThings/location.js b/features/settings/settingThings/location.js index 69d1a43..9655764 100644 --- a/features/settings/settingThings/location.js +++ b/features/settings/settingThings/location.js @@ -166,7 +166,7 @@ class LocationSetting extends ButtonSetting { clicked(mouseX, mouseY){ let width = this.getWidth() - let height = 9*this.parent.getText()[0].length + let height = this.parent.getHeight() let locations = [[this.x, this.y], [this.x+width*this.scale, this.y], [this.x, this.y+height*this.scale], [this.x+width*this.scale, this.y+height*this.scale]] @@ -195,12 +195,12 @@ class LocationSetting extends ButtonSetting { } getWidth(){ - return Math.max(...(this.parent.getText()[0].map(a=>Renderer.getStringWidth(ChatLib.removeFormatting(a))))) + return this.parent.getWidth() } updateLocation(mouseX, mouseY, drawCollidingBox){ let width = this.getWidth() - let height = 9*this.parent.getText()[0].length + let height = this.parent.getHeight() if(this.dragging){ this.x = mouseX+this.dragOffset[0] @@ -283,7 +283,7 @@ class LocationSetting extends ButtonSetting { } let width = this.getWidth() - let height = 9*this.parent.getText()[0].length + let height = this.parent.getHeight() this.updateLocation(mouseX, mouseY, true) @@ -313,7 +313,7 @@ class LocationSetting extends ButtonSetting { renderBox(drawHandles){ let width = this.getWidth() - let height = 9*this.parent.getText()[0].length + let height = this.parent.getHeight() Renderer.drawRect(Renderer.color(255, 255, 255), this.x, this.y, width*this.scale, 1) Renderer.drawRect(Renderer.color(255, 255, 255), this.x, this.y, 1, height*this.scale) |