Update splash screen.
parent
5f1580d917
commit
d2d473c82e
|
@ -76,7 +76,7 @@
|
|||
<jar destfile="release/Magarena.jar" basedir="build" includes="**/*.*">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="magic.MagicMain" />
|
||||
<attribute name="SplashScreen-Image" value="magic/data/textures/logo.jpg" />
|
||||
<attribute name="SplashScreen-Image" value="magic/data/textures/splash.png" />
|
||||
<attribute name="Class-Path" value="lib/groovy-all-${groovy-version}.jar lib/json-20140107.jar lib/miglayout-core-4.2.jar lib/miglayout-swing-4.2.jar lib/commons-io-2.4.jar lib/trident-1.3.jar" />
|
||||
</manifest>
|
||||
</jar>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 900 KiB |
Binary file not shown.
Before Width: | Height: | Size: 373 KiB |
Binary file not shown.
After Width: | Height: | Size: 260 KiB |
Binary file not shown.
Before Width: | Height: | Size: 68 KiB |
Binary file not shown.
After Width: | Height: | Size: 260 KiB |
|
@ -27,6 +27,7 @@ import magic.test.TestGameBuilder;
|
|||
import magic.ui.MagicFrame;
|
||||
import magic.utility.MagicFileSystem;
|
||||
import magic.utility.MagicFileSystem.DataPath;
|
||||
import magic.utility.MagicStyle;
|
||||
|
||||
public class MagicMain {
|
||||
|
||||
|
@ -168,12 +169,22 @@ public class MagicMain {
|
|||
g2d.fillRect(0, 0, splash.getSize().width, splash.getSize().height);
|
||||
// draw new state
|
||||
g2d.setPaintMode();
|
||||
g2d.setColor(MagicStyle.getTranslucentColor(Color.BLACK, 100));
|
||||
g2d.fillRect(0, 0, splash.getSize().width, 22);
|
||||
g2d.fillRect(0, splash.getSize().height - 22, splash.getSize().width, 22);
|
||||
// draw message
|
||||
g2d.setColor(Color.WHITE);
|
||||
final Font f = new Font("Monospaced", Font.PLAIN, 16);
|
||||
g2d.setFont(f);
|
||||
g2d.drawString(MagicMain.SOFTWARE_TITLE, 10, 20);
|
||||
g2d.drawString(message, 10, 40);
|
||||
// version
|
||||
final String version = "Version " + MagicMain.VERSION;
|
||||
int w = g2d.getFontMetrics(f).stringWidth(version);
|
||||
int x = (splash.getSize().width / 2) - (w / 2);
|
||||
g2d.drawString(version, x, 15);
|
||||
// status
|
||||
w = g2d.getFontMetrics(f).stringWidth(message);
|
||||
x = (splash.getSize().width / 2) - (w / 2);
|
||||
g2d.drawString(message, x, 274);
|
||||
splash.update();
|
||||
} catch (Exception e) {
|
||||
System.err.println(e);
|
||||
|
|
Loading…
Reference in New Issue