Changed whole project structure (split client and server into separat projects)
This commit is contained in:
32
ReallifeGamemode.Client/assets/html/inputhelper/index.html
Normal file
32
ReallifeGamemode.Client/assets/html/inputhelper/index.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="package://assets/css/inputhelper/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="black"></div>
|
||||
<div class="input-main">
|
||||
<h1></h1>
|
||||
<input id="input-value" autofocus>
|
||||
</div>
|
||||
<script type="text/javascript" src="package://assets/js/jquery-3.3.1.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
mp.trigger('cef_request_title');
|
||||
|
||||
$('#input-value').keydown(function (e) {
|
||||
if (e.keyCode != 13) return;
|
||||
var currentValue = $('#input-value').val();
|
||||
if (currentValue) {
|
||||
mp.trigger('cef_inputhelper_sendvalue', currentValue);
|
||||
console.log("triggered event: " + currentValue);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function setTitle(title) {
|
||||
$('.input-main h1').text(title);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user