minshell.html 1.5 KB

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