Rev 242 | Rev 255 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 242 | Rev 245 | ||
---|---|---|---|
1 | /******************************************************** |
1 | /******************************************************** |
2 | * |
2 | * |
3 | * class to handle Editing of MK Params via MIDP / J2ME |
3 | * class to handle Editing of MK Params via MIDP / J2ME |
4 | * |
4 | * |
5 | * Author: Marcus -LiGi- Bueschleb |
5 | * Author: Marcus -LiGi- Bueschleb |
6 | * |
6 | * |
7 | ********************************************************/ |
7 | ********************************************************/ |
8 | 8 | ||
9 | import javax.microedition.lcdui.*; |
9 | import javax.microedition.lcdui.*; |
10 | 10 | ||
11 | public class MKParamsEditor |
11 | public class MKParamsEditor |
12 | implements org.ligi.ufo.MKParamDefinitions |
12 | implements org.ligi.ufo.MKParamDefinitions |
13 | { |
13 | { |
14 | 14 | ||
15 | public byte nextstate; |
15 | public byte nextstate; |
16 | 16 | ||
17 | private int act_tab=0; |
17 | private int act_tab=0; |
18 | public int act_y=1; |
18 | public int act_y=1; |
19 | private int act_lcd_lines=10; |
19 | private int act_lcd_lines=10; |
20 | 20 | ||
21 | DUBwiseCanvas canvas; |
21 | DUBwiseCanvas canvas; |
22 | 22 | ||
23 | public String[] lcd_lines; |
23 | public String[] lcd_lines; |
24 | 24 | ||
25 | public String[] menu_items; |
25 | public String[] menu_items; |
26 | 26 | ||
27 | org.ligi.ufo.ParamsClass edit_source; |
27 | org.ligi.ufo.ParamsClass edit_source; |
28 | 28 | ||
29 | 29 | ||
30 | public MKParamsEditor(DUBwiseCanvas _canvas,org.ligi.ufo.ParamsClass _edit_source,byte _nextstate) |
30 | public MKParamsEditor(DUBwiseCanvas _canvas,org.ligi.ufo.ParamsClass _edit_source,byte _nextstate) |
31 | { |
31 | { |
32 | nextstate=_nextstate; |
32 | nextstate=_nextstate; |
33 | edit_source=_edit_source; |
33 | edit_source=_edit_source; |
34 | 34 | ||
35 | canvas=_canvas; |
35 | canvas=_canvas; |
36 | lcd_lines=new String[40]; |
36 | lcd_lines=new String[40]; |
37 | // refresh_lcd(); |
37 | // refresh_lcd(); |
38 | } |
38 | } |
39 | 39 | ||
40 | 40 | ||
41 | boolean select_mode=true; |
41 | boolean select_mode=true; |
42 | 42 | ||
43 | 43 | ||
44 | public void paint ( Graphics g) |
44 | public void paint ( Graphics g) |
45 | { |
45 | { |
46 | if (select_mode) |
46 | if (select_mode) |
47 | { |
47 | { |
48 | if (canvas.menu_items[0]!=edit_source.tab_names[0]) // usefull? |
48 | if (canvas.menu_items[0]!=edit_source.tab_names[0]) // usefull? |
49 | { |
49 | { |
50 | act_y=1; |
50 | act_y=1; |
51 | menu_items=new String[edit_source.tab_names.length+1]; |
51 | menu_items=new String[edit_source.tab_names.length+1]; |
52 | for(int p=0;p<edit_source.tab_names.length;p++) |
52 | for(int p=0;p<edit_source.tab_names.length;p++) |
53 | menu_items[p]=edit_source.tab_names[p]; |
53 | menu_items[p]=edit_source.tab_names[p]; |
54 | menu_items[edit_source.tab_names.length]="back"; |
54 | menu_items[edit_source.tab_names.length]="back"; |
55 | canvas.setup_menu(menu_items,null); |
55 | canvas.setup_menu(menu_items,null); |
56 | } |
56 | } |
57 | canvas.paint_menu(g); |
57 | canvas.paint_menu(g); |
58 | } |
58 | } |
59 | 59 | ||
60 | else |
60 | else |
61 | { |
61 | { |
62 | refresh_lcd(); |
62 | refresh_lcd(); |
63 | // canvas.paint_lcd(g,false); |
63 | // canvas.paint_lcd(g,false); |
64 | canvas.paint_lcd(g); |
64 | canvas.paint_lcd(g); |
65 | } |
65 | } |
66 | } |
66 | } |
67 | 67 | ||
68 | 68 | ||
69 | public void refresh_lcd() |
69 | public void refresh_lcd() |
70 | { |
70 | { |
71 | 71 | ||
72 | try { |
72 | try { |
73 | act_lcd_lines=edit_source.field_names[act_tab].length*2+2; |
73 | act_lcd_lines=edit_source.field_names[act_tab].length*2+2; |
74 | 74 | ||
75 | for ( int i=0;i<act_lcd_lines;i++) |
75 | for ( int i=0;i<act_lcd_lines;i++) |
76 | lcd_lines[i]=""; |
76 | lcd_lines[i]=""; |
77 | 77 | ||
78 | 78 | ||
79 | 79 | ||
80 | // lcd_lines[0]=(act_tab==0?" ":"< ") + edit_source.tab_names[act_tab] + (act_tab==(edit_source.tab_names.length-1)?" ":" >"); |
80 | // lcd_lines[0]=(act_tab==0?" ":"< ") + edit_source.tab_names[act_tab] + (act_tab==(edit_source.tab_names.length-1)?" ":" >"); |
81 | 81 | ||
82 | for (int i=0;i<edit_source.field_names[act_tab].length;i++) |
82 | for (int i=0;i<edit_source.field_names[act_tab].length;i++) |
83 | { |
83 | { |
84 | lcd_lines[2*i]=edit_source.field_names[act_tab][i]; |
84 | lcd_lines[2*i]=edit_source.field_names[act_tab][i]; |
85 | 85 | ||
86 | switch(edit_source.field_types[act_tab][i]) |
86 | switch(edit_source.field_types[act_tab][i]) |
87 | { |
87 | { |
88 | case PARAMTYPE_BITSWITCH: |
88 | case PARAMTYPE_BITSWITCH: |
89 | lcd_lines[1+2*i]=" " + (((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]/8)&(1<<edit_source.field_positions[act_tab][i]%8))==0)?"off":"on" ) ; |
89 | lcd_lines[1+2*i]=" " + (((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]/8)&(1<<edit_source.field_positions[act_tab][i]%8))==0)?"off":"on" ) ; |
90 | break; |
90 | break; |
- | 91 | ||
91 | case PARAMTYPE_BYTE: |
92 | case PARAMTYPE_BYTE: |
92 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
93 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
- | 94 | ||
- | 95 | break; |
|
- | 96 | ||
- | 97 | case PARAMTYPE_BITMASK: |
|
- | 98 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
|
93 | if ((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])>250)&&(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])<256)) |
99 | if ((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])>250)&&(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])<256)) |
94 | lcd_lines[2+2*i]+="[Poti"+(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])-250) +"]"; break; |
100 | lcd_lines[1+2*i]+="[Poti"+(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])-250) +"]"; |
- | 101 | else |
|
- | 102 | { |
|
- | 103 | lcd_lines[1+2*i]+=" ["; |
|
- | 104 | for (int bit=0;bit<8;bit++) |
|
- | 105 | lcd_lines[1+2*i]+=((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]) & ( 1<<bit)) !=0)?"+":"-"; |
|
- | 106 | lcd_lines[1+2*i]+="]"; |
|
- | 107 | } |
|
- | 108 | ||
- | 109 | break; |
|
- | 110 | ||
- | 111 | case PARAMTYPE_MKBYTE: |
|
- | 112 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
|
- | 113 | if ((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])>250)&&(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])<256)) |
|
- | 114 | lcd_lines[1+2*i]+=" [Poti"+(edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])-250) +"]"; |
|
- | 115 | break; |
|
95 | 116 | ||
96 | 117 | ||
97 | case PARAMTYPE_KEY: |
118 | case PARAMTYPE_KEY: |
98 | if (edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])==-4242) |
119 | if (edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])==-4242) |
99 | lcd_lines[1+2*i]="none"; |
120 | lcd_lines[1+2*i]="none"; |
100 | else |
121 | else |
101 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
122 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
102 | break; |
123 | break; |
103 | case PARAMTYPE_STICK: |
124 | case PARAMTYPE_STICK: |
104 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
125 | lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]); |
105 | break; |
126 | break; |
106 | 127 | ||
107 | default: |
128 | default: |
108 | lcd_lines[1+2*i]=" "+edit_source.choice_strings[edit_source.field_types[act_tab][i]-PARAMTYPE_CHOICE][edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])]; |
129 | lcd_lines[1+2*i]=" "+edit_source.choice_strings[edit_source.field_types[act_tab][i]-PARAMTYPE_CHOICE][edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])]; |
109 | } |
130 | } |
110 | 131 | ||
111 | } |
132 | } |
112 | 133 | ||
113 | lcd_lines[act_lcd_lines-1]="back"; |
134 | lcd_lines[act_lcd_lines-1]="back"; |
114 | 135 | ||
115 | canvas.lcd_lines=new String[act_lcd_lines]; |
136 | canvas.lcd_lines=new String[act_lcd_lines]; |
116 | for ( int i=0;i<act_lcd_lines;i++) |
137 | for ( int i=0;i<act_lcd_lines;i++) |
117 | { |
138 | { |
118 | lcd_lines[i]=(act_y==i?"#":" ")+lcd_lines[i]; |
139 | lcd_lines[i]=(act_y==i?"#":" ")+lcd_lines[i]; |
119 | while(lcd_lines[i].length()<20) |
140 | while(lcd_lines[i].length()<20) |
120 | lcd_lines[i]+=" "; |
141 | lcd_lines[i]+=" "; |
121 | 142 | ||
122 | canvas.lcd_lines[i]=lcd_lines[i]; |
143 | canvas.lcd_lines[i]=lcd_lines[i]; |
123 | } |
144 | } |
124 | 145 | ||
125 | } |
146 | } |
126 | 147 | ||
127 | catch (Exception e){} |
148 | catch (Exception e){} |
128 | 149 | ||
129 | // for(int i=0;i<act_lcd_lines;i++) |
150 | // for(int i=0;i<act_lcd_lines;i++) |
130 | 151 | ||
131 | /* |
152 | /* |
132 | } |
153 | } |
133 | else |
154 | else |
134 | { |
155 | { |
135 | canvas.lcd_lines=new String[1]; |
156 | canvas.lcd_lines=new String[1]; |
136 | canvas.lcd_lines[0]="reading params"; |
157 | canvas.lcd_lines[0]="reading params"; |
137 | } |
158 | } |
138 | */ |
159 | */ |
139 | } |
160 | } |
140 | 161 | ||
141 | 162 | ||
142 | public final static int KEYCODE_CLEAR=-8; |
163 | public final static int KEYCODE_CLEAR=-8; |
143 | 164 | ||
144 | public boolean editing_number=false; |
165 | public boolean editing_number=false; |
145 | 166 | ||
146 | public void pointer_press(int x,int row) |
167 | public void pointer_press(int x,int row) |
147 | { |
168 | { |
148 | 169 | ||
149 | System.out.println("!!!!!!!!!!!!!!row:"+row); |
170 | System.out.println("!!!!!!!!!!!!!!row:"+row); |
150 | if (select_mode) |
171 | if (select_mode) |
151 | { |
172 | { |
152 | canvas.act_menu_select=row; |
173 | canvas.act_menu_select=row; |
153 | keypress (-4242,Canvas.FIRE); |
174 | keypress (-4242,Canvas.FIRE); |
154 | 175 | ||
155 | } |
176 | } |
156 | else |
177 | else |
157 | { |
178 | { |
158 | if ((row%2)==0) |
179 | if ((row%2)==0) |
159 | act_y=row+1; |
180 | act_y=row+1; |
160 | else |
181 | else |
161 | { |
182 | { |
162 | act_y=row; |
183 | act_y=row; |
163 | 184 | ||
164 | if (act_y==(canvas.lcd_lines.length-1)) |
185 | if (act_y==(canvas.lcd_lines.length-1)) |
165 | keypress (-4242,Canvas.FIRE); |
186 | keypress (-4242,Canvas.FIRE); |
166 | else |
187 | else |
167 | { |
188 | { |
168 | if (x<(canvas.canvas_width/2)) |
189 | if (x<(canvas.canvas_width/2)) |
169 | keypress (-4242,Canvas.LEFT); |
190 | keypress (-4242,Canvas.LEFT); |
170 | else |
191 | else |
171 | keypress (-4242,Canvas.RIGHT); |
192 | keypress (-4242,Canvas.RIGHT); |
172 | } |
193 | } |
173 | } |
194 | } |
174 | } |
195 | } |
175 | } |
196 | } |
176 | 197 | ||
177 | 198 | ||
178 | public void keypress (int keyCode,int action) |
199 | public void keypress (int keyCode,int action) |
179 | { |
200 | { |
180 | 201 | ||
181 | if (select_mode) |
202 | if (select_mode) |
182 | { |
203 | { |
183 | if (action== Canvas.FIRE) |
204 | if (action== Canvas.FIRE) |
184 | { |
205 | { |
185 | 206 | ||
186 | if (canvas.act_menu_select==(menu_items.length-1)) |
207 | if (canvas.act_menu_select==(menu_items.length-1)) |
187 | canvas.chg_state(nextstate); |
208 | canvas.chg_state(nextstate); |
188 | else |
209 | else |
189 | 210 | ||
190 | { |
211 | { |
191 | act_tab=canvas.act_menu_select; |
212 | act_tab=canvas.act_menu_select; |
192 | select_mode=false; |
213 | select_mode=false; |
193 | act_y=1; |
214 | act_y=1; |
194 | } |
215 | } |
195 | } |
216 | } |
196 | else |
217 | else |
197 | canvas.menu_keypress(keyCode); |
218 | canvas.menu_keypress(keyCode); |
198 | } |
219 | } |
199 | else |
220 | else |
200 | { |
221 | { |
201 | 222 | ||
202 | 223 | ||
203 | if ((act_y!=(act_lcd_lines-1))&&(((keyCode >= Canvas.KEY_NUM0) && (keyCode <= Canvas.KEY_NUM9))|| ( keyCode==KEYCODE_CLEAR))) |
224 | if ((act_y!=(act_lcd_lines-1))&&(((keyCode >= Canvas.KEY_NUM0) && (keyCode <= Canvas.KEY_NUM9))|| ( keyCode==KEYCODE_CLEAR))) |
204 | { |
225 | { |
205 | int act_pos=act_y/2; |
226 | int act_pos=act_y/2; |
206 | if((edit_source.field_types[act_tab][act_pos]==edit_source.PARAMTYPE_BYTE)) |
227 | if((edit_source.field_types[act_tab][act_pos]==edit_source.PARAMTYPE_BYTE)||(edit_source.field_types[act_tab][act_pos]==edit_source.PARAMTYPE_MKBYTE) ||(edit_source.field_types[act_tab][act_pos]==edit_source.PARAMTYPE_BITMASK)) |
207 | { |
228 | { |
208 | if ((keyCode >= Canvas.KEY_NUM0) && (keyCode <= Canvas.KEY_NUM9)) |
229 | if ((keyCode >= Canvas.KEY_NUM0) && (keyCode <= Canvas.KEY_NUM9)) |
209 | { |
230 | { |
210 | if((editing_number)&&( Math.abs(edit_source.get_field_from_act(edit_source.field_positions[act_tab][act_pos]))*10+(keyCode - Canvas.KEY_NUM0)<1000)) |
231 | if((editing_number)&&( Math.abs(edit_source.get_field_from_act(edit_source.field_positions[act_tab][act_pos]))*10+(keyCode - Canvas.KEY_NUM0)<1000)) |
211 | edit_source.set_field_from_act(edit_source.field_positions[act_tab][act_pos] , Math.abs(edit_source.get_field_from_act(edit_source.field_positions[act_tab][act_pos]))*10+(keyCode - Canvas.KEY_NUM0)); |
232 | edit_source.set_field_from_act(edit_source.field_positions[act_tab][act_pos] , Math.abs(edit_source.get_field_from_act(edit_source.field_positions[act_tab][act_pos]))*10+(keyCode - Canvas.KEY_NUM0)); |
212 | else |
233 | else |
213 | edit_source.set_field_from_act(edit_source.field_positions[act_tab][act_pos] , (keyCode - Canvas.KEY_NUM0)); |
234 | edit_source.set_field_from_act(edit_source.field_positions[act_tab][act_pos] , (keyCode - Canvas.KEY_NUM0)); |
214 | editing_number=true; |
235 | editing_number=true; |
215 | return; |
236 | return; |
216 | } |
237 | } |
217 | else |
238 | else |
218 | if ( keyCode==KEYCODE_CLEAR) |
239 | if ( keyCode==KEYCODE_CLEAR) |
219 | edit_source.set_field_from_act(edit_source.field_positions[act_tab][act_pos],0); |
240 | edit_source.set_field_from_act(edit_source.field_positions[act_tab][act_pos],0); |
220 | } |
241 | } |
221 | editing_number=false; |
242 | editing_number=false; |
222 | 243 | ||
223 | } |
244 | } |
224 | 245 | ||
225 | switch (action) |
246 | switch (action) |
226 | { |
247 | { |
227 | 248 | ||
228 | case Canvas.DOWN: |
249 | case Canvas.DOWN: |
229 | if (act_y<(act_lcd_lines-2)) act_y+=2; |
250 | if (act_y<(act_lcd_lines-2)) act_y+=2; |
230 | else act_y=1; |
251 | else act_y=1; |
231 | break; |
252 | break; |
232 | 253 | ||
233 | case Canvas.UP: |
254 | case Canvas.UP: |
234 | if (act_y!=1) act_y-=2; |
255 | if (act_y!=1) act_y-=2; |
235 | else act_y=act_lcd_lines-1; |
256 | else act_y=act_lcd_lines-1; |
236 | break; |
257 | break; |
237 | 258 | ||
238 | default: |
259 | default: |
239 | 260 | ||
240 | 261 | ||
241 | 262 | ||
242 | if (act_y!=(act_lcd_lines-1)) |
263 | if (act_y!=(act_lcd_lines-1)) |
243 | { |
264 | { |
244 | 265 | ||
245 | // |
266 | // |
246 | 267 | ||
247 | int act_pos=act_y/2; |
268 | int act_pos=act_y/2; |
248 | 269 | ||
249 | if((edit_source.field_types[act_tab][act_pos]==edit_source.PARAMTYPE_KEY)) |
270 | if((edit_source.field_types[act_tab][act_pos]==edit_source.PARAMTYPE_KEY)) |
250 | edit_source.set_field_from_act(edit_source.field_positions[act_tab][act_pos],keyCode); |
271 | edit_source.set_field_from_act(edit_source.field_positions[act_tab][act_pos],keyCode); |
251 | 272 | ||
252 | switch (action) |
273 | switch (action) |
253 | { |
274 | { |
254 | 275 | ||
255 | case Canvas.RIGHT: |
276 | case Canvas.RIGHT: |
256 | switch(edit_source.field_types[act_tab][act_pos]) |
277 | switch(edit_source.field_types[act_tab][act_pos]) |
257 | { |
278 | { |
258 | case PARAMTYPE_BITSWITCH: |
279 | case PARAMTYPE_BITSWITCH: |
259 | 280 | ||
260 | edit_source.field_from_act_xor((edit_source.field_positions[act_tab][act_pos]/8),1<<(edit_source.field_positions[act_tab][act_pos]%8)); |
281 | edit_source.field_from_act_xor((edit_source.field_positions[act_tab][act_pos]/8),1<<(edit_source.field_positions[act_tab][act_pos]%8)); |
261 | break; |
282 | break; |
262 | - | ||
- | 283 | ||
- | 284 | case PARAMTYPE_BITMASK: |
|
263 | 285 | case PARAMTYPE_MKBYTE: |
|
264 | case PARAMTYPE_BYTE: |
- | |
- | 286 | case PARAMTYPE_BYTE: |
|
- | 287 | ||
- | 288 | ||
- | 289 | edit_source.field_from_act_add_min_max(edit_source.field_positions[act_tab][act_pos],1,0,255); |
|
265 | case PARAMTYPE_STICK: |
290 | break; |
266 | 291 | case PARAMTYPE_STICK: |
|
267 | edit_source.field_from_act_add(edit_source.field_positions[act_tab][act_pos],1); |
292 | edit_source.field_from_act_add_min_max(edit_source.field_positions[act_tab][act_pos],1,0,10); |
268 | break; |
293 | break; |
269 | 294 | ||
270 | default: |
295 | default: |
271 | edit_source.field_from_act_add_mod(edit_source.field_positions[act_tab][act_pos],1,edit_source.choice_strings[edit_source.field_types[act_tab][act_pos]-PARAMTYPE_CHOICE].length); |
296 | edit_source.field_from_act_add_mod(edit_source.field_positions[act_tab][act_pos],1,edit_source.choice_strings[edit_source.field_types[act_tab][act_pos]-PARAMTYPE_CHOICE].length); |
272 | break; |
297 | break; |
273 | } |
298 | } |
274 | break; |
299 | break; |
275 | 300 | ||
276 | case Canvas.LEFT: |
301 | case Canvas.LEFT: |
277 | switch(edit_source.field_types[act_tab][act_pos]) |
302 | switch(edit_source.field_types[act_tab][act_pos]) |
278 | { |
303 | { |
279 | case PARAMTYPE_BITSWITCH: |
304 | case PARAMTYPE_BITSWITCH: |
280 | edit_source.field_from_act_xor((edit_source.field_positions[act_tab][act_pos]/8),1<<(edit_source.field_positions[act_tab][act_pos]%8)); |
305 | edit_source.field_from_act_xor((edit_source.field_positions[act_tab][act_pos]/8),1<<(edit_source.field_positions[act_tab][act_pos]%8)); |
281 | 306 | ||
282 | break; |
307 | break; |
- | 308 | case PARAMTYPE_BITMASK: |
|
- | 309 | case PARAMTYPE_MKBYTE: |
|
283 | case PARAMTYPE_BYTE: |
310 | case PARAMTYPE_BYTE: |
- | 311 | edit_source.field_from_act_add_min_max(edit_source.field_positions[act_tab][act_pos],-1,0,255); |
|
- | 312 | break; |
|
284 | case PARAMTYPE_STICK: |
313 | case PARAMTYPE_STICK: |
285 | edit_source.field_from_act_add(edit_source.field_positions[act_tab][act_pos],-1); |
314 | edit_source.field_from_act_add_min_max(edit_source.field_positions[act_tab][act_pos],-1,0,10); |
286 | break; |
315 | break; |
287 | default: |
316 | default: |
288 | edit_source.field_from_act_add_mod(edit_source.field_positions[act_tab][act_pos],1,edit_source.choice_strings[edit_source.field_types[act_tab][act_pos]-PARAMTYPE_CHOICE].length); |
317 | edit_source.field_from_act_add_mod(edit_source.field_positions[act_tab][act_pos],1,edit_source.choice_strings[edit_source.field_types[act_tab][act_pos]-PARAMTYPE_CHOICE].length); |
289 | break; |
318 | break; |
290 | } |
319 | } |
291 | 320 | ||
292 | 321 | ||
293 | break; |
322 | break; |
294 | } |
323 | } |
295 | 324 | ||
296 | } |
325 | } |
297 | else |
326 | else |
298 | if (action== Canvas.FIRE) |
327 | if (action== Canvas.FIRE) |
299 | { |
328 | { |
300 | act_y=1; |
329 | act_y=1; |
301 | // canvas.act_menu_select=0; |
330 | // canvas.act_menu_select=0; |
302 | canvas.menu_items[0]=""; |
331 | canvas.menu_items[0]=""; |
303 | select_mode=true; |
332 | select_mode=true; |
304 | 333 | ||
305 | } |
334 | } |
306 | } |
335 | } |
307 | 336 | ||
308 | 337 | ||
309 | // if (!select_mode)refresh_lcd(); |
338 | // if (!select_mode)refresh_lcd(); |
310 | 339 | ||
311 | } |
340 | } |
312 | } // keypress |
341 | } // keypress |
313 | } |
342 | } |
314 | 343 | ||
315 | 344 |