mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
holy hell, let's burn this place down
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
package processing.app;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Image;
|
||||
import java.awt.RenderingHints;
|
||||
import java.awt.Window;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
|
||||
|
||||
public class About extends Window {
|
||||
Image image;
|
||||
int width, height;
|
||||
|
||||
|
||||
public About(Frame frame) {
|
||||
super(frame);
|
||||
|
||||
if (Toolkit.highResDisplay()) {
|
||||
image = Toolkit.getLibImage("about-2x.jpg");
|
||||
width = image.getWidth(null) / 2;
|
||||
height = image.getHeight(null) / 2;
|
||||
} else {
|
||||
image = Toolkit.getLibImage("about.jpg");
|
||||
width = image.getWidth(null);
|
||||
height = image.getHeight(null);
|
||||
}
|
||||
|
||||
addMouseListener(new MouseAdapter() {
|
||||
public void mousePressed(MouseEvent e) {
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
|
||||
Dimension screen = Toolkit.getScreenSize();
|
||||
setBounds((screen.width-width)/2, (screen.height-height)/2, width, height);
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
public void paint(Graphics g) {
|
||||
g.drawImage(image, 0, 0, width, height, null);
|
||||
|
||||
Graphics2D g2 = (Graphics2D) g;
|
||||
g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
|
||||
RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
|
||||
|
||||
g.setFont(new Font("SansSerif", Font.PLAIN, 11));
|
||||
g.setColor(Color.white);
|
||||
g.drawString(Base.VERSION_NAME, 50, 30);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user