mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
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:
parent
11bec637ee
commit
3368f63161
4 changed files with 20 additions and 3 deletions
BIN
Mage.Client/splash.jpg
Normal file
BIN
Mage.Client/splash.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
|
@ -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);
|
||||
|
|
|
@ -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 |
Loading…
Reference in a new issue