Skip to content

Commit

Permalink
Remove small canvas size option
Browse files Browse the repository at this point in the history
  • Loading branch information
Coteh committed Jan 26, 2024
1 parent 61c0053 commit bd05335
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 37 deletions.
18 changes: 0 additions & 18 deletions client/gui/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ var settingsBtn = null;
var highlightBtn = null;
var holdToFlagBtn = null;
var revealBoardOnLossBtn = null;
var canvasSizeBtn = null;
var fullScreenBtn = null;
var backBtn = null;

Expand Down Expand Up @@ -286,23 +285,6 @@ var initRenderElements = function () {
revealBoardOnLossBtn.setCheck(gameOptions.revealBoardOnLoss);
settingsMenu.addMenuOption(revealBoardOnLossBtn.menuOption);

canvasSizeBtn = new CheckBox('Small canvas size', FontPrefs.buttonFont);
canvasSizeBtn.setCheckTextures(uncheckedTex, checkedTex);
canvasSizeBtn.setCheckBoxAction(function (expression) {
if (expression) {
domContainer.classList.add('small');
} else {
domContainer.classList.remove('small');
}
gameOptions.smallCanvasSize = expression;
saveGameOptions(gameOptions);
});
if (gameOptions.smallCanvasSize) {
domContainer.classList.add('small');
}
canvasSizeBtn.setCheck(gameOptions.smallCanvasSize);
settingsMenu.addMenuOption(canvasSizeBtn.menuOption);

// Player will need to enable this setting manually due to browser restrictions
fullScreenBtn = new CheckBox('Full Screen', FontPrefs.buttonFont);
fullScreenBtn.setCheckTextures(uncheckedTex, checkedTex);
Expand Down
1 change: 0 additions & 1 deletion client/storage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ let gameOptions = {
highlightEffect: false,
holdToFlag: true,
revealBoardOnLoss: false,
smallCanvasSize: false,
};

module.exports.loadGameOptions = () => {
Expand Down
18 changes: 0 additions & 18 deletions index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,6 @@
<title>MinesweeperClone</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="style.css" />
<style>
body {
margin: 0;
}
.container.small {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.container.small > canvas {
width: 70%;
border: 4px solid #000;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}
</style>
</head>
<body>
<div id="content" class="container"></div>
Expand Down

0 comments on commit bd05335

Please sign in to comment.