-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInBtwn1_Play.java
executable file
·64 lines (63 loc) · 1.79 KB
/
InBtwn1_Play.java
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
/**
* All Attributes of the play button
*
* @author (Pavithran Pathmarajah)
* @version (2014 May 22)
*/
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class InBtwn1_Play extends InBtwn_Buttons implements MouseListener, ActionListener
{ int width;
int height;
InBetweenMenu window;
public InBtwn1_Play (int w,int h,InBetweenMenu ww)
{
super("PLAY");
window=ww;
width=w;
height=h;
setFocusPainted(false);//remove ugly highlight
setBackground(new Color(0x34536C)); //button
setForeground(new Color(0x947D68));//text
setBounds(width-115,height-60, 135, 50);
addMouseListener(this);
addActionListener(this);
}
public void onDestroy()
{
this.removeMouseListener(this);
this.removeActionListener(this);
}
public void mouseClicked(MouseEvent e)
{
}
public void mouseEntered(MouseEvent e)
{
// window.blur();
window.repaint();
setBounds(width-121,height-65, 141, 60);
setBackground(new Color(0x977E69));//background
setForeground(new Color(0x34536C));//text
}
public void mouseExited(MouseEvent e)
{
// window.standardWin();
setBounds(width-115,height-60, 135, 50);
setBackground(new Color(0x34536C)); //button
setForeground(new Color(0x947D68));//text
}
public void mousePressed(MouseEvent e)
{
}
public void mouseReleased(MouseEvent e)
{
}
public void actionPerformed(ActionEvent e)
{
Main.restartGame();
}
}