Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Eye-Tracking Classroom
/
StarGazer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
704ad356
authored
Oct 10, 2019
by
Alexander Bazo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add option for manual setting of game server
parent
80773dd4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
index.html
+4
-0
resources/js/config/GameConfiguration.js
+1
-1
resources/js/index.js
+3
-1
No files found.
index.html
View file @
704ad356
...
...
@@ -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>
...
...
resources/js/config/GameConfiguration.js
View file @
704ad356
...
...
@@ -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
;
...
...
resources/js/index.js
View file @
704ad356
...
...
@@ -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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment