game.rml 1.6 KB

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