mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
Add a progress message with the indeterminate loading bar
This commit is contained in:
parent
ce8c8c9983
commit
b236632ce0
@ -6,7 +6,7 @@
|
|||||||
#include "ppapi/cpp/mouse_lock.h"
|
#include "ppapi/cpp/mouse_lock.h"
|
||||||
|
|
||||||
void MoonlightInstance::ClStageStarting(int stage) {
|
void MoonlightInstance::ClStageStarting(int stage) {
|
||||||
pp::Var response(std::string("Starting ") + std::string(LiGetStageName(stage)) + std::string("..."));
|
pp::Var response(std::string("ProgressMsg: Starting ") + std::string(LiGetStageName(stage)) + std::string("..."));
|
||||||
g_Instance->PostMessage(response);
|
g_Instance->PostMessage(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,9 @@
|
|||||||
|
|
||||||
<div id="listener"></div> <!-- NaCl module placeholder. NaCl gets thrown into here -->
|
<div id="listener"></div> <!-- NaCl module placeholder. NaCl gets thrown into here -->
|
||||||
|
|
||||||
<div id="loadingSpinner" class="mdl-progress mdl-js-progress mdl-progress__indeterminate"></div>
|
<div id="loadingSpinner" class="mdl-progress mdl-js-progress mdl-progress__indeterminate">
|
||||||
|
<h5 id="loadingMessage"></h5>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
<script defer src="static/js/jquery-2.2.0.min.js"></script>
|
<script defer src="static/js/jquery-2.2.0.min.js"></script>
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
bottom: 50%;
|
bottom: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
main {
|
main {
|
||||||
padding: 50px 100px;
|
padding: 50px 100px;
|
||||||
|
@ -293,6 +293,7 @@ function startSelectedGame() {
|
|||||||
var rikey = '00000000000000000000000000000000';
|
var rikey = '00000000000000000000000000000000';
|
||||||
var rikeyid = 0;
|
var rikeyid = 0;
|
||||||
|
|
||||||
|
$('#loadingMessage').text('Starting ' + $("#selectGame option:selected").text() + '...');
|
||||||
playGameMode();
|
playGameMode();
|
||||||
|
|
||||||
if(api.currentGame == appID) // if user wants to launch the already-running app, then we resume it.
|
if(api.currentGame == appID) // if user wants to launch the already-running app, then we resume it.
|
||||||
|
@ -28,6 +28,8 @@ function handleMessage(msg) {
|
|||||||
});
|
});
|
||||||
} else if(msg.data === 'Connection Established') {
|
} else if(msg.data === 'Connection Established') {
|
||||||
$('#loadingSpinner').css('display', 'none');
|
$('#loadingSpinner').css('display', 'none');
|
||||||
|
} else if(msg.data.indexOf('ProgressMsg: ') === 0) {
|
||||||
|
$('#loadingMessage').text(msg.data.replace('ProgressMsg: ', ''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user