ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/pclient
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/pclient (file contents):
Revision 1.158 by elmex, Sat Apr 22 12:14:45 2006 UTC vs.
Revision 1.163 by root, Sun Apr 23 00:57:40 2006 UTC

126 my ($self, $value) = @_; 126 my ($self, $value) = @_;
127 $CFG->{fullscreen} = $value; 127 $CFG->{fullscreen} = $value;
128 }); 128 });
129 129
130 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fast & Ugly"); 130 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fast & Ugly");
131 $table->add (1, $row++, new CFClient::UI::CheckBox state => $CFG->{fast}, connect_changed => sub { 131 $table->add (1, $row++, new CFClient::UI::CheckBox
132 state => $CFG->{fast},
133 tooltip => "Lower the visual quality considerably to speed up rendering.",
134 connect_changed => sub {
132 my ($self, $value) = @_; 135 my ($self, $value) = @_;
133 $CFG->{fast} = $value; 136 $CFG->{fast} = $value;
137 }
134 }); 138 );
135 139
136 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fog of War"); 140 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Fog of War");
137 $table->add (1, $row++, new CFClient::UI::CheckBox state => $CFG->{fow_enable}, connect_changed => sub { 141 $table->add (1, $row++, new CFClient::UI::CheckBox
142 state => $CFG->{fow_enable},
143 tooltip => "Fog-of-War marks areas that cannot be seen by the player",
144 connect_changed => sub {
138 my ($self, $value) = @_; 145 my ($self, $value) = @_;
139 $CFG->{fow_enable} = $value; 146 $CFG->{fow_enable} = $value;
147 }
140 }); 148 );
141 149
142 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "FoW Intensity"); 150 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "FoW Intensity");
143 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{fow_intensity}, 0, 1 + 0.001, 0.001], connect_changed => sub { 151 $table->add (1, $row++, new CFClient::UI::Slider
152 range => [$CFG->{fow_intensity}, 0, 1 + 0.001, 0.001],
153 tooltip => "The higher the intensity, the lighter the Fog-of-War color",
154 connect_changed => sub {
144 my ($self, $value) = @_; 155 my ($self, $value) = @_;
145 $CFG->{fow_intensity} = $value; 156 $CFG->{fow_intensity} = $value;
157 }
146 }); 158 );
147 159
148 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "FoW Smooth"); 160 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "FoW Smooth");
149 $table->add (1, $row++, new CFClient::UI::CheckBox state => $CFG->{fow_smooth}, connect_changed => sub { 161 $table->add (1, $row++, new CFClient::UI::CheckBox
162 state => $CFG->{fow_smooth},
163 tooltip => "Smooth the Fog-of-War a bit to make it more realistic",
164 connect_changed => sub {
150 my ($self, $value) = @_; 165 my ($self, $value) = @_;
151 $CFG->{fow_smooth} = $value; 166 $CFG->{fow_smooth} = $value;
152 status "Fog of War smoothing requires OpenGL 1.2 or higher" if $CFClient::GL_VERSION < 1.2; 167 status "Fog of War smoothing requires OpenGL 1.2 or higher" if $CFClient::GL_VERSION < 1.2;
168 }
153 }); 169 );
154 170
155 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "GUI Fontsize"); 171 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "GUI Fontsize");
156 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{gui_fontsize}, 0.7, 1.7, 0.1], connect_changed => sub { 172 $table->add (1, $row++, new CFClient::UI::Slider
173 range => [$CFG->{gui_fontsize}, 0.5, 2, 0.1],
174 tooltip => "The font size used by most GUI elements",
175 connect_changed => sub {
157 $CFG->{gui_fontsize} = 0.1 * int $_[1] * 10; 176 $CFG->{gui_fontsize} = 0.1 * int $_[1] * 10;
158# $FONTSIZE = int $HEIGHT / 40 * $CFG->{gui_fontsize}; 177# $FONTSIZE = int $HEIGHT / 40 * $CFG->{gui_fontsize};
178 }
159 }); 179 );
160 180
161 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Server Log Fontsize"); 181 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Server Log Fontsize");
162 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{log_fontsize}, 0.7, 1.7, 0.1], connect_changed => sub { 182 $table->add (1, $row++, new CFClient::UI::Slider
183 range => [$CFG->{log_fontsize}, 0.5, 2, 0.1],
184 tooltip => "The font size used by the server log window only",
185 connect_changed => sub {
163 $LOGVIEW->set_fontsize ($CFG->{log_fontsize} = 0.1 * int $_[1] * 10); 186 $LOGVIEW->set_fontsize ($CFG->{log_fontsize} = 0.1 * int $_[1] * 10);
187 }
164 }); 188 );
165 189
166 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Stats Fontsize"); 190 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Stats Fontsize");
167 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{stat_fontsize}, 0.7, 1.7, 0.1], connect_changed => sub { 191
192 $table->add (1, $row++, new CFClient::UI::Slider
193 range => [$CFG->{stat_fontsize}, 0.5, 2, 0.1],
194 tooltip => "The font size used by the statistics window only",
195 connect_changed => sub {
168 $CFG->{stat_fontsize} = 0.1 * int $_[1] * 10; 196 $CFG->{stat_fontsize} = 0.1 * int $_[1] * 10;
169 &set_stats_window_fontsize; 197 &set_stats_window_fontsize;
198 }
170 }); 199 );
171 200
172 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge width"); 201 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gaugesize");
173 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{gauge_w_size}, 0.1, 0.5, 0.02], connect_changed => sub {
174 $CFG->{gauge_w_size} = $_[1];
175 my $h = int ($HEIGHT * $CFG->{gauge_size});
176 my $w = int ($WIDTH * $CFG->{gauge_w_size});
177 $GAUGES->{win}->set_size ($w, $h);
178 $GAUGES->{win}->{y} = $HEIGHT - $h;
179 $GAUGES->{win}->{x} = $WIDTH - $w;
180 $GAUGES->{win}->update;
181 });
182
183 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge height");
184 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{gauge_size}, 0.2, 0.8, 0.02], connect_changed => sub { 202 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{gauge_size}, 0.2, 0.8, 0.02], connect_changed => sub {
185 $CFG->{gauge_size} = $_[1]; 203 $CFG->{gauge_size} = $_[1];
186 my $h = int ($HEIGHT * $CFG->{gauge_size}); 204 my $h = int ($HEIGHT * $CFG->{gauge_size});
187 my $w = int ($WIDTH * $CFG->{gauge_w_size});
188 $GAUGES->{win}->set_size ($w, $h); 205 $GAUGES->{win}->set_size ($WIDTH, $h);
189 $GAUGES->{win}->{y} = $HEIGHT - $h; 206 $GAUGES->{win}->{y} = $HEIGHT - $h;
190 $GAUGES->{win}->{x} = $WIDTH - $w; 207 $GAUGES->{win}->{x} = 0;
191 $GAUGES->{win}->update; 208 $GAUGES->{win}->update;
192 }); 209 });
193 210
211 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge size");
212 $table->add (1, $row++, new CFClient::UI::Slider
213 range => [$CFG->{gauge_size}, 0.2, 0.8, 0.02],
214 tooltip => "Adjust the size of the stats gauges at the bottom right",
215 connect_changed => sub {
216 $CFG->{gauge_size} = $_[1];
217 my $h = int ($HEIGHT * $CFG->{gauge_size});
218 $GAUGES->{win}->set_size ($WIDTH, $h);
219 $GAUGES->{win}->{y} = $HEIGHT - $h;
220 $GAUGES->{win}->{x} = 0;
221 $GAUGES->{win}->update;
222 }
223 );
194 224
195 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge fontsize"); 225 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge fontsize");
196 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{gauge_fontsize}, 0.7, 1.7, 0.1], connect_changed => sub { 226 $table->add (1, $row++, new CFClient::UI::Slider
227 range => [$CFG->{gauge_fontsize}, 0.5, 2.0, 0.1],
228 connect_changed => sub {
197 $CFG->{gauge_fontsize} = 0.1 * int $_[1] * 10; 229 $CFG->{gauge_fontsize} = 0.1 * int $_[1] * 10;
198 &set_gauge_window_fontsize; 230 &set_gauge_window_fontsize;
199 $GAUGES->{win}->check_size; 231 $GAUGES->{win}->check_size;
200 $GAUGES->{win}->update; 232 $GAUGES->{win}->update;
233 }
201 }); 234 );
202 235
203 236 $table->add (1, $row++, new CFClient::UI::Button
204 237 expand => 1, align => 0, text => "Apply",
205 $table->add (1, $row++, new CFClient::UI::Button expand => 1, align => 0, text => "Apply", connect_activate => sub { 238 tooltip => "Apply the video settings (unless they are auto-apply)",
239 connect_activate => sub {
206 video_shutdown (); 240 video_shutdown ();
207 video_init (); 241 video_init ();
242 }
208 }); 243 );
209 244
210 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Audio Enable"); 245 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Audio Enable");
211 $table->add (1, $row++, new CFClient::UI::CheckBox state => $CFG->{audio_enable}, connect_changed => sub { 246 $table->add (1, $row++, new CFClient::UI::CheckBox
247 state => $CFG->{audio_enable},
248 tooltip => "If enabled, sound effects and music will be played. If disabled, no audio will be used and the soundcard will not be opened.",
249 connect_changed => sub {
212 $CFG->{audio_enable} = $_[1]; 250 $CFG->{audio_enable} = $_[1];
251 }
213 }); 252 );
214# $table->add (0, 9, new CFClient::UI::Label valign => 0, align => 1, text => "Effects Volume"); 253# $table->add (0, 9, new CFClient::UI::Label valign => 0, align => 1, text => "Effects Volume");
215# $table->add (1, 8, new CFClient::UI::Slider range => [$CFG->{effects_volume}, 0, 128, 1], connect_changed => sub { 254# $table->add (1, 8, new CFClient::UI::Slider range => [$CFG->{effects_volume}, 0, 128, 1], connect_changed => sub {
216# $CFG->{effects_volume} = $_[1]; 255# $CFG->{effects_volume} = $_[1];
217# }); 256# });
218 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Background Music"); 257 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Background Music");
219 $table->add (1, $row++, my $hbox = new CFClient::UI::HBox); 258 $table->add (1, $row++, my $hbox = new CFClient::UI::HBox);
220 $hbox->add (new CFClient::UI::CheckBox expand => 1, state => $CFG->{bgm_enable}, connect_changed => sub { 259 $hbox->add (new CFClient::UI::CheckBox
260 expand => 1, state => $CFG->{bgm_enable},
261 tooltip => "Enable background music playing",
262 connect_changed => sub {
221 $CFG->{bgm_enable} = $_[1]; 263 $CFG->{bgm_enable} = $_[1];
264 }
222 }); 265 );
223 $hbox->add (new CFClient::UI::Slider expand => 1, range => [$CFG->{bgm_volume}, 0, 1, 0.1], connect_changed => sub { 266 $hbox->add (new CFClient::UI::Slider
267 expand => 1, range => [$CFG->{bgm_volume}, 0, 1, 0.1],
268 tooltip => "The volume of the background music",
269 connect_changed => sub {
224 $CFG->{bgm_volume} = $_[1]; 270 $CFG->{bgm_volume} = $_[1];
225 CFClient::MixMusic::volume $_[1] * 128; 271 CFClient::MixMusic::volume $_[1] * 128;
272 }
226 }); 273 );
227 274
228 $table->add (1, $row++, new CFClient::UI::Button expand => 1, align => 0, text => "Apply", connect_activate => sub { 275 $table->add (1, $row++, new CFClient::UI::Button
276 expand => 1, align => 0, text => "Apply",
277 tooltip => "Apply the audio settings that are not auto-apply",
278 connect_activate => sub {
229 audio_shutdown (); 279 audio_shutdown ();
230 audio_init (); 280 audio_init ();
281 }
231 }); 282 );
232 283
233 $dialog 284 $dialog
234} 285}
235 286
236sub set_stats_window_fontsize { 287sub set_stats_window_fontsize {
245 } 296 }
246} 297}
247 298
248sub make_gauge_window { 299sub make_gauge_window {
249 my $gh = int ($HEIGHT * $CFG->{gauge_size}); 300 my $gh = int ($HEIGHT * $CFG->{gauge_size});
250 my $gw = int ($WIDTH * $CFG->{gauge_w_size}); 301# my $gw = int ($WIDTH * $CFG->{gauge_w_size});
251 302
252 my $win = new CFClient::UI::Frame ( 303 my $win = new CFClient::UI::Frame (
253 y => $HEIGHT - $gh, x => $WIDTH - $gw, req_w => $gw, req_h => $gh 304 y => $HEIGHT - $gh, x => 0, req_w => $WIDTH, req_h => $gh
254 ); 305 );
255 $win->add (my $vb = new CFClient::UI::VBox); 306 $win->add (my $vb = new CFClient::UI::VBox);
256 307
257 $vb->add (my $hb = new CFClient::UI::HBox expand => 1); 308 $vb->add (my $hbg = new CFClient::UI::HBox expand => 1);
309
310
311 $hbg->add (new CFClient::UI::Empty expand => 1);
312 $hbg->add (my $hb = new CFClient::UI::HBox);
258 $hb->add (my $hg = new CFClient::UI::Gauge type => 'hp', expand => 1); 313 $hb->add (my $hg = new CFClient::UI::Gauge type => 'hp');
259 $hb->add (my $mg = new CFClient::UI::Gauge type => 'mana', expand => 1); 314 $hb->add (my $mg = new CFClient::UI::Gauge type => 'mana');
260 $hb->add (my $gg = new CFClient::UI::Gauge type => 'grace', expand => 1); 315 $hb->add (my $gg = new CFClient::UI::Gauge type => 'grace');
261 $hb->add (my $fg = new CFClient::UI::Gauge type => 'food', expand => 1); 316 $hb->add (my $fg = new CFClient::UI::Gauge type => 'food');
317
262 $vb->add (my $exp = new CFClient::UI::Label valign => 0, align => -1, text => "XP:"); 318 $vb->add (my $exp = new CFClient::UI::Label valign => 0, align => 1, text => "XP:");
263 $vb->add (my $lvl = new CFClient::UI::Label valign => 0, align => -1, text => "Lvl:"); 319# $vb->add (my $lvl = new CFClient::UI::Label valign => 0, align => 1, text => "Lvl:");
320 $vb->add (my $rng = new CFClient::UI::Label valign => 0, align => 1, text => "Rng:");
264 321
265 322
266 $GAUGES = { 323 $GAUGES = {
267 exp => $exp, lvl => $lvl, win => $win, 324 exp => $exp,# lvl => $lvl,
325 win => $win, range => $rng,
268 food => $fg, mana => $mg, hp => $hg, grace => $gg 326 food => $fg, mana => $mg, hp => $hg, grace => $gg
269 }; 327 };
270 $win 328 $win
271} 329}
272 330
280 338
281 $vb->add (my $hb = new CFClient::UI::HBox expand => 1); 339 $vb->add (my $hb = new CFClient::UI::HBox expand => 1);
282 340
283 $hb->add (my $tbl = new CFClient::UI::Table expand => 1); 341 $hb->add (my $tbl = new CFClient::UI::Table expand => 1);
284 342
285 $tbl->add (0, 0, $STATWIDS->{st_str_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "S"); 343 $tbl->add (0, 0, $STATWIDS->{st_str_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Str");
286 $tbl->add (0, 1, $STATWIDS->{st_dex_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "D"); 344 $tbl->add (0, 1, $STATWIDS->{st_dex_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Dex");
287 $tbl->add (0, 2, $STATWIDS->{st_con_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Co"); 345 $tbl->add (0, 2, $STATWIDS->{st_con_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Con");
288 $tbl->add (0, 3, $STATWIDS->{st_int_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "I"); 346 $tbl->add (0, 3, $STATWIDS->{st_int_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Int");
289 $tbl->add (0, 4, $STATWIDS->{st_wis_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "W"); 347 $tbl->add (0, 4, $STATWIDS->{st_wis_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Wis");
290 $tbl->add (0, 5, $STATWIDS->{st_pow_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "P"); 348 $tbl->add (0, 5, $STATWIDS->{st_pow_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Pow");
291 $tbl->add (0, 6, $STATWIDS->{st_cha_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Ch"); 349 $tbl->add (0, 6, $STATWIDS->{st_cha_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Cha");
292 350
293 $tbl->add (1, 0, $STATWIDS->{st_str} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 351 $tbl->add (1, 0, $STATWIDS->{st_str} = new CFClient::UI::Label valign => 0, align => +1, text => "");
294 $tbl->add (1, 1, $STATWIDS->{st_dex} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 352 $tbl->add (1, 1, $STATWIDS->{st_dex} = new CFClient::UI::Label valign => 0, align => +1, text => "");
295 $tbl->add (1, 2, $STATWIDS->{st_con} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 353 $tbl->add (1, 2, $STATWIDS->{st_con} = new CFClient::UI::Label valign => 0, align => +1, text => "");
296 $tbl->add (1, 3, $STATWIDS->{st_int} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 354 $tbl->add (1, 3, $STATWIDS->{st_int} = new CFClient::UI::Label valign => 0, align => +1, text => "");
297 $tbl->add (1, 4, $STATWIDS->{st_wis} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 355 $tbl->add (1, 4, $STATWIDS->{st_wis} = new CFClient::UI::Label valign => 0, align => +1, text => "");
298 $tbl->add (1, 5, $STATWIDS->{st_pow} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 356 $tbl->add (1, 5, $STATWIDS->{st_pow} = new CFClient::UI::Label valign => 0, align => +1, text => "");
299 $tbl->add (1, 6, $STATWIDS->{st_cha} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 357 $tbl->add (1, 6, $STATWIDS->{st_cha} = new CFClient::UI::Label valign => 0, align => +1, text => "");
300 358
301 $tbl->add (2, 0, $STATWIDS->{st_wc_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Wc"); 359 $tbl->add (2, 0, $STATWIDS->{st_wc_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Wc");
302 $tbl->add (2, 1, $STATWIDS->{st_ac_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Ac"); 360 $tbl->add (2, 1, $STATWIDS->{st_ac_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Ac");
303 $tbl->add (2, 2, $STATWIDS->{st_dam_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Dam"); 361 $tbl->add (2, 2, $STATWIDS->{st_dam_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Dam");
304 $tbl->add (2, 3, $STATWIDS->{st_arm_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Arm"); 362 $tbl->add (2, 3, $STATWIDS->{st_arm_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Arm");
305 $tbl->add (2, 4, $STATWIDS->{st_spd_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Sp"); 363 $tbl->add (2, 4, $STATWIDS->{st_spd_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Sp");
306 $tbl->add (2, 5, $STATWIDS->{st_wspd_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "WSp"); 364 $tbl->add (2, 5, $STATWIDS->{st_wspd_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "WSp");
307 365
308 $tbl->add (3, 0, $STATWIDS->{st_wc} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 366 $tbl->add (3, 0, $STATWIDS->{st_wc} = new CFClient::UI::Label valign => 0, align => +1, text => "");
309 $tbl->add (3, 1, $STATWIDS->{st_ac} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 367 $tbl->add (3, 1, $STATWIDS->{st_ac} = new CFClient::UI::Label valign => 0, align => +1, text => "");
310 $tbl->add (3, 2, $STATWIDS->{st_dam} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 368 $tbl->add (3, 2, $STATWIDS->{st_dam} = new CFClient::UI::Label valign => 0, align => +1, text => "");
311 $tbl->add (3, 3, $STATWIDS->{st_arm} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 369 $tbl->add (3, 3, $STATWIDS->{st_arm} = new CFClient::UI::Label valign => 0, align => +1, text => "");
312 $tbl->add (3, 4, $STATWIDS->{st_spd} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 370 $tbl->add (3, 4, $STATWIDS->{st_spd} = new CFClient::UI::Label valign => 0, align => +1, text => "");
313 $tbl->add (3, 5, $STATWIDS->{st_wspd} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 371 $tbl->add (3, 5, $STATWIDS->{st_wspd} = new CFClient::UI::Label valign => 0, align => +1, text => "");
314 372
315 $hb->add (my $tbl2 = new CFClient::UI::Table expand => 1); 373 $hb->add (my $tbl2 = new CFClient::UI::Table expand => 1);
316 374
317 my $row = 0; 375 my $row = 0;
318 my $col = 0; 376 my $col = 0;
319 377
320 for (qw/slow holyw conf fire depl magic 378 for (qw/slow holyw conf fire depl magic
321 drain acid pois para deat phys 379 drain acid pois para deat phys
322 blind fear tund elec cold ghit/) 380 blind fear tund elec cold ghit/)
323 { 381 {
324 $tbl2->add ($col, $row, new CFClient::UI::Image image => "ui/resist/resist_$_.png");
325 $tbl2->add ($col + 1, $row, 382 $tbl2->add ($col , $row,
326 $STATWIDS->{"res_$_"} = 383 $STATWIDS->{"res_$_"} =
327 new CFClient::UI::Label text => "0", align => -1, valign => 0 384 new CFClient::UI::Label text => "0", align => +1, valign => 0
328 ); 385 );
386 $tbl2->add ($col + 1, $row, new CFClient::UI::Image image => "ui/resist/resist_$_.png");
329 387
330 $row++; 388 $row++;
331 if ($row % 6 == 0) { 389 if ($row % 6 == 0) {
332 $col += 2; 390 $col += 2;
333 $row = 0; 391 $row = 0;
355 413
356 $GAUGES->{hp} ->set_value ($hp, $hp_m); 414 $GAUGES->{hp} ->set_value ($hp, $hp_m);
357 $GAUGES->{mana} ->set_value ($sp, $sp_m); 415 $GAUGES->{mana} ->set_value ($sp, $sp_m);
358 $GAUGES->{food} ->set_value ($fo, $fo_m); 416 $GAUGES->{food} ->set_value ($fo, $fo_m);
359 $GAUGES->{grace} ->set_value ($gr, $gr_m); 417 $GAUGES->{grace} ->set_value ($gr, $gr_m);
360 $GAUGES->{exp} ->set_text ("XP: " . ($stats->{11} || $stats->{28})); 418 $GAUGES->{exp} ->set_text ("XP: " . ($stats->{11} || $stats->{28}) * 1
419 ." LVL: " . $stats->{12} * 1);
420 my $rng = $stats->{20};
421 $rng =~ s/^Range: //; # thank you so much dear server
422 $GAUGES->{range} ->set_text ("Rng: " . $rng);
361 $GAUGES->{lvl} ->set_text ("LVL: " . $stats->{12}); 423# $GAUGES->{lvl} ->set_text ("LVL: " . $stats->{12});
362 $STATWIDS->{title} ->set_text ("Title: " . $stats->{21}); 424 $STATWIDS->{title} ->set_text ("Title: " . $stats->{21});
363 425
364 if (0) { # this code can vanish, just wanted to preserver it for a checkin 426 if (0) { # this code can vanish, just wanted to preserver it for a checkin
365 $STATWIDS->{st_str} ->set_text (sprintf "S%d", $stats->{5}); 427 $STATWIDS->{st_str} ->set_text (sprintf "S%d", $stats->{5});
366 $STATWIDS->{st_dex} ->set_text (sprintf "D%d", $stats->{8}); 428 $STATWIDS->{st_dex} ->set_text (sprintf "D%d", $stats->{8});
1110 fow_smooth => 0, 1172 fow_smooth => 0,
1111 gui_fontsize => 1, 1173 gui_fontsize => 1,
1112 log_fontsize => 1, 1174 log_fontsize => 1,
1113 gauge_fontsize => 1, 1175 gauge_fontsize => 1,
1114 gauge_size => 0.35, 1176 gauge_size => 0.35,
1115 gauge_w_size => 0.14,
1116 stat_fontsize => 1, 1177 stat_fontsize => 1,
1117 mapsize => 100, 1178 mapsize => 100,
1118 host => "crossfire.schmorp.de", 1179 host => "crossfire.schmorp.de",
1119 say_command => 'say', 1180 say_command => 'say',
1120 audio_enable => 1, 1181 audio_enable => 1,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines