Merge pull request #144 from ThomasRubini/ergonomicChanges
Ergonomic changes
This commit is contained in:
commit
0b9f653d76
@ -8,9 +8,9 @@ input, .action_button, .game_mode_item_title {
|
|||||||
font-family: "Titan One", sans-serif;
|
font-family: "Titan One", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.back_button, .theme_switcher_btn {
|
#back_button, .theme_switcher_btn {
|
||||||
height: var(--header-actions-side);
|
height: 2em;
|
||||||
width: var(--header-actions-side);
|
width: 5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game_begin, .game_mode_item, .game_mode_item_input_text_single_line, .game_mode_items, .game_mode_selection {
|
.game_begin, .game_mode_item, .game_mode_item_input_text_single_line, .game_mode_items, .game_mode_selection {
|
||||||
|
@ -281,8 +281,9 @@ function renderAnswerSelectionPanel() {
|
|||||||
|
|
||||||
button.appendChild(document.createTextNode("Couplable"));
|
button.appendChild(document.createTextNode("Couplable"));
|
||||||
|
|
||||||
button.addEventListener("click", () => {
|
button.addEventListener("click", (event) => {
|
||||||
disableCulpritButtons(culpritChoices, suspect);
|
disableCulpritButtons(culpritChoices, suspect);
|
||||||
|
event.target.textContent = "attente des autres joueurs...";
|
||||||
sendAnswers();
|
sendAnswers();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -81,7 +81,8 @@ function displayInvalidNickNameErrorMessage(errorMessage) {
|
|||||||
/**
|
/**
|
||||||
* Start a game in the history mode.
|
* Start a game in the history mode.
|
||||||
*/
|
*/
|
||||||
function startHistoryGame() {
|
function startHistoryGame(event) {
|
||||||
|
event.target.textContent = "Chargement...";
|
||||||
makeAPIRequest("startGame");
|
makeAPIRequest("startGame");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,26 +112,26 @@ function areInputsValid(checkRoomCode) {
|
|||||||
/**
|
/**
|
||||||
* Handler for the multiplayer room creation button
|
* Handler for the multiplayer room creation button
|
||||||
*/
|
*/
|
||||||
function createMultiPlayerRoom() {
|
function createMultiPlayerRoom(event) {
|
||||||
if (!areInputsValid(false)) {
|
if (!areInputsValid(false)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hideInvalidInputErrorMessage();
|
hideInvalidInputErrorMessage();
|
||||||
|
event.target.textContent = "Chargement...";
|
||||||
startGame();
|
startGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for the join room button
|
* Handler for the join room button
|
||||||
*/
|
*/
|
||||||
function joinMultiPlayerRoom() {
|
function joinMultiPlayerRoom(event) {
|
||||||
if (!areInputsValid(true)) {
|
if (!areInputsValid(true)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hideInvalidInputErrorMessage();
|
hideInvalidInputErrorMessage();
|
||||||
|
event.target.textContent = "Chargement...";
|
||||||
joinGame();
|
joinGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,14 +208,13 @@ function changeTheme() {
|
|||||||
* This function launches a single player game. It sends the api request to
|
* This function launches a single player game. It sends the api request to
|
||||||
* create a game then it immediately start the game by sendind the startGame api
|
* create a game then it immediately start the game by sendind the startGame api
|
||||||
*/
|
*/
|
||||||
async function startSoloGame(){
|
async function startSoloGame(event){
|
||||||
|
|
||||||
if (!areInputsValid(false)) {
|
if (!areInputsValid(false)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
event.target.textContent = "Chargement...";
|
||||||
hideInvalidInputErrorMessage();
|
hideInvalidInputErrorMessage();
|
||||||
|
|
||||||
username = document.getElementById("game_username").value;
|
username = document.getElementById("game_username").value;
|
||||||
let data = {}
|
let data = {}
|
||||||
data["username"] = username;
|
data["username"] = username;
|
||||||
|
Loading…
Reference in New Issue
Block a user