RML with embedded scripts and styles
Code: Select all
<rml>
<head>
<link type="text/template" href="window.rml" />
<title>Select Team</title>
<style>
body {width: 190px; height: 190px; margin: auto}
</style>
<script>
// inline scripting (Python)
def BuildMenu(document):
teamGame = GAME.GetGameMode().TeamGame()
</script>
</head>
<body template="window" onload="OnWindowLoad(self); BuildMenu(document)">
<div id="red"><button onclick="GAME.ChangeTeam(TEAM.RED); document.Close()">Red</button></div>
<div id="blue"><button onclick="GAME.ChangeTeam(TEAM.BLUE); document.Close()">Blue</button></div>
<div id="auto"><button onclick="GAME.ChangeTeam(GAME.AutoSelectTeam()); document.Close()">Auto-Select</button></div>
<div id="spec"><button onclick="GAME.ChangeTeam(TEAM.NONE); document.Close()">Spectator</button></div>
<button onclick="document.Close()">Cancel</button>
</body>
</rml>
Code: Select all
body
{
font-family: Fontin Sans;
font-weight: normal;
font-style: normal;
font-size: 15;
font-charset: U+0020-00FF;
color: white;
cursor: arrow;
}
body.window
{
padding-bottom: 20px;
min-width: 0px;
max-width: 800px;
min-height: 0px;
max-height: 700px;
}
div#title_bar
{
z-index: 1;
position: absolute;
top: 0px;
left: 0px;
text-align: left;
}
div#title_bar div#icon
{
z-index: 2;
position: absolute;
left: 0px;
top: -38px;
width: 63px;
height: 63px;
background-decorator: image;
background-image: kong.png 1px 1px 64px 64px;
}