1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
| package r1bellu2bl;
import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
class Action extends JComponent {
private BufferedImage image1;
private final Font myFont = new Font("Serif", Font.BOLD, 30);
private final Font myFont1 = new Font("Arial arrondi MT Bold", Font.BOLD, 10);
private final Font myFont2 = new Font("Arial arrondi MT Bold", Font.BOLD + Font.ITALIC, 8);
private final Font myFont3 = new Font("Serif", Font.BOLD, 24);
private final Font myFont4 = new Font("Arial arrondi MT Bold", Font.BOLD, 9);
private final Font myFont5 = new Font("Arial arrondi MT Bold", Font.BOLD + Font.ITALIC, 6);
private final Font myFont6 = new Font("Serif", Font.BOLD, 18);
private final Font myFont7 = new Font("Arial arrondi MT Bold", Font.BOLD, 8);
private final Font myFont8 = new Font("Arial arrondi MT Bold", Font.BOLD + Font.ITALIC, 4);
private final Font myFont9 = new Font("Serif", Font.BOLD, 12);
private final Font myFont10 = new Font("Arial arrondi MT Bold", Font.BOLD, 7);
private final Font myFont11 = new Font("Arial arrondi MT Bold", Font.BOLD + Font.ITALIC, 2);
Action() throws IOException {
String path1 = "src/images/ribellu.png";
image1 = ImageIO.read(new File(path1));
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
if (g instanceof Graphics2D) {
switch (Main.size) {
case SIZE1:
if (Main.Overlay) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(Color.gray);
g2.fillRoundRect(0, 0, 600, 310, 30, 30);
g2.setColor(Color.black);
g2.fillRoundRect(5, 5, 590, 300, 30, 30);
g2.setColor(Color.WHITE);
g2.drawRoundRect(30, 45, 312, 40, 10, 10);
g2.setColor(Color.WHITE);
g2.drawRoundRect(30, 95, 312, 40, 10, 10);
g2.setColor(Color.WHITE);
g2.drawRoundRect(30, 144, 312, 40, 10, 10);
g2.setColor(Color.WHITE);
g2.drawRoundRect(30, 192, 312, 40, 10, 10);
g2.setColor(Color.WHITE);
g2.drawRoundRect(30, 240, 312, 40, 10, 10);
g2.drawImage(image1, 380, 34, this);
g2.setFont(myFont2);
g2.setColor(Color.WHITE);
g2.drawString("V.1 by R1beLlu2B copyright© ", 225, 294);
g2.setFont(myFont1);
g2.setColor(Color.WHITE);
g2.drawString("F11: Resize", 106, 28);
g2.setColor(Color.WHITE);
g2.drawString("F10: ModeOverlay", 184, 28);
g2.setColor(Color.WHITE);
g2.drawString("F8: Arme", 294, 28);
g2.drawString("F7: Viseur", 358, 28);
g2.setColor(Color.WHITE);
g2.drawString("Num1: Slot1", 422, 28);
g2.setColor(Color.WHITE);
g2.drawString("Num2: Slot2", 497, 28);
}
....... |
Partager