Files
OpenRA/mods/cnc/mod.html

178 lines
5.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
body { background-color: black; margin: 0px; color: White; font-family: Cambria, Georgia, Times New Roman, Serif; font-size: 12pt }
h1 { font-family: Cambria, Georgia, Times New Roman, Serif }
h2, h3 { font-family: Helvetica, Arial, Sans-Serif }
div#main
{
margin: 0 auto;
padding: 20px 0px;
width:100%;
height:100%;
overflow:hidden;
}
div#header
{
margin-top: 30px;
height: 66px;
text-align:center;
overflow:hidden;
}
div.bar
{
border-top: solid 3px #650b03;
border-bottom: solid 3px #650b03;
background-color: #272d2c;
width: 100%;
}
div#header h1
{
margin: auto auto;
padding-top:15px;
}
div#content
{
text-align: justify;
padding-left:50px;
overflow:hidden;
}
div.buttons
{
position:absolute;
bottom:0px;
padding:20px;
}
div.desc
{
font-size:0.75em;
}
.button
{
border: solid 3px #650b03;
border-radius: 10px;
margin:10px;
height:40px;
width:170px;
color:white;
font-weight:bold;
font-size:1em;
background-color: #272d2c;
}
.button:active
{
background-color:#fff;
}
.button:hover
{
border-color:#fff;
background-color:#650b03;
cursor:pointer;
}
</style>
<script type="text/javascript">
// Check which packages are installed.
// Returns 1 if basic files are installed
// Returns 2 if basic files plus music are installed
function packagesInstalled()
{
if (window.external.fileExistsInMod('packages/conquer.mix','cnc') != 1)
return 0;
return (window.external.fileExistsInMod('packages/scores.mix','cnc') == 1) ? 2 : 1;
}
function play()
{
window.external.launchMod("cnc");
}
function installFromCD()
{
window.external.log("installFromCD()");
}
function download1()
{
window.external.downloadFileToCache("http://www.open-ra.org/get-dependency.php?file=cnc-packages","test.zip","cnc-packages");
}
function download2()
{
window.external.downloadFileToCache("http://www.open-ra.org/get-dependency.php?file=ra-packages","test2.zip","ra-packages");
}
function cancel1()
{
window.external.cancelDownload("cnc-packages");
}
function cancel2()
{
window.external.cancelDownload("ra-packages");
}
function onLoad()
{
document.getElementById("buttons-install").style.display = (packagesInstalled() == 0) ? "" : "none";
document.getElementById("buttons-upgrade").style.display = (packagesInstalled() == 1) ? "" : "none";
document.getElementById("buttons-play").style.display = (packagesInstalled() == 2) ? "" : "none";
}
</script>
</head>
<body onload="onLoad();">
<div id="header" class="bar">
<h1>Command&nbsp;&amp;&nbsp;Conquer</h1>
</div>
<div id="main">
<div id="content">
<h2>Latest News</h2>
<div>
<h3>Version XXYYZZ Available</h3>
<ul>
<li>Cool feature one</li>
<li>Cool feature two</li>
<li>Bugfixes!!!</li>
</ul>
</div>
</div>
<div id="buttons-install" class="buttons">
<div class="desc">The original game data is required before you can play this mod.<br />
Installing from web will install the minimal files required to play.<br />
Installing from CD will also install the music and movie files for an improved game experience.
</div>
<input type="button" class="button" onclick="download1();" value="Download1" />
<input type="button" class="button" onclick="cancel1();" value="Cancel1" />
<input type="button" class="button" onclick="download2();" value="Download2" />
<input type="button" class="button" onclick="cancel2();" value="Cancel2" />
</div>
<div id="buttons-upgrade" class="buttons" style="display:none">
<div class="desc">
Upgrade from CD to install the original music and movie files for an improved game experience.
</div>
<input type="button" class="button" onclick="play();" value="Play" />
<input type="button" class="button" onclick="installFromCD();" value="Upgrade from CD" />
</div>
<div id="buttons-play" class="buttons" style="display:none">
<input type="button" class="button" onclick="play();" value="Play" />
</div>
</div>
</body>
</html>