Rev 266 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 266 | Rev 382 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | 24 | ||
Line 25... | Line 25... | ||
25 | public String[] menu_items; |
25 | public String[] menu_items; |
Line -... | Line 26... | ||
- | 26 | ||
- | 27 | org.ligi.ufo.ParamsClass edit_source; |
|
- | 28 | ||
Line 26... | Line 29... | ||
26 | 29 | boolean select_mode; |
|
27 | org.ligi.ufo.ParamsClass edit_source; |
30 | |
28 | 31 | ||
29 | 32 | ||
Line 30... | Line 33... | ||
30 | public MKParamsEditor(DUBwiseCanvas _canvas,org.ligi.ufo.ParamsClass _edit_source,byte _nextstate) |
33 | public MKParamsEditor(DUBwiseCanvas _canvas,org.ligi.ufo.ParamsClass _edit_source,byte _nextstate) |
31 | { |
34 | { |
- | 35 | nextstate=_nextstate; |
|
- | 36 | edit_source=_edit_source; |
|
- | 37 | ||
- | 38 | canvas=_canvas; |
|
32 | nextstate=_nextstate; |
39 | lcd_lines=new String[40]; |
33 | edit_source=_edit_source; |
40 | |
Line 34... | Line -... | ||
34 | - | ||
35 | canvas=_canvas; |
- | |
Line 36... | Line 41... | ||
36 | lcd_lines=new String[40]; |
41 | |
37 | // refresh_lcd(); |
42 | System.out.println("initing params_editor"); |
38 | } |
43 | select_mode=(edit_source.tab_stringids!=null); |
39 | 44 | // refresh_lcd(); |
|
Line 68... | Line 73... | ||
68 | 73 | ||
69 | public void refresh_lcd() |
74 | public void refresh_lcd() |
Line 70... | Line 75... | ||
70 | { |
75 | { |
71 | 76 | ||
Line 72... | Line 77... | ||
72 | try { |
77 | try { |
73 | act_lcd_lines=edit_source.field_stringids[act_tab].length*2+2; |
78 | act_lcd_lines=edit_source.field_types[act_tab].length*2+2; |
Line 74... | Line 79... | ||
74 | 79 | ||
Line 75... | Line 80... | ||
75 | for ( int i=0;i<act_lcd_lines;i++) |
80 | for ( int i=0;i<act_lcd_lines;i++) |
76 | lcd_lines[i]=""; |
81 | lcd_lines[i]=""; |
- | 82 | ||
77 | 83 | ||
78 | 84 | ||
- | 85 | // lcd_lines[0]=(act_tab==0?" ":"< ") + edit_source.tab_stringids[act_tab] + (act_tab==(edit_source.tab_stringids.length-1)?" ":" >"); |
|
79 | 86 | ||
80 | // lcd_lines[0]=(act_tab==0?" ":"< ") + edit_source.tab_stringids[act_tab] + (act_tab==(edit_source.tab_stringids.length-1)?" ":" >"); |
87 | for (int i=0;i<edit_source.field_types[act_tab].length;i++) |
81 | 88 | { |
|
82 | for (int i=0;i<edit_source.field_stringids[act_tab].length;i++) |
89 | if (edit_source.field_stringids!=null) |
83 | { |
90 | lcd_lines[2*i]=canvas.l(edit_source.field_stringids[act_tab][i]); |
Line 162... | Line 169... | ||
162 | 169 | ||
Line 163... | Line 170... | ||
163 | public final static int KEYCODE_CLEAR=-8; |
170 | public final static int KEYCODE_CLEAR=-8; |
Line 164... | Line 171... | ||
164 | 171 | ||
165 | public boolean editing_number=false; |
172 | public boolean editing_number=false; |
- | 173 | ||
- | 174 | public void pointer_press(int x,byte row) |
|
- | 175 | { |
|
- | 176 | ||
166 | 177 | ||
167 | public void pointer_press(int x,int row) |
178 | |
- | 179 | System.out.println("pointer row " + row + " lcd_off" + canvas.lcd_off); |
|
168 | { |
180 | if (select_mode) |
- | 181 | { |
|
169 | if (select_mode) |
182 | if (canvas.act_menu_select!=row) |
Line 170... | Line 183... | ||
170 | { |
183 | canvas.act_menu_select=row; |
171 | canvas.act_menu_select=row; |
184 | else |
172 | keypress (-4242,Canvas.FIRE); |
185 | keypress (-4242,Canvas.FIRE); |
173 | 186 | ||
174 | } |
187 | } |
175 | else |
188 | else |
176 | { |
189 | { |
177 | if ((row%2)==0) |
190 | if ((row%2)==0) |
Line -... | Line 191... | ||
- | 191 | act_y=row+1; |
|
178 | act_y=row+1; |
192 | else |
179 | else |
193 | { |
180 | { |
194 | act_y=row; |
181 | act_y=row; |
195 | |
182 | 196 | System.out.println("y:" + act_y); |
|
Line 194... | Line 208... | ||
194 | } |
208 | } |
Line 195... | Line 209... | ||
195 | 209 | ||
196 | 210 | ||
197 | public void keypress (int keyCode,int action) |
- | |
198 | { |
211 | public void keypress (int keyCode,int action) |
199 | 212 | { |
|
200 | if (select_mode) |
213 | if (select_mode) |
201 | { |
214 | { |
Line 325... | Line 338... | ||
325 | if (action== Canvas.FIRE) |
338 | if (action== Canvas.FIRE) |
326 | { |
339 | { |
327 | act_y=1; |
340 | act_y=1; |
328 | // canvas.act_menu_select=0; |
341 | // canvas.act_menu_select=0; |
329 | canvas.menu_items[0]=""; |
342 | canvas.menu_items[0]=""; |
330 | select_mode=true; |
- | |
Line -... | Line 343... | ||
- | 343 | ||
- | 344 | if (edit_source.tab_stringids==null) |
|
- | 345 | canvas.chg_state(nextstate); |
|
- | 346 | else |
|
331 | 347 | select_mode=true; |
|
332 | } |
348 | } |
Line 333... | Line 349... | ||
333 | } |
349 | } |