made app selection view prettier

This commit is contained in:
Aidan Campbell 2016-02-16 21:57:48 -05:00
parent 76f7a07d0b
commit 69ee487757
2 changed files with 8 additions and 4 deletions

View File

@ -49,15 +49,15 @@
<button id="stopButton" class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent">Stop Testing Stuff</button>
</div>
<div id="gameSelection" style="display:none">
<div id="gameSelection" style="display:none" class="mdl-select">
<p>Select a game to run</p>
<select id="selectGame">
<option value="game_id_1">Game Name 1</option>
<option value="game_id_2">Game Name 2</option>
<option value="game_id_3">Game Name 3</option>
</select>
<button id="startGameButton">Run Game</button>
<button id="quitGameButton">Quit Current Game</button>
<button class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored" id="startGameButton">Run Game</button>
<button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent" id="quitGameButton">Quit Current Game</button>
</div>
<div id="listener">

View File

@ -43,10 +43,12 @@ function showAppsPushed() {
}
function showAppsMode() {
console.log("entering show apps mode.")
document.getElementById('streamSettings').style.display = 'none';
document.getElementById('hostSettings').style.display = 'none';
document.getElementById('gameSelection').style.display = 'inline-block';
document.body.style.backgroundColor = "black";
$("#main-content").children().not("#listener").display = "inline-block";
document.body.style.backgroundColor = "white";
// common.hideModule(); // do NOT hide the nacl module. you can't interact with it then
}
@ -101,7 +103,9 @@ function handleMessage(msg) {
var quitStreamString = "quitStream";
var logEl = document.getElementById('logField');
logEl.innerHTML = msg.data;
console.log("message received: " + msg.data);
if (msg.data.lastIndexOf(quitStreamString, 0) === 0) {
console.log("quit stream received. returning to 'show apps' screen.")
showAppsMode();
}
}