Add SAF frontend
This commit is contained in:
parent
bf2cd38337
commit
c2bcf2d325
8 changed files with 131 additions and 40 deletions
|
@ -65,31 +65,11 @@
|
|||
{
|
||||
return document.getElementById('canvas');
|
||||
}
|
||||
)(),
|
||||
onRuntimeInitialized: function()
|
||||
{
|
||||
pressFunc = Module.cwrap('webButton','', ['number','number']);
|
||||
}
|
||||
)()
|
||||
};
|
||||
|
||||
function down(button)
|
||||
{
|
||||
pressFunc(button,1);
|
||||
}
|
||||
|
||||
function up(button)
|
||||
{
|
||||
pressFunc(button,0);
|
||||
}
|
||||
</script>
|
||||
|
||||
{{{ SCRIPT }}}
|
||||
|
||||
<table style="user-select:none; -moz-user-select: none; -ms-user-select:none; -webkit-user-select: none; -o-user-select:none;" onselectstart="return false;" unselectable="on">
|
||||
<tr> <td></td> <td><button onmousedown="down(0)" ontouchstart="down(0)" onmouseup="up(0)" ontouchend="up(0)" onmouseout="up(0)" ontouchleave="(0)">U</button></td> <td></td> <td></td> <td><button onmousedown="down(4)" ontouchstart="down(4)" onmouseup="up(4)" ontouchend="up(4)" onmouseout="up(4)" ontouchleave="(4)">A</button></td> <td></td> <td></td> </tr>
|
||||
<tr> <td><button onmousedown="down(3)" ontouchstart="down(3)" onmouseup="up(3)" ontouchend="up(3)" onmouseout="up(3)" ontouchleave="(3)">L</button></td> <td></td> <td><button onmousedown="down(1)" ontouchstart="down(1)" onmouseup="up(1)" ontouchend="up(1)" onmouseout="up(1)" ontouchleave="(1)">R</button></td> <td></td> <td></td> <td><button onmousedown="down(5)" ontouchstart="down(5)" onmouseup="up(5)" ontouchend="up(5)" onmouseout="up(5)" ontouchleave="(5)">B</button></td> <td></td> </tr>
|
||||
<tr> <td></td> <td><button onmousedown="down(2)" ontouchstart="down(2)" onmouseup="up(2)" ontouchend="up(2)" onmouseout="up(2)" ontouchleave="(2)">D</button></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue