Rev 221 | Rev 229 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 221 | Rev 222 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | public boolean do_sound=true; |
38 | public boolean do_sound=true; |
39 | public boolean fullscreen=false; |
39 | public boolean fullscreen=false; |
40 | public boolean do_scrollbg=false; |
40 | public boolean do_scrollbg=false; |
41 | public boolean expert_mode=false; |
41 | public boolean expert_mode=false; |
Line -... | Line 42... | ||
- | 42 | ||
- | 43 | //#if devicecontrol=="on" |
|
- | 44 | public boolean keep_lighton=false; |
|
- | 45 | //#endif |
|
- | 46 | ||
- | 47 | int[] act_proxy_ip=default_ip; // { ip , ip , ip , ip , port } |
|
- | 48 | int[] act_conn_ip=default_ip; // { ip , ip , ip , ip , port } |
|
Line 42... | Line 49... | ||
42 | 49 | ||
43 | 50 | ||
Line 58... | Line 65... | ||
58 | { |
65 | { |
59 | // fullscreen=!fullscreen; |
66 | // fullscreen=!fullscreen; |
60 | set_field_from_act(1,settings_field[1]^1); |
67 | set_field_from_act(1,settings_field[1]^1); |
61 | // if (fullscreen)canvas.setFullScreenMode(true); |
68 | // if (fullscreen)canvas.setFullScreenMode(true); |
62 | } |
69 | } |
- | 70 | ||
- | 71 | public final static int SETTINGS_POS_SKIN=0; |
|
- | 72 | public final static int SETTINGS_POS_BITFIELD1=1; |
|
- | 73 | public final static int SETTINGS_POS_GPS_FORMAT=2; |
|
- | 74 | public final static int SETTINGS_POS_SPEED_FORMAT=3; |
|
- | 75 | public final static int SETTINGS_POS_EXTERN_NICK=4; |
|
- | 76 | public final static int SETTINGS_POS_EXTERN_ROLL=5; |
|
- | 77 | public final static int SETTINGS_POS_EXTERN_GIER=6; |
|
- | 78 | public final static int SETTINGS_POS_EXTERN_GAS=7; |
|
- | 79 | public final static int SETTINGS_POS_EXTERN_HIGHT=8; |
|
- | 80 | public final static int SETTINGS_POS_KEY_BACK=9; |
|
- | 81 | public final static int SETTINGS_POS_KEY_FULL=10; |
|
- | 82 | public final static int SETTINGS_POS_KEY_CLEAR=11; |
|
- | 83 | ||
- | 84 | ||
63 | public void field2setting(int pos,int val) |
85 | public void field2setting(int pos,int val) |
64 | { |
86 | { |
Line 65... | Line 87... | ||
65 | 87 | ||
66 | if (pos==0) |
88 | if (pos==SETTINGS_POS_SKIN) |
67 | { |
89 | { |
68 | act_skin=(byte)val; |
90 | act_skin=(byte)val; |
69 | canvas.load_skin_images(); |
91 | canvas.load_skin_images(); |
Line 70... | Line 92... | ||
70 | } |
92 | } |
71 | 93 | ||
72 | if ((pos==1)&&((val&1)==1)&&(!fullscreen)) |
94 | if ((pos==SETTINGS_POS_BITFIELD1)&&((val&1)==1)&&(!fullscreen)) |
73 | { |
95 | { |
74 | fullscreen=true; |
96 | fullscreen=true; |
Line 75... | Line 97... | ||
75 | canvas.setFullScreenMode(fullscreen); |
97 | canvas.setFullScreenMode(fullscreen); |
76 | } |
98 | } |
77 | 99 | ||
78 | if ((pos==1)&&((val&1)==0)&&(fullscreen)) |
100 | if ((pos==SETTINGS_POS_BITFIELD1)&&((val&1)==0)&&(fullscreen)) |
79 | { |
101 | { |
Line 80... | Line 102... | ||
80 | fullscreen=false; |
102 | fullscreen=false; |
81 | canvas.setFullScreenMode(fullscreen); |
103 | canvas.setFullScreenMode(fullscreen); |
82 | } |
104 | } |
83 | 105 | ||
84 | if ((pos==1)&&((val&2)==2)&&(!do_scrollbg)) |
106 | if ((pos==SETTINGS_POS_BITFIELD1)&&((val&2)==2)&&(!do_scrollbg)) |
Line 85... | Line 107... | ||
85 | { |
107 | { |
86 | do_scrollbg=true; |
108 | do_scrollbg=true; |
87 | canvas.load_skin_images(); |
109 | canvas.load_skin_images(); |
88 | } |
110 | } |
89 | 111 | ||
Line 90... | Line 112... | ||
90 | if ((pos==1)&&((val&2)==0)&&(do_scrollbg)) |
112 | if ((pos==SETTINGS_POS_BITFIELD1)&&((val&2)==0)&&(do_scrollbg)) |
91 | { |
113 | { |
Line 92... | Line 114... | ||
92 | do_scrollbg=false; |
114 | do_scrollbg=false; |
93 | canvas.load_skin_images(); |
115 | canvas.load_skin_images(); |
Line 94... | Line 116... | ||
94 | } |
116 | } |
95 | 117 | ||
Line 96... | Line 118... | ||
96 | if (pos==1) |
118 | if (pos==SETTINGS_POS_BITFIELD1) |
- | 119 | do_sound=((val&4)!=0); |
|
- | 120 | ||
- | 121 | if (pos==SETTINGS_POS_BITFIELD1) |
|
97 | do_sound=((val&4)!=0); |
122 | do_vibra=((val&8)!=0); |
Line 98... | Line 123... | ||
98 | 123 | ||
99 | if (pos==1) |
124 | if (pos==SETTINGS_POS_BITFIELD1) |
Line 100... | Line 125... | ||
100 | do_vibra=((val&8)!=0); |
125 | expert_mode=((val&16)!=0); |
101 | 126 | ||
Line 102... | Line 127... | ||
102 | if (pos==1) |
127 | if (pos==SETTINGS_POS_BITFIELD1) |
103 | expert_mode=((val&16)!=0); |
128 | keep_lighton=((val&32)!=0); |
Line 104... | Line 129... | ||
104 | 129 | ||
105 | if (pos==2) |
130 | if (pos==SETTINGS_POS_GPS_FORMAT) |
Line 106... | Line 131... | ||
106 | gps_format=(byte)val; |
131 | gps_format=(byte)val; |
107 | 132 | ||
Line 108... | Line 133... | ||
108 | if (pos==3) |
133 | if (pos==SETTINGS_POS_SPEED_FORMAT) |
109 | speed_format=(byte)val; |
134 | speed_format=(byte)val; |
Line 110... | Line 135... | ||
110 | 135 | ||
111 | if (pos==4) |
136 | if (pos==SETTINGS_POS_EXTERN_NICK) |
Line 112... | Line 137... | ||
112 | default_extern_control[EXTERN_CONTROL_NICK]=(byte)val; |
137 | default_extern_control[EXTERN_CONTROL_NICK]=(byte)val; |
113 | 138 | ||
Line 114... | Line 139... | ||
114 | if (pos==5) |
139 | if (pos==SETTINGS_POS_EXTERN_ROLL) |
115 | default_extern_control[EXTERN_CONTROL_ROLL]=(byte)val; |
140 | default_extern_control[EXTERN_CONTROL_ROLL]=(byte)val; |
Line 116... | Line 141... | ||
116 | 141 | ||
117 | if (pos==6) |
142 | if (pos==SETTINGS_POS_EXTERN_GIER) |
118 | default_extern_control[EXTERN_CONTROL_GIER]=(byte)val; |
143 | default_extern_control[EXTERN_CONTROL_GIER]=(byte)val; |
Line 119... | Line 144... | ||
119 | 144 | ||
Line 120... | Line -... | ||
120 | if (pos==7) |
- | |
121 | default_extern_control[EXTERN_CONTROL_GAS]=(byte)val; |
- | |
122 | - | ||
123 | if (pos==8) |
- | |
124 | default_extern_control[EXTERN_CONTROL_HIGHT]=(byte)val; |
- | |
125 | - | ||
Line 126... | Line 145... | ||
126 | 145 | if (pos==SETTINGS_POS_EXTERN_GAS) |
|
Line 127... | Line 146... | ||
127 | if (pos==9) |
146 | default_extern_control[EXTERN_CONTROL_GAS]=(byte)val; |
Line -... | Line 147... | ||
- | 147 | ||
- | 148 | if (pos==SETTINGS_POS_EXTERN_HIGHT) |
|
- | 149 | default_extern_control[EXTERN_CONTROL_HIGHT]=(byte)val; |
|
- | 150 | ||
128 | key_back=val; |
151 | |
Line 129... | Line 152... | ||
129 | 152 | if (pos==SETTINGS_POS_KEY_BACK) |
|
- | 153 | key_back=val; |
|
- | 154 | ||
- | 155 | if (pos==SETTINGS_POS_KEY_FULL) |
|
- | 156 | key_fullscreen=val; |
|
130 | if (pos==10) |
157 | |
- | 158 | if (pos==SETTINGS_POS_KEY_CLEAR) |
|
- | 159 | key_clear=val; |
|
- | 160 | ||
- | 161 | if (pos==12) |
|
131 | key_fullscreen=val; |
162 | remote_cam_stick=val; |
132 | 163 | } |
|
Line 133... | Line 164... | ||
133 | if (pos==11) |
164 | |
134 | key_clear=val; |
165 |