Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 221 → Rev 222

/DUBwise/trunk/j2me/src/DUBwiseSettings.java
40,7 → 40,14
public boolean do_scrollbg=false;
public boolean expert_mode=false;
 
//#if devicecontrol=="on"
public boolean keep_lighton=false;
//#endif
 
int[] act_proxy_ip=default_ip; // { ip , ip , ip , ip , port }
int[] act_conn_ip=default_ip; // { ip , ip , ip , ip , port }
 
 
public byte gps_format=GPS_FORMAT_DECIMAL;
public byte speed_format=SPEED_FORMAT_KMH;
 
60,77 → 67,95
set_field_from_act(1,settings_field[1]^1);
// if (fullscreen)canvas.setFullScreenMode(true);
}
 
public final static int SETTINGS_POS_SKIN=0;
public final static int SETTINGS_POS_BITFIELD1=1;
public final static int SETTINGS_POS_GPS_FORMAT=2;
public final static int SETTINGS_POS_SPEED_FORMAT=3;
public final static int SETTINGS_POS_EXTERN_NICK=4;
public final static int SETTINGS_POS_EXTERN_ROLL=5;
public final static int SETTINGS_POS_EXTERN_GIER=6;
public final static int SETTINGS_POS_EXTERN_GAS=7;
public final static int SETTINGS_POS_EXTERN_HIGHT=8;
public final static int SETTINGS_POS_KEY_BACK=9;
public final static int SETTINGS_POS_KEY_FULL=10;
public final static int SETTINGS_POS_KEY_CLEAR=11;
 
 
public void field2setting(int pos,int val)
{
if (pos==0)
if (pos==SETTINGS_POS_SKIN)
{
act_skin=(byte)val;
canvas.load_skin_images();
}
 
if ((pos==1)&&((val&1)==1)&&(!fullscreen))
if ((pos==SETTINGS_POS_BITFIELD1)&&((val&1)==1)&&(!fullscreen))
{
fullscreen=true;
canvas.setFullScreenMode(fullscreen);
}
 
if ((pos==1)&&((val&1)==0)&&(fullscreen))
if ((pos==SETTINGS_POS_BITFIELD1)&&((val&1)==0)&&(fullscreen))
{
fullscreen=false;
canvas.setFullScreenMode(fullscreen);
}
 
if ((pos==1)&&((val&2)==2)&&(!do_scrollbg))
if ((pos==SETTINGS_POS_BITFIELD1)&&((val&2)==2)&&(!do_scrollbg))
{
do_scrollbg=true;
canvas.load_skin_images();
}
 
if ((pos==1)&&((val&2)==0)&&(do_scrollbg))
if ((pos==SETTINGS_POS_BITFIELD1)&&((val&2)==0)&&(do_scrollbg))
{
do_scrollbg=false;
canvas.load_skin_images();
}
if (pos==1)
if (pos==SETTINGS_POS_BITFIELD1)
do_sound=((val&4)!=0);
 
if (pos==1)
if (pos==SETTINGS_POS_BITFIELD1)
do_vibra=((val&8)!=0);
 
if (pos==1)
if (pos==SETTINGS_POS_BITFIELD1)
expert_mode=((val&16)!=0);
 
if (pos==2)
if (pos==SETTINGS_POS_BITFIELD1)
keep_lighton=((val&32)!=0);
 
if (pos==SETTINGS_POS_GPS_FORMAT)
gps_format=(byte)val;
 
if (pos==3)
if (pos==SETTINGS_POS_SPEED_FORMAT)
speed_format=(byte)val;
 
if (pos==4)
if (pos==SETTINGS_POS_EXTERN_NICK)
default_extern_control[EXTERN_CONTROL_NICK]=(byte)val;
 
if (pos==5)
if (pos==SETTINGS_POS_EXTERN_ROLL)
default_extern_control[EXTERN_CONTROL_ROLL]=(byte)val;
 
if (pos==6)
if (pos==SETTINGS_POS_EXTERN_GIER)
default_extern_control[EXTERN_CONTROL_GIER]=(byte)val;
 
if (pos==7)
if (pos==SETTINGS_POS_EXTERN_GAS)
default_extern_control[EXTERN_CONTROL_GAS]=(byte)val;
 
if (pos==8)
if (pos==SETTINGS_POS_EXTERN_HIGHT)
default_extern_control[EXTERN_CONTROL_HIGHT]=(byte)val;
 
 
if (pos==9)
if (pos==SETTINGS_POS_KEY_BACK)
key_back=val;
 
if (pos==10)
if (pos==SETTINGS_POS_KEY_FULL)
key_fullscreen=val;
 
if (pos==11)
if (pos==SETTINGS_POS_KEY_CLEAR)
key_clear=val;
 
if (pos==12)
140,22 → 165,28
 
public byte[] default_extern_control;//=default_extern_keycontrol ;
 
//#if devicecontrol=="on"
public boolean keep_lighton=false;
//#endif
 
int[] act_proxy_ip=default_ip; // { ip , ip , ip , ip , port }
int[] act_conn_ip=default_ip; // { ip , ip , ip , ip , port }
 
/* end of all settings hold here */
 
public String[] _tab_names={"User Interface","GPS","Keycontrol","Special Keys","Other" };
 
public String[][] _field_names={ { "Skin","Fullscreen","Scroll Background" } , {"GPS Format","Speed Format"},{"Nick","Roll","Gier","Gas Increase","Height Increase"},{"Back","Fullscreen","Clear"},{"Sound","Vibra","Remote Cam Stick","Expert-Mode"} };
public String[][] _field_names={ { "Skin","Fullscreen","Scroll Background"
//#if devicecontrol=="on"
,"Permanent Light"
//#endif
} , {"GPS Format","Speed Format"},{"Nick","Roll","Gier","Gas Increase","Height Increase"},{"Back","Fullscreen","Clear"},{"Sound","Vibra","Remote Cam Stick","Expert-Mode"} };
 
public String[][] _choice_strings={ { "Dark","Light" } , {"km/h","mp/h","cm/s"},{"decimal","min sec"}} ;
public int[][] _field_positions={ {0,8,9} , {2,3} , {4,5,6,7,8} , {9,10,11}, {10,11,12,12}};
public int[][] _field_types={ {PARAMTYPE_CHOICE+0,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH} , {PARAMTYPE_CHOICE+1,PARAMTYPE_CHOICE+2} , {PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE}, {PARAMTYPE_KEY,PARAMTYPE_KEY,PARAMTYPE_KEY} , {PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_STICK,PARAMTYPE_BITSWITCH}};
public int[][] _field_positions={ {SETTINGS_POS_SKIN,8,9
//#if devicecontrol=="on"
,13
//#endif
} , {2,3} , {4,5,6,7,8} , {9,10,11}, {10,11,12,12}};
public int[][] _field_types={ {PARAMTYPE_CHOICE+0,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH
//#if devicecontrol=="on"
,PARAMTYPE_BITSWITCH
//#endif
} , {PARAMTYPE_CHOICE+1,PARAMTYPE_CHOICE+2} , {PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE}, {PARAMTYPE_KEY,PARAMTYPE_KEY,PARAMTYPE_KEY} , {PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_STICK,PARAMTYPE_BITSWITCH}};
DUBwiseCanvas canvas;