diff --git a/geari_white.png b/assets/geari_white.png
similarity index 100%
rename from geari_white.png
rename to assets/geari_white.png
diff --git a/assets/players_icon.png b/assets/players_icon.png
new file mode 100644
index 0000000..40a813a
Binary files /dev/null and b/assets/players_icon.png differ
diff --git a/fx_core.js b/fx_core.js
index 17d18c5..59755ad 100644
--- a/fx_core.js
+++ b/fx_core.js
@@ -1,5 +1,5 @@
-const fx_version = '0.6.1.7'; // FX Client Version
-const fx_update = 'Mar 1'; // FX Client Last Updated
+const fx_version = '0.6.1.8'; // FX Client Version
+const fx_update = 'Mar 5'; // FX Client Last Updated
if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) {
var wins_counter = 0;
@@ -210,12 +210,40 @@ WindowManager.add({
document.getElementById("donationhistory_note").style.display = ((true || settings.showBotDonations || /*getVarByName("dt")*/ isSingleplayer) ? "none" : "block");
}
});
+WindowManager.add({
+ name: "playerList",
+ element: document.getElementById("playerlist"),
+ beforeOpen: function() {}
+});
document.getElementById("canvasA").addEventListener("mousedown", WindowManager.closeAll);
document.getElementById("canvasA").addEventListener("touchstart", WindowManager.closeAll);
document.addEventListener("keydown", event => { if (event.key === "Escape") WindowManager.closeAll(); });
var settingsGearIcon = document.createElement('img');
-settingsGearIcon.setAttribute('src', 'geari_white.png');
+settingsGearIcon.setAttribute('src', 'assets/geari_white.png');
+const playerList = new (function () {
+ const playersIcon = document.createElement('img');
+ playersIcon.setAttribute('src', 'assets/players_icon.png');
+ this.display = function displayPlayerList(playerNames) {
+ let listContent = "";
+ for (let i = 0; i < playerNames.length; i++) {
+ listContent += `${i}. ${playerNames[i]}
`
+ }
+ document.getElementById("playerlist_text").innerHTML = listContent;
+ WindowManager.openWindow("playerList");
+ }
+ this.hoveringOverButton = false;
+ this.drawButton = (canvas, x, y, size) => {
+ canvas.fillRect(x, y, size, size);
+ canvas.fillStyle = this.hoveringOverButton ? "#aaaaaaaa" : "#000000aa";
+ canvas.clearRect(x + 1, y + 1, size - 2, size - 2);
+ canvas.fillRect(x + 1, y + 1, size - 2, size - 2);
+ canvas.fillStyle = "#ffffff";
+ canvas.imageSmoothingEnabled = true;
+ canvas.drawImage(playersIcon, x + 2, y + 2, size - 4, size - 4);
+ canvas.imageSmoothingEnabled = false;
+ }
+});
var donationsTracker = new (function(){
this.donationHistory = Array(512);
// fill the array with empty arrays with length of 3
@@ -257,6 +285,9 @@ var utils = new (function() {
if (settings.densityDisplayStyle === "percentage") return (((playerBalances[playerID] / ((playerTerritories[playerID] === 0 ? 1 : playerTerritories[playerID]) * 150)) * 100).toFixed(1) + "%");
else return (playerBalances[playerID] / (playerTerritories[playerID] === 0 ? 1 : playerTerritories[playerID])).toFixed(1);
};
+ this.isPointInRectangle = function(x, y, rectangleStartX, rectangleStartY, width, height) {
+ return x >= rectangleStartX && x <= rectangleStartX + width && y >= rectangleStartY && y <= rectangleStartY + height;
+ }
});
const keybindFunctions = { setAbsolute: () => {}, setRelative: () => {} };
diff --git a/game.js b/game.js
index 921e815..ad25413 100644
--- a/game.js
+++ b/game.js
@@ -3153,7 +3153,8 @@ function bb() {
function a0j() {
a0L.clearRect(0, 0, a0F, y5), a0L.fillStyle = ae.lV, a0L.fillRect(0, 0, a0F, a0Q), a0L.fillStyle = ae.ku, a0L.fillRect(0, a0Q, a0F, y5 - a0Q), a0E[eu] >= position && a0m(a0E[eu] - position, ae.lG), 0 !== a0E[eu] && 0 === position && a0m(0, ae
.lZ), -1 !== a0c && a0m(a0c, ae.ky), a0L.fillStyle = ae.gK, a0L.fillRect(0, a0Q, a0F, 1), a0L.fillRect(0, 0, a0F, xF), a0L.fillRect(0, 0, xF, y5), a0L.fillRect(a0F - xF, 0, xF, y5), a0L.fillRect(0, y5 - xF, a0F, xF), a0L.font = a0G,
- a0L.textBaseline = gI, a0L.textAlign = gJ, a0L.fillText(title, Math.floor(a0F / 2), Math.floor(a0O + a0H / 2));
+ a0L.textBaseline = gI, a0L.textAlign = gJ, a0L.fillText(title, Math.floor((a0F + a0Q - 22) / 2), Math.floor(a0O + a0H / 2));
+ playerList.drawButton(a0L, 12, 12, a0Q - 22);
var hn, f7 = a0E[eu] < position + a0J - 1 ? 1 : 2;
for (a0L.font = a0I, a0L.textAlign = vo, hn = a0J - f7; 0 <= hn; hn--) a0n(jU[hn + position]), a0o(hn, hn + position, jU[hn + position]);
for (a0L.textAlign = xB, hn = a0J - f7; 0 <= hn; hn--) a0n(jU[hn + position]), a0p(hn, jU[hn + position]);
@@ -3232,8 +3233,14 @@ function bb() {
for (var dw = a0J - 1; 0 <= dw; dw--) a0Z[dw] = jU[dw], a0a[dw] = fP[jU[dw]];
a0Z[a0J] = a0E[eu], a0a[a0J] = fP[eu]
}, this.g9 = function(jn, jo) {
- return !!uu(jn, jo) && (a0d = b7.dX, a0e = !0, a0f = a0g = a13(jo), al.sk() && (jn = yn(-1, a0g, a0J), a0c !== (jn = jn === a0J ? -1 : jn)) && (a0c = jn, a0j(), b7.d6 = !0), !0)
+ return !!uu(jn, jo) && (utils.isPointInRectangle(jn, jo, nf + 12, nf + 12, a0Q - 22, a0Q - 22) && playerList.display(k5), true) && (a0d = b7.dX, a0e = !0, a0f = a0g = a13(jo), al.sk() && (jn = yn(-1, a0g, a0J), a0c !== (jn = jn === a0J ?
+ -1 : jn)) && (a0c = jn, a0j(), b7.d6 = !0), !0)
}, this.s1 = function(jn, jo) {
+ if (utils.isPointInRectangle(jn, jo, nf + 12, nf + 12, a0Q - 22, a0Q - 22)) {
+ playerList.hoveringOverButton === false && (playerList.hoveringOverButton = true, a0j(), b7.d6 = !0);
+ } else {
+ playerList.hoveringOverButton === true && (playerList.hoveringOverButton = false, a0j(), b7.d6 = !0);
+ }
var dY, a12 = a13(jo);
return a0e ? (dY = position, (position = yn(0, position += a0f - a12, f3 - a0J)) !== dY && (a12 = (a12 = yn(-1, a0f = a12, a0J)) !== a0J && uu(jn, jo) ? a12 : -1, a0c = a12, a0j(), b7.d6 = !0), !0) : (a12 = (a12 = yn(-1, a12, a0J)) ===
a0J || !uu(jn, jo) || al.sk() ? -1 : a12, a0c !== a12 && (a0c = a12, a0j(), b7.d6 = !0))
diff --git a/index.html b/index.html
index 4648a08..d516029 100644
--- a/index.html
+++ b/index.html
@@ -34,7 +34,7 @@
-
+