game.rml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <rml>
  2. <head>
  3. <title>game</title>
  4. <link type="text/template" href="window.rml" />
  5. <style>
  6. body
  7. {
  8. padding: 0dp;
  9. margin: 0dp;
  10. width: 100%;
  11. height: 100%;
  12. z-index: -1;
  13. }
  14. game
  15. {
  16. display: block;
  17. width: 100%;
  18. height: 100%;
  19. }
  20. div
  21. {
  22. position: relative;
  23. height: 43dp;
  24. padding: 12dp 0 0 72dp;
  25. margin: 0 20dp;
  26. font-size: 20dp;
  27. decorator: tiled-horizontal( huditem-l, huditem-c, huditem-r );
  28. }
  29. div#score_div
  30. {
  31. float: left;
  32. width: 155dp;
  33. }
  34. div#hiscore_div
  35. {
  36. float: left;
  37. width: 205dp;
  38. }
  39. div#waves_div
  40. {
  41. float: right;
  42. width: 95dp;
  43. }
  44. div#lives_div
  45. {
  46. float: right;
  47. width: 80dp;
  48. }
  49. icon
  50. {
  51. display: block;
  52. position: absolute;
  53. left: 14dp;
  54. top: 3dp;
  55. width: 51dp;
  56. height: 39dp;
  57. }
  58. div#score_div icon
  59. {
  60. decorator: image( icon-score );
  61. }
  62. div#hiscore_div icon
  63. {
  64. decorator: image( icon-hiscore );
  65. }
  66. div#waves_div icon
  67. {
  68. decorator: image( icon-waves );
  69. }
  70. div#lives_div icon
  71. {
  72. decorator: image( icon-lives );
  73. }
  74. </style>
  75. </head>
  76. <body id="game_window" ongameover="Window.LoadMenu('high_score',document)" onkeydown="if Window.EscapePressed(event) then Window.OpenDocument('pause',document) end">
  77. <game id="game">
  78. <div id="score_div">
  79. <icon />
  80. score: <span id="score" />
  81. </div>
  82. <div id="hiscore_div">
  83. <icon />
  84. high score: <span id="hiscore" />
  85. </div>
  86. <div id="lives_div">
  87. <icon />
  88. lives: <span id="lives" />
  89. </div>
  90. <div id="waves_div">
  91. <icon />
  92. wave: <span id="waves" />
  93. </div>
  94. </game>
  95. </body>
  96. </rml>