blob: 474a6ad2bd5873b044eff7788db06804893ce3bd (
plain)
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
|
package org.happysanta.gd.Menu;
import static org.happysanta.gd.Helpers.logDebug;
public class SimpleMenuElementNew extends ClickableMenuElement
implements MenuElement {
// protected static Paint gFont;
public int x;
public int y;
/* public int m_bI;
public int m_eI;
public int m_dI;
public int m_gotoI;
public int m_nullI;
public int m_longI;
public int m_fI;
int m_cI; */
protected MenuScreen screen;
protected MenuHandler handler;
// protected Paint font;
// protected boolean isPressed = false;
/* static {
gFont = ActionMenuElement.getGFont();
} */
/* public SimpleMenuElementNew() {
init();
}
public SimpleMenuElementNew(int k) {
m_cI = k;
// font = gFont;
} */
public SimpleMenuElementNew(String text, MenuScreen screen, MenuHandler handler) {
this.text = text + ">";
this.screen = screen;
this.handler = handler;
createAllViews();
// textView = createAllViews();
}
/* public void init() {
x = y = m_bI = 0;
m_eI = m_dI = m_gotoI = 0;
m_nullI = m_longI = m_fI = 0;
} */
@Override
public void setText(String s) {
super.setText(s + ">");
}
// @Override
public void performAction(int k) {
logDebug("SimpleMenuElementNew performAction k = " + k);
switch (k) {
case MenuScreen.KEY_FIRE:
case MenuScreen.KEY_RIGHT:
handler.handleAction(this);
screen.setNavTarget(handler.getCurrentMenu());
handler.setCurrentMenu(screen, false);
break;
}
}
/* public void _aeV(MenuScreen e1) {
screen = e1;
} */
}
|