38 |
private static void p(String s) { System.out.println("SelectListVob:: "+s); } |
private static void p(String s) { System.out.println("SelectListVob:: "+s); } |
39 |
|
|
40 |
private final SelectItemVob[] items; |
private final SelectItemVob[] items; |
|
private final float scale; |
|
41 |
private final RectBgVob bg; |
private final RectBgVob bg; |
42 |
|
|
43 |
public SelectListVob(SelectItemVob[] items) { |
public SelectListVob(SelectItemVob[] items) { |
44 |
this(items, 2.5f); |
this(items, new Color(.9f, .9f, 1)); |
|
} |
|
|
public SelectListVob(SelectItemVob[] items, float scale) { |
|
|
this(items, scale, new Color(.9f, .9f, 1)); |
|
45 |
} |
} |
46 |
/** @param items the items in list. |
/** @param items the items in list. |
|
* @param scale scales the list XXX not implemented! |
|
47 |
* @param bgColor background color of list |
* @param bgColor background color of list |
48 |
*/ |
*/ |
49 |
public SelectListVob(SelectItemVob[] items, float scale, Color bgColor) { |
public SelectListVob(SelectItemVob[] items, Color bgColor) { |
50 |
this.items = items; |
this.items = items; |
|
this.scale = scale; |
|
51 |
this.bg = new RectBgVob(bgColor); |
this.bg = new RectBgVob(bgColor); |
52 |
} |
} |
53 |
|
|
138 |
private boolean miss(float x, float y) { |
private boolean miss(float x, float y) { |
139 |
if (x < 0 || x > xRatio * getWidth() || |
if (x < 0 || x > xRatio * getWidth() || |
140 |
y < 0 || y > yRatio * getHeight()) { |
y < 0 || y > yRatio * getHeight()) { |
141 |
p("miss"); |
if (dbg) p("miss"); |
142 |
return true; |
return true; |
143 |
} return false; |
} return false; |
144 |
} |
} |