Commit 704ad356 by Alexander Bazo

Add option for manual setting of game server

parent 80773dd4
......@@ -24,6 +24,10 @@
<input type="checkbox" id="logToConsole" name="logToConsole" checked>
<label for="logToConsole">Show logs in console</label>
</span>
<span class="option">
<label for="gameServerUrl">Server</label>
<input type="url" id="gameServerUrl" name="gameServerUrl" value="ws://132.199.139.204:2567">
</span>
</div>
<div id="startButton">Start Game</div>
<div id="versionInfo"></div>
......
......@@ -28,7 +28,7 @@ class GameConfiguration {
reset() {
version = "$VERSION";
gazeServerURL = "ws://localhost:8001/gaze";
gameServerURL = "ws://localhost:2567",
gameServerURL = "ws://132.199.139.204:2567",
fps = 60;
fpsBufferLength = 60;
screenWidth = screen.width;
......
......@@ -20,10 +20,12 @@ function init() {
function loadOptions() {
let useMouse = document.querySelector("#useMouseInput").checked,
showDebug = document.querySelector("#showDebugInfo").checked,
logToConsole = document.querySelector("#logToConsole").checked;
logToConsole = document.querySelector("#logToConsole").checked,
gameServerUrl = document.querySelector("#gameServerUrl").value;
GameConfig.setUseMouseInput(useMouse);
GameConfig.setShowDebugInfoOnScreen(showDebug);
GameConfig.setShowVerboseDebugInfoInConsole(logToConsole);
GameConfig.setGameServerURL(gameServerUrl);
}
function prepareGame() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment