6 Fancy Launcher
sk89q edited this page 2015-03-22 18:35:30 -07:00

The fancy launcher can be found in launcher-fancy. It is identical to the regular launcher except that it uses a skin.

The Skin

Usage

Simply use the fancy launcher's .jar instead of the regular launcher's .jar.

If you are using the bootstrapper, you will also need to change the "launcherClass" property in the bootstrap properties file to:

launcherClass=com.skcraft.launcher.FancyLauncher

The background image can changed in launcher-fancy/src/main/resources/com/skcraft/launcher.

News Page

The news page uses a transparent background so that the launcher background shows through. This can be achieved simply by not specifying a background color on the page.

Example code to reproduce the news page seen in the screenshot above is listed below.

  • block_bg.png is a translucent solid color PNG because CSS transparent backgrounds don't seem to work with Java's web browser.
  • logo.png is the logotype image with a transparent background.
<!DOCTYPE html>
<html>
<head>
<title>News Page</title>
<style>
body {
    color: #999999;
    font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    font-size: 12pt;
}
.logo {
    padding: 0 0 12px 0;
}
.block {
    width: 90%;
    padding: 12px;
    margin: 0 0 10px 0;
    background: url(block_bg.png);
}
h1 {
    font-size: 100%;
    color: #4bb7b9;
    margin: 0 0 8px 0;
    padding: 0;
}
ul {
    margin: 0;
    padding: 0 0 0 15px;
}
li {
    margin: 0;
    padding: 0;
}
</style>
</head>
<body>
<div class="logo">
    <img src="logo.png">
</div>

<div class="block">
    <h1>THE CURRENT CHATTER</h1>

    <ul>
        <li>The new public ranch at spawn has been renovated.</li>
        <li>You can now buy apples for cheap at the market.</li>
        <li>The rail network has been expanded substantially.</li>
        <li>A new mob, the Skydragon, has appeared on Vincent.</li>
        <li>The Vincent server has been updated to Minecraft 1.2!</li>
    </ul>
</div>

<div class="block">
    <h1>TEAMSPEAK</h1>

    Join our teamspeak channel! <strong>ts.example.com</strong>
</div>
</body>
</html>

Disadvantages

The fancy version adds about 2 megabytes to the file size of the launcher and also consumes more memory.