-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added game mode indiccator
- Loading branch information
Gbo
committed
Sep 13, 2019
1 parent
ea1e564
commit fae6b19
Showing
5 changed files
with
223 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ | |
|
||
class ApiTeam { | ||
public: | ||
int TeamNum; | ||
int TeamIndex; | ||
bool Dirty = true; | ||
std::string Name; | ||
int Goals; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,216 @@ | ||
<HTML> | ||
<HEAD> | ||
<TITLE>Notifier</TITLE> | ||
<script type="text/javascript"> | ||
webSocket = new WebSocket("ws://localhost:8323"); | ||
webSocket.onmessage = function (event) { | ||
rocket_event = JSON.parse(event.data); | ||
switch (rocket_event.event) { | ||
case "game_changed": | ||
if (rocket_event.game.PlaylistId == 5) { | ||
document.getElementById('notif_box').classList.add("slide-out-blurred-left"); | ||
} else { | ||
document.getElementById('notif_box').classList.remove("slide-out-blurred-left"); | ||
document.getElementById("notif_text").innerHTML = "Playing " + rocket_event.game.PlaylistName; | ||
} | ||
break; | ||
default: | ||
|
||
} | ||
} | ||
</script> | ||
<style> | ||
.bounce-in-top { | ||
-webkit-animation: bounce-in-top 1.1s both;r | ||
animation: bounce-in-top 1.1s both; | ||
} | ||
.slide-out-blurred-left { | ||
-webkit-animation: slide-out-blurred-left 0.45s cubic-bezier(0.755, 0.050, 0.855, 0.060) both; | ||
animation: slide-out-blurred-left 0.45s cubic-bezier(0.755, 0.050, 0.855, 0.060) both; | ||
} | ||
@-webkit-keyframes slide-out-blurred-left { | ||
0% { | ||
-webkit-transform: translateX(0) scaleY(1) scaleX(1); | ||
transform: translateX(0) scaleY(1) scaleX(1); | ||
-webkit-transform-origin: 50% 50%; | ||
transform-origin: 50% 50%; | ||
-webkit-filter: blur(0); | ||
filter: blur(0); | ||
opacity: 1; | ||
} | ||
|
||
100% { | ||
-webkit-transform: translateX(-1000px) scaleX(2) scaleY(0.2); | ||
transform: translateX(-1000px) scaleX(2) scaleY(0.2); | ||
-webkit-transform-origin: 100% 50%; | ||
transform-origin: 100% 50%; | ||
-webkit-filter: blur(40px); | ||
filter: blur(40px); | ||
opacity: 0; | ||
} | ||
} | ||
|
||
@keyframes slide-out-blurred-left { | ||
0% { | ||
-webkit-transform: translateX(0) scaleY(1) scaleX(1); | ||
transform: translateX(0) scaleY(1) scaleX(1); | ||
-webkit-transform-origin: 50% 50%; | ||
transform-origin: 50% 50%; | ||
-webkit-filter: blur(0); | ||
filter: blur(0); | ||
opacity: 1; | ||
} | ||
|
||
100% { | ||
-webkit-transform: translateX(-1000px) scaleX(2) scaleY(0.2); | ||
transform: translateX(-1000px) scaleX(2) scaleY(0.2); | ||
-webkit-transform-origin: 100% 50%; | ||
transform-origin: 100% 50%; | ||
-webkit-filter: blur(40px); | ||
filter: blur(40px); | ||
opacity: 0; | ||
} | ||
} | ||
|
||
@-webkit-keyframes bounce-in-top { | ||
0% { | ||
-webkit-transform: translateY(-500px); | ||
transform: translateY(-500px); | ||
-webkit-animation-timing-function: ease-in; | ||
animation-timing-function: ease-in; | ||
opacity: 0; | ||
} | ||
|
||
38% { | ||
-webkit-transform: translateY(0); | ||
transform: translateY(0); | ||
-webkit-animation-timing-function: ease-out; | ||
animation-timing-function: ease-out; | ||
opacity: 1; | ||
} | ||
|
||
55% { | ||
-webkit-transform: translateY(-65px); | ||
transform: translateY(-65px); | ||
-webkit-animation-timing-function: ease-in; | ||
animation-timing-function: ease-in; | ||
} | ||
|
||
72% { | ||
-webkit-transform: translateY(0); | ||
transform: translateY(0); | ||
-webkit-animation-timing-function: ease-out; | ||
animation-timing-function: ease-out; | ||
} | ||
|
||
81% { | ||
-webkit-transform: translateY(-28px); | ||
transform: translateY(-28px); | ||
-webkit-animation-timing-function: ease-in; | ||
animation-timing-function: ease-in; | ||
} | ||
|
||
90% { | ||
-webkit-transform: translateY(0); | ||
transform: translateY(0); | ||
-webkit-animation-timing-function: ease-out; | ||
animation-timing-function: ease-out; | ||
} | ||
|
||
95% { | ||
-webkit-transform: translateY(-8px); | ||
transform: translateY(-8px); | ||
-webkit-animation-timing-function: ease-in; | ||
animation-timing-function: ease-in; | ||
} | ||
|
||
100% { | ||
-webkit-transform: translateY(0); | ||
transform: translateY(0); | ||
-webkit-animation-timing-function: ease-out; | ||
animation-timing-function: ease-out; | ||
} | ||
} | ||
|
||
@keyframes bounce-in-top { | ||
0% { | ||
-webkit-transform: translateY(-500px); | ||
transform: translateY(-500px); | ||
-webkit-animation-timing-function: ease-in; | ||
animation-timing-function: ease-in; | ||
opacity: 0; | ||
} | ||
|
||
38% { | ||
-webkit-transform: translateY(0); | ||
transform: translateY(0); | ||
-webkit-animation-timing-function: ease-out; | ||
animation-timing-function: ease-out; | ||
opacity: 1; | ||
} | ||
|
||
55% { | ||
-webkit-transform: translateY(-65px); | ||
transform: translateY(-65px); | ||
-webkit-animation-timing-function: ease-in; | ||
animation-timing-function: ease-in; | ||
} | ||
|
||
72% { | ||
-webkit-transform: translateY(0); | ||
transform: translateY(0); | ||
-webkit-animation-timing-function: ease-out; | ||
animation-timing-function: ease-out; | ||
} | ||
|
||
81% { | ||
-webkit-transform: translateY(-28px); | ||
transform: translateY(-28px); | ||
-webkit-animation-timing-function: ease-in; | ||
animation-timing-function: ease-in; | ||
} | ||
|
||
90% { | ||
-webkit-transform: translateY(0); | ||
transform: translateY(0); | ||
-webkit-animation-timing-function: ease-out; | ||
animation-timing-function: ease-out; | ||
} | ||
|
||
95% { | ||
-webkit-transform: translateY(-8px); | ||
transform: translateY(-8px); | ||
-webkit-animation-timing-function: ease-in; | ||
animation-timing-function: ease-in; | ||
} | ||
|
||
100% { | ||
-webkit-transform: translateY(0); | ||
transform: translateY(0); | ||
-webkit-animation-timing-function: ease-out; | ||
animation-timing-function: ease-out; | ||
} | ||
} | ||
|
||
</style> | ||
<style> | ||
|
||
.blackbox { | ||
font-size: 2em; | ||
font-family: sans-serif;; | ||
color: #e28400; | ||
width: 600px; | ||
background-color: rgba(40,40,40, 0.7); | ||
box-shadow: 1px 2px 4px rgba(0, 0, 0, .5); | ||
} | ||
.blackbox p { | ||
padding: 5px; | ||
} | ||
</style> | ||
</HEAD> | ||
<BODY> | ||
<div id="notif_box" class="bounce-in-top slide-out-blurred-left blackbox"> | ||
<p id="notif_text">Widget loaded</p> | ||
</div> | ||
</BODY> | ||
</HTML> |