mirror of
https://github.com/holub/mame
synced 2025-06-05 04:16:28 +03:00
89 lines
2.8 KiB
HTML
89 lines
2.8 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<title>MAME</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta http-equiv="pragma" content="no-cache">
|
|
<meta http-equiv="expires" content="-1">
|
|
<link rel="shortcut icon" href="favicon.ico">
|
|
<link href="css/main.css" media="screen" rel="stylesheet" type="text/css" />
|
|
<link href="css/dropdown.css" media="screen" rel="stylesheet" type="text/css" />
|
|
<link href="css/default.ultimate.css" media="screen" rel="stylesheet" type="text/css" />
|
|
<script src="js/jquery.js"></script>
|
|
</head>
|
|
<body>
|
|
<script language="javascript" type="text/javascript">
|
|
|
|
var writeToScreen = function(message) {
|
|
document.getElementById('output').innerHTML = message;
|
|
};
|
|
window.onload = function() {
|
|
var url = 'ws://localhost:8080/foo';
|
|
websocket = new WebSocket(url);
|
|
websocket.onopen = function(ev) {
|
|
writeToScreen('<b style="color: green;">Connected</b>');
|
|
};
|
|
websocket.onclose = function(ev) {
|
|
writeToScreen('<b style="color: white;">disconnected</b>');
|
|
};
|
|
websocket.onmessage = function(ev) {
|
|
if (ev.data=='update_machine')
|
|
{
|
|
$.getJSON('json/game', function(data) {
|
|
var items = [];
|
|
if(data.name =='___empty') {
|
|
items.push('No driver running');
|
|
} else {
|
|
items.push('<h1>Currently running : ' + data.description + ' [' + data.manufacturer+']</h1>');
|
|
|
|
}
|
|
document.getElementById('current').innerHTML = items.join('');
|
|
});
|
|
}
|
|
|
|
};
|
|
websocket.onerror = function(ev) {
|
|
writeToScreen('<b style="color: red; ">Error</b>');
|
|
};
|
|
};
|
|
</script>
|
|
<div data-role="page">
|
|
<div data-role="header">
|
|
<img src="images/logo-mame-small.png"/><div id="output" style="display: inline;"><b style="color:white;">Connecting...</b></div>
|
|
</div>
|
|
|
|
<ul id="nav" class="dropdown dropdown-horizontal">
|
|
<li id="n-home"><a href="./">Home</a></li>
|
|
<li id="n-logs"><a href="./" class="dir">Logs</a>
|
|
<ul>
|
|
<li class="first"><a href="./"><strong>OS log</strong></a></li>
|
|
<li><a href="./">Verbose</a></li>
|
|
<li><a href="./">Driver log</a></li>
|
|
</ul>
|
|
</li>
|
|
<li id="n-options"><a href="./" class="dir">Options</a>
|
|
<ul>
|
|
<li class="first"><span class="dir">Video</span>
|
|
<ul>
|
|
<li class="first"><a href="./">Option 1</a></li>
|
|
<li><a href="./">Option 2</a></li>
|
|
<li><a href="./">Option 3</a></li>
|
|
<li><a href="./">Option 4</a></li>
|
|
<li><a href="./">Option 5</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><span class="dir">Sound</span>
|
|
<ul>
|
|
<li class="first"><a href="./">Option 1</a></li>
|
|
<li><a href="./">Option 2</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li id="n-debugger"><a href="./">Debugger</a></li>
|
|
</ul>
|
|
<br/><br/><br/><br/>
|
|
<div id="current"></div>
|
|
</div>
|
|
</body>
|
|
</html> |