summary refs log tree commit diff stats
path: root/src/com/fourisland/fourpuzzle/window/SystemGraphic.java
blob: 24e0104f8bf07a682d6e92fb3d48fac34682f679 (plain) (blame)
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
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.fourisland.fourpuzzle.window;

import com.fourisland.fourpuzzle.util.ObjectLoader;
import java.awt.Color;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;

/**
 *
 * @author hatkirby
 */
public class SystemGraphic {
    
    private static BufferedImage systemGraphic;
    private static String filename = "System";
    public static void setGraphic(String filename)
    {
        SystemGraphic.filename = filename;
    }
    
    public static void initalize()
    {
        systemGraphic = ObjectLoader.getImage("Picture", filename);
    }
    
    public static BufferedImage getMessageBackground()
    {
        return systemGraphic.getSubimage(0, 0, 32, 32);
    }
    
    public static BufferedImage getSelectionBackground()
    {
        return systemGraphic.getSubimage(79, 15, 1, 1);
    }
    
    public static BufferedImage getChoiceArea(Rectangle sca)
    {
        return systemGraphic.getSubimage(sca.x, sca.y, sca.width, sca.height);
    }
    
    public static BufferedImage getTextColor()
    {
        return systemGraphic.getSubimage(0, 48, 16, 16);
    }
    
    public static Color getTransparentColor()
    {
        return new Color(systemGraphic.getRGB(159, 0));
    }

}