From 704ad356d8bc31bae1a1e91c6fa9bcf5af7748de Mon Sep 17 00:00:00 2001 From: Alexander Bazo Date: Thu, 10 Oct 2019 12:33:32 +0200 Subject: [PATCH] Add option for manual setting of game server --- index.html | 4 ++++ resources/js/config/GameConfiguration.js | 2 +- resources/js/index.js | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index e9114d6..76806d5 100644 --- a/index.html +++ b/index.html @@ -24,6 +24,10 @@ + + + +
Start Game
diff --git a/resources/js/config/GameConfiguration.js b/resources/js/config/GameConfiguration.js index 51fd910..141a405 100644 --- a/resources/js/config/GameConfiguration.js +++ b/resources/js/config/GameConfiguration.js @@ -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; diff --git a/resources/js/index.js b/resources/js/index.js index eaf0f4e..5c88324 100644 --- a/resources/js/index.js +++ b/resources/js/index.js @@ -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() { -- libgit2 0.26.0