MCPcopy Create free account
hub / github.com/catabriga/graphwar / contains

Method contains

src/Graphwar/GraphButton.java:92–113  ·  view source on GitHub ↗
(int x, int y)

Source from the content-addressed store, hash-verified

90 }
91
92 public boolean contains(int x, int y)
93 {
94 //System.out.println(x+" "+y);
95
96 if( (0 <= x) && (maskImg.getWidth() > x) &&
97 (0 <= y) && (maskImg.getHeight() > y))
98 {
99 if( maskImg.getRGB(x, y) != -1)
100 {
101 return true;
102 }
103 }
104
105 // Hack to keep buttons from appearead hovered when changing screens
106 if(this.mouseOver==true)
107 {
108 this.mouseOver = false;
109 this.repaint();
110 }
111
112 return false;
113 }
114
115
116 public void mouseDragged(MouseEvent arg0)

Callers 1

mouseMovedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected