forked from RobLoach/raylib-nuklear
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathminshell.html
More file actions
49 lines (48 loc) · 1.46 KB
/
minshell.html
File metadata and controls
49 lines (48 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>raylib-nuklear: Demo</title>
<meta name="description" content="Use Nuklear GUI within raylib: https://github.com/RobLoach/raylib-nuklear">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Rob Loach">
<style>
html, body {
margin: 0;
height: 100vh;
max-width: 100vw;
}
body {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
color: white;
background: black;
}
#console {
overflow: auto;
}
</style>
</head>
<body>
<canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
<!-- <pre id="console"></pre> -->
<script type='text/javascript'>
window.Module = {
canvas: document.getElementById('canvas'),
print: (...args) => {
const consoleElement = document.getElementById('console')
const text = args.join(' ')
console.log(text);
if (consoleElement) {
consoleElement.innerText += text + "\n"
consoleElement.scrollTop = consoleElement.scrollHeight
}
}
}
</script>
{{{ SCRIPT }}}
</body>
</html>