Added player colour choosing. I HOPE.

Signed-off-by: Sarahtonin <[email protected]>
This commit is contained in:
sarah committed 2026-08-30 21:58:38 +02:00
1 parent 2c1f3851e8
commit 2fe5171450
5 files changed
+290 -13

No files matched your search

+35 -1
View File
@@ -40,6 +40,33 @@ async function SetUsername(
return await Response.json();
}
async function SetColour(
Colour
) {
const Response =
await fetch(
ApiUrl +
"/SetColour.php",
{
method: "POST",
headers: {
"Content-Type":
"application/json"
},
body: JSON.stringify({
SaveKey:
GetSaveKey(),
Colour:
Colour
})
}
);
return await Response.json();
}
async function RenderUser() {
const Profile =
@@ -62,7 +89,14 @@ async function RenderUser() {
UsernameDisplay.textContent =
Profile.Username;
UsernameForm.hidden = true;
if (
Profile.Colour !== null
) {
UsernameDisplay.style.color =
Profile.Colour;
}
UsernameForm.hidden = true;
return;
}