gh-pages
peshomir 2024-03-05 20:29:32 +00:00
parent 97e9f896e5
commit 0d91b9eedf
6 changed files with 53 additions and 11 deletions

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -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 += `<span class="color-light-gray">${i}.</span> ${playerNames[i]}<br>`
}
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: () => {} };

11
game.js
View File

@ -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))

View File

@ -34,7 +34,7 @@
<meta itemprop="image" content="https://mohsenemx.github.io/FXclient/assets/logo.png">
<!-- FX Client CSS -->
<link rel="stylesheet" href="main.css?1709279789558">
<link rel="stylesheet" href="main.css?1709670571847">
<!-- Game CSS -->
<style>
html,
@ -106,13 +106,17 @@
<button onclick="settingsManager.save()">Save Settings</button>
</footer>
</div>
<div class="window scrollable" id="donationhistory" style="display:none">
<div class="window scrollable selectable" id="playerlist" style="display: none;">
<h1>Player List</h1>
<p id="playerlist_text"></p>
</div>
<div class="window scrollable selectable" id="donationhistory" style="display:none">
<h1>Donation history for </h1>
<p id="donationhistory_note">Note: donations from bots are not shown here</p>
<p id="donationhistory_text"></p>
</div>
<script src="variables.js?1709279789558"></script>
<script src="fx_core.js?1709279789558"></script>
<script src="game.js?1709279789558"></script>
<script src="variables.js?1709670571847"></script>
<script src="fx_core.js?1709670571847"></script>
<script src="game.js?1709670571847"></script>
</body>
</html>

View File

@ -84,7 +84,7 @@ input#inputfilebtn {
transition: 0.2s
}
.window#donationhistory {
.selectable {
user-select: text;
}