| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <rml>
- <head>
- <title>High Scores</title>
- <link type="text/template" href="window.rml" />
- <style>
- body
- {
- width: 350px;
- height: 350px;
-
- margin: auto;
- }
-
- div#title_bar div#icon
- {
- icon-image-s: 281px 331px;
- icon-image-t: 152px 191px;
- }
-
- datagrid
- {
- margin-bottom: 20px;
- min-rows: 10;
- }
-
- datagrid data_grid_body
- {
- min-height: 200px;
- }
-
- defender
- {
- display: block;
- width: 64px;
- height: 16px;
-
- defender-decorator: defender;
- defender-image-src: high_scores_defender.tga;
- }
- </style>
- <script>
- import rocket
- def OnRowAdd():
- input = document.GetElementById('player_input')
- if input:
- input.Focus()
- def OnLoad(window):
- OnWindowLoad(window)
- datagrid = window.GetElementById('datagrid')
- datagrid.AddEventListener('rowupdate', OnRowAdd, False)
-
- def OnKeyDown(event):
- if event.parameters['key_identifier'] == rocket.key_identifier.RETURN:
- game.SetHighScoreName(event.current_element.value)
- </script>
- </head>
- <body template="pywindow" onload="OnLoad(self); game.SubmitHighScore()" onunload="game.SetHighScoreName('Anon')">
- <datagrid id="datagrid" source="high_scores.scores">
- <col fields="name,name_required" formatter="name" width="40%">Pilot:</col>
- <col fields="colour" formatter="ship" width="20%">Ship:</col>
- <col fields="wave" width="20%">Wave:</col>
- <col fields="score" width="20%">Score:</col>
- </datagrid>
- <button onclick="LoadMenu('main_menu')">Main Menu</button>
- </body>
- </rml>
|