From 1014c1df67d75b3e775c140a6a17c64d02db3109 Mon Sep 17 00:00:00 2001 From: peshomir <80340328+peshomir@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:06:02 +0300 Subject: [PATCH] Update v0.6.4.4; Fixed the leaderboard filter and donation history not being reset properly, fixed the leaderboard tab buttons being unclickable on mobile unless you moved over them --- build.js | 2 +- src/fx_core.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.js b/build.js index 2d6b0a0..f50319f 100644 --- a/build.js +++ b/build.js @@ -203,7 +203,7 @@ replaceOne(/,(0!==\w+\.\w+\[(\w+)\])(\)&&\w+\.\w+\(\2,800,!1,0\),)/g, `, ${dict.game}.${dict.gIsTeamGame} && donationsTracker.displayHistory($2, ${rawPlayerNames}, ${gIsSingleplayer}), $1 && !isEmptySpace $3`); // Reset donation history and leaderboard filter when a new game is started -replaceOne(new RegExp(`,this\\.${dictionary.playerBalances}=new Uint32Array\\(\\w+\\.\\w+\\),`, "g"), "$& donationsTracker.reset(), leaderboardFilter.reset(), "); +replaceOne(new RegExp(`,this\\.${dictionary.playerBalances}.fill\\(0\\),`, "g"), "$& donationsTracker.reset(), leaderboardFilter.reset(), "); { // Player list and leaderboard filter tabs // Draw player list button diff --git a/src/fx_core.js b/src/fx_core.js index d4215e8..9f75a11 100644 --- a/src/fx_core.js +++ b/src/fx_core.js @@ -1,5 +1,5 @@ -const fx_version = '0.6.4.3'; // FX Client Version -const fx_update = 'Jun 1'; // FX Client Last Updated +const fx_version = '0.6.4.4'; // FX Client Version +const fx_update = 'Jun 3'; // FX Client Last Updated if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) { var wins_counter = 0; @@ -405,9 +405,9 @@ const leaderboardFilter = new (function() { return isHovering; } this.handleMouseDown = (xRelative) => { - //console.log("click; x: ", xRelative); - if (this.tabHovering !== this.selectedTab) { - this.selectedTab = this.tabHovering; + const tab = Math.floor(xRelative / (this.windowWidth / this.tabLabels.length)); + if (this.selectedTab !== tab) { + this.selectedTab = tab; if (this.selectedTab === 0) this.clearFilter(); else if (this.selectedTab === 1) this.filterByOwnClan(); this.repaintLeaderboard();