Mercurial > hg > ristipolku
annotate game/IDMPoint.java @ 176:9d3ff9605555
Change AboutBox to a "dialog" and implement Ok/close button for closing it.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 16 Mar 2017 10:44:38 +0200 |
parents | e8eeac403e5f |
children |
rev | line source |
---|---|
73
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 /* |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 * Ristipolku IDM point |
151 | 3 * (C) Copyright 2011 Matti 'ccr' Hämäläinen <ccr@tnsp.org> |
73
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 */ |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 package game; |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
6 |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 public class IDMPoint |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 { |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 public float x, y; |
134
4c0dec72e2f0
Whitespace cosmetic cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
126
diff
changeset
|
10 |
73
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 public IDMPoint(float x, float y) |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 { |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
13 this.x = x; |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
14 this.y = y; |
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
15 } |
79
83a79d1698c8
Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
16 |
126
c4d0ceec99ef
Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents:
79
diff
changeset
|
17 public IDMPoint(IDMPoint pt) |
c4d0ceec99ef
Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents:
79
diff
changeset
|
18 { |
c4d0ceec99ef
Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents:
79
diff
changeset
|
19 this.x = pt.x; |
c4d0ceec99ef
Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents:
79
diff
changeset
|
20 this.y = pt.y; |
c4d0ceec99ef
Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents:
79
diff
changeset
|
21 } |
c4d0ceec99ef
Add IDMPoint constructor copying from another IDMPoint.
Matti Hamalainen <ccr@tnsp.org>
parents:
79
diff
changeset
|
22 |
79
83a79d1698c8
Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
23 public IDMPoint copy() |
83a79d1698c8
Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
24 { |
83a79d1698c8
Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
25 return new IDMPoint(x, y); |
83a79d1698c8
Method for creating a copy of a point.
Matti Hamalainen <ccr@tnsp.org>
parents:
73
diff
changeset
|
26 } |
73
8c81a3e73a2b
Added custom point type for IDM widgets.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
27 } |