Added splash screen on Mage.Client startup. Use VM arguments: -splash:splash.jpg if you want to see it. Removed unused hardwoodfloor.png from resources.

This commit is contained in:
magenoxx 2010-11-28 12:23:04 +00:00
parent 11bec637ee
commit 3368f63161
4 changed files with 20 additions and 3 deletions

BIN
Mage.Client/splash.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View file

@ -34,9 +34,12 @@
package mage.client;
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Graphics2D;
import java.awt.SplashScreen;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.HashMap;
@ -458,10 +461,25 @@ public class MageFrame extends javax.swing.JFrame {
return pickNumber;
}
static void renderSplashFrame(Graphics2D g) {
g.setComposite(AlphaComposite.Clear);
g.fillRect(120,140,200,40);
g.setPaintMode();
g.setColor(Color.BLACK);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
final SplashScreen splash = SplashScreen.getSplashScreen();
if (splash != null) {
Graphics2D g = splash.createGraphics();
if (g != null) {
renderSplashFrame(g);
}
}
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
public void uncaughtException(Thread t, Throwable e) {
logger.log(Level.SEVERE, null, e);

View file

@ -3,7 +3,6 @@ package mage.client.components;
import java.awt.Component;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import javax.swing.JButton;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB