/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.fourisland.fourpuzzle.window;
import com.fourisland.fourpuzzle.Display;
import com.fourisland.fourpuzzle.util.ObjectLoader;
import com.fourisland.fourpuzzle.util.TransparentPixelFilter;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.awt.image.FilteredImageSource;
/**
*
* @author hatkirby
*/
public class SystemGraphic {
private static BufferedImage systemGraphic = null;
private static String filename = "System";
public static void setGraphic(String filename)
{
SystemGraphic.filename = filename;
}
public static void initalize()
{
BufferedImage temp = ObjectLoader.getImage("Picture", filename);
systemGraphic = Display.createCanvas(160, 80);
systemGraphic.createGraphics().drawImage(Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(temp.getSource(), new TransparentPixelFilter(temp.getRGB(159, 0)))),0,0,null);
}
public static BufferedImage getMessageBackground()
{
if (systemGraphic == null)
{
initalize();
}
return systemGraphic.getSubimage(0, 0, 32, 32);
}
public static BufferedImage getSelectionBackground(boolean isFlashing)
{
if (systemGraphic == null)
{
initalize();
}
return systemGraphic.getSubimage((isFlashing ? 96 : 64) + 15, 15, 1, 1);
}
public static BufferedImage getChoiceArea(Rectangle sca)
{
if (systemGraphic == null)
{
initalize();
}
return systemGraphic.getSubimage(sca.x, sca.y, sca.width, sca.height);
}
public static BufferedImage getTextColor()
{
if (systemGraphic == null)
{
initalize();
}
return systemGraphic.getSubimage(0, 48, 16, 16);
}
public static BufferedImage getUpArrow()
{
if (systemGraphic == null)
{
initalize();
}
return systemGraphic.getSubimage(43, 10, 10, 6);
}
public static BufferedImage getDownArrow()
{
if (systemGraphic == null)
{
initalize();
}
return systemGraphic.getSubimage(43, 18, 10, 6);
}
}
'h' value='v9.0.0'/>
blob: 6784163411deb9e4e44c0a87f112a18b097967b4 (
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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
name: "Puzzles"
display_name: "Sirenic"
panels {
name: "Left Top 1"
path: "Panels/Room_1/pip_1"
clue: ""
answer: "do"
symbols: AGE
symbols: LINGO
}
panels {
name: "Left Top 2"
path: "Panels/Room_1/pip_3"
clue: ""
answer: "neck"
symbols: STARS
symbols: LINGO
}
panels {
name: "Left Bottom 1"
path: "Panels/Room_1/pip_2"
clue: ""
answer: "rip"
symbols: SPARKLES
symbols: LINGO
}
panels {
name: "Left Top 3"
path: "Panels/Room_1/1969_1"
clue: ""
answer: "idea"
symbols: LINGO
}
panels {
name: "Left Bottom 2"
path: "Panels/Room_1/1969_2"
clue: ""
answer: "earl"
symbols: SPARKLES
symbols: LINGO
}
panels {
name: "Left Bottom 3"
path: "Panels/Room_1/lastone"
clue: ""
answer: "ghost"
symbols: SPARKLES
symbols: SOUND
symbols: LINGO
}
panels {
name: "Left Bottom 4"
path: "Panels/Room_1/lastone2"
clue: ""
answer: "tree"
symbols: BOXES
symbols: LINGO
}
panels {
name: "Left Top 5"
path: "Panels/Room_1/lastone3"
clue: ""
answer: "cow"
symbols: SPARKLES
symbols: SOUND
symbols: LINGO
}
panels {
name: "Left Top 4"
path: "Panels/Room_1/lastone4"
clue: ""
answer: "room"
symbols: SPARKLES
symbols: LINGO
}
panels {
name: "Right Bottom 1"
path: "Panels/Room_1/negative"
clue: ""
answer: "junk"
symbols: LINGO
}
panels {
name: "Right Bottom 2"
path: "Panels/Room_1/skirt"
clue: ""
answer: "kilt"
symbols: SPARKLES
symbols: LINGO
}
panels {
name: "Right Top 1"
path: "Panels/Room_1/skirt2"
clue: ""
answer: "skirt"
symbols: SPARKLES
symbols: LINGO
}
panels {
name: "Right Bottom 3"
path: "Panels/Room_1/mow"
clue: ""
answer: "lawnmower"
symbols: JOB
symbols: LINGO
}
panels {
name: "Right Top 2"
path: "Panels/Room_1/mow2"
clue: ""
answer: "woman"
symbols: SPARKLES
symbols: LINGO
}
panels {
name: "Right Bottom 4"
path: "Panels/Room_1/ova"
clue: ""
answer: "egg"
symbols: SUN
symbols: LINGO
}
|