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.164 by root, Sun Apr 23 01:05:04 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 => "Gauge size");
173 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{gauge_w_size}, 0.1, 0.5, 0.02], connect_changed => sub { 202 $table->add (1, $row++, new CFClient::UI::Slider
174 $CFG->{gauge_w_size} = $_[1]; 203 range => [$CFG->{gauge_size}, 0.2, 0.8, 0.02],
175 my $h = int ($HEIGHT * $CFG->{gauge_size}); 204 tooltip => "Adjust the size of the stats gauges at the bottom right",
176 my $w = int ($WIDTH * $CFG->{gauge_w_size}); 205 connect_changed => sub {
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 {
185 $CFG->{gauge_size} = $_[1]; 206 $CFG->{gauge_size} = $_[1];
186 my $h = int ($HEIGHT * $CFG->{gauge_size}); 207 my $h = int $HEIGHT * $CFG->{gauge_size};
187 my $w = int ($WIDTH * $CFG->{gauge_w_size});
188 $GAUGES->{win}->set_size ($w, $h); 208 $GAUGES->{win}->set_size ($WIDTH, $h);
189 $GAUGES->{win}->{y} = $HEIGHT - $h; 209 $GAUGES->{win}->move (0, $HEIGHT - $h);
190 $GAUGES->{win}->{x} = $WIDTH - $w; 210 }
191 $GAUGES->{win}->update;
192 }); 211 );
193
194 212
195 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge fontsize"); 213 $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 { 214 $table->add (1, $row++, new CFClient::UI::Slider
215 range => [$CFG->{gauge_fontsize}, 0.5, 2.0, 0.1],
216 connect_changed => sub {
197 $CFG->{gauge_fontsize} = 0.1 * int $_[1] * 10; 217 $CFG->{gauge_fontsize} = 0.1 * int $_[1] * 10;
198 &set_gauge_window_fontsize; 218 &set_gauge_window_fontsize;
199 $GAUGES->{win}->check_size; 219 #$GAUGES->{win}->check_size;
200 $GAUGES->{win}->update; 220 #$GAUGES->{win}->update;
221 }
201 }); 222 );
202 223
203 224 $table->add (1, $row++, new CFClient::UI::Button
204 225 expand => 1, align => 0, text => "Apply",
205 $table->add (1, $row++, new CFClient::UI::Button expand => 1, align => 0, text => "Apply", connect_activate => sub { 226 tooltip => "Apply the video settings (unless they are auto-apply)",
227 connect_activate => sub {
206 video_shutdown (); 228 video_shutdown ();
207 video_init (); 229 video_init ();
230 }
208 }); 231 );
209 232
210 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Audio Enable"); 233 $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 { 234 $table->add (1, $row++, new CFClient::UI::CheckBox
235 state => $CFG->{audio_enable},
236 tooltip => "If enabled, sound effects and music will be played. If disabled, no audio will be used and the soundcard will not be opened.",
237 connect_changed => sub {
212 $CFG->{audio_enable} = $_[1]; 238 $CFG->{audio_enable} = $_[1];
239 }
213 }); 240 );
214# $table->add (0, 9, new CFClient::UI::Label valign => 0, align => 1, text => "Effects Volume"); 241# $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 { 242# $table->add (1, 8, new CFClient::UI::Slider range => [$CFG->{effects_volume}, 0, 128, 1], connect_changed => sub {
216# $CFG->{effects_volume} = $_[1]; 243# $CFG->{effects_volume} = $_[1];
217# }); 244# });
218 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Background Music"); 245 $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); 246 $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 { 247 $hbox->add (new CFClient::UI::CheckBox
248 expand => 1, state => $CFG->{bgm_enable},
249 tooltip => "Enable background music playing",
250 connect_changed => sub {
221 $CFG->{bgm_enable} = $_[1]; 251 $CFG->{bgm_enable} = $_[1];
252 }
222 }); 253 );
223 $hbox->add (new CFClient::UI::Slider expand => 1, range => [$CFG->{bgm_volume}, 0, 1, 0.1], connect_changed => sub { 254 $hbox->add (new CFClient::UI::Slider
255 expand => 1, range => [$CFG->{bgm_volume}, 0, 1, 0.1],
256 tooltip => "The volume of the background music",
257 connect_changed => sub {
224 $CFG->{bgm_volume} = $_[1]; 258 $CFG->{bgm_volume} = $_[1];
225 CFClient::MixMusic::volume $_[1] * 128; 259 CFClient::MixMusic::volume $_[1] * 128;
260 }
226 }); 261 );
227 262
228 $table->add (1, $row++, new CFClient::UI::Button expand => 1, align => 0, text => "Apply", connect_activate => sub { 263 $table->add (1, $row++, new CFClient::UI::Button
264 expand => 1, align => 0, text => "Apply",
265 tooltip => "Apply the audio settings that are not auto-apply",
266 connect_activate => sub {
229 audio_shutdown (); 267 audio_shutdown ();
230 audio_init (); 268 audio_init ();
269 }
231 }); 270 );
232 271
233 $dialog 272 $dialog
234} 273}
235 274
236sub set_stats_window_fontsize { 275sub set_stats_window_fontsize {
245 } 284 }
246} 285}
247 286
248sub make_gauge_window { 287sub make_gauge_window {
249 my $gh = int ($HEIGHT * $CFG->{gauge_size}); 288 my $gh = int ($HEIGHT * $CFG->{gauge_size});
250 my $gw = int ($WIDTH * $CFG->{gauge_w_size}); 289# my $gw = int ($WIDTH * $CFG->{gauge_w_size});
251 290
252 my $win = new CFClient::UI::Frame ( 291 my $win = new CFClient::UI::Frame (
253 y => $HEIGHT - $gh, x => $WIDTH - $gw, req_w => $gw, req_h => $gh 292 y => $HEIGHT - $gh, x => 0, req_w => $WIDTH, req_h => $gh
254 ); 293 );
255 $win->add (my $vb = new CFClient::UI::VBox); 294 $win->add (my $vb = new CFClient::UI::VBox);
256 295
257 $vb->add (my $hb = new CFClient::UI::HBox expand => 1); 296 $vb->add (my $hbg = new CFClient::UI::HBox expand => 1);
297
298
299 $hbg->add (new CFClient::UI::Empty expand => 1);
300 $hbg->add (my $hb = new CFClient::UI::HBox);
258 $hb->add (my $hg = new CFClient::UI::Gauge type => 'hp', expand => 1); 301 $hb->add (my $hg = new CFClient::UI::Gauge type => 'hp');
259 $hb->add (my $mg = new CFClient::UI::Gauge type => 'mana', expand => 1); 302 $hb->add (my $mg = new CFClient::UI::Gauge type => 'mana');
260 $hb->add (my $gg = new CFClient::UI::Gauge type => 'grace', expand => 1); 303 $hb->add (my $gg = new CFClient::UI::Gauge type => 'grace');
261 $hb->add (my $fg = new CFClient::UI::Gauge type => 'food', expand => 1); 304 $hb->add (my $fg = new CFClient::UI::Gauge type => 'food');
305
262 $vb->add (my $exp = new CFClient::UI::Label valign => 0, align => -1, text => "XP:"); 306 $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:"); 307# $vb->add (my $lvl = new CFClient::UI::Label valign => 0, align => 1, text => "Lvl:");
308 $vb->add (my $rng = new CFClient::UI::Label valign => 0, align => 1, text => "Rng:");
264 309
265 310
266 $GAUGES = { 311 $GAUGES = {
267 exp => $exp, lvl => $lvl, win => $win, 312 exp => $exp,# lvl => $lvl,
313 win => $win, range => $rng,
268 food => $fg, mana => $mg, hp => $hg, grace => $gg 314 food => $fg, mana => $mg, hp => $hg, grace => $gg
269 }; 315 };
270 $win 316 $win
271} 317}
272 318
280 326
281 $vb->add (my $hb = new CFClient::UI::HBox expand => 1); 327 $vb->add (my $hb = new CFClient::UI::HBox expand => 1);
282 328
283 $hb->add (my $tbl = new CFClient::UI::Table expand => 1); 329 $hb->add (my $tbl = new CFClient::UI::Table expand => 1);
284 330
285 $tbl->add (0, 0, $STATWIDS->{st_str_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "S"); 331 $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"); 332 $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"); 333 $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"); 334 $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"); 335 $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"); 336 $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"); 337 $tbl->add (0, 6, $STATWIDS->{st_cha_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Cha");
292 338
293 $tbl->add (1, 0, $STATWIDS->{st_str} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 339 $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 => ""); 340 $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 => ""); 341 $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 => ""); 342 $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 => ""); 343 $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 => ""); 344 $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 => ""); 345 $tbl->add (1, 6, $STATWIDS->{st_cha} = new CFClient::UI::Label valign => 0, align => +1, text => "");
300 346
301 $tbl->add (2, 0, $STATWIDS->{st_wc_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "Wc"); 347 $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"); 348 $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"); 349 $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"); 350 $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"); 351 $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"); 352 $tbl->add (2, 5, $STATWIDS->{st_wspd_lbl} = new CFClient::UI::Label valign => 0, align => +1, text => "WSp");
307 353
308 $tbl->add (3, 0, $STATWIDS->{st_wc} = new CFClient::UI::Label valign => 0, align => -1, text => ""); 354 $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 => ""); 355 $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 => ""); 356 $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 => ""); 357 $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 => ""); 358 $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 => ""); 359 $tbl->add (3, 5, $STATWIDS->{st_wspd} = new CFClient::UI::Label valign => 0, align => +1, text => "");
314 360
315 $hb->add (my $tbl2 = new CFClient::UI::Table expand => 1); 361 $hb->add (my $tbl2 = new CFClient::UI::Table expand => 1);
316 362
317 my $row = 0; 363 my $row = 0;
318 my $col = 0; 364 my $col = 0;
319 365
320 for (qw/slow holyw conf fire depl magic 366 for (qw/slow holyw conf fire depl magic
321 drain acid pois para deat phys 367 drain acid pois para deat phys
322 blind fear tund elec cold ghit/) 368 blind fear tund elec cold ghit/)
323 { 369 {
324 $tbl2->add ($col, $row, new CFClient::UI::Image image => "ui/resist/resist_$_.png");
325 $tbl2->add ($col + 1, $row, 370 $tbl2->add ($col, $row,
326 $STATWIDS->{"res_$_"} = 371 $STATWIDS->{"res_$_"} =
327 new CFClient::UI::Label text => "0", align => -1, valign => 0 372 new CFClient::UI::Label text => "0", align => +1, valign => 0
328 ); 373 );
374 $tbl2->add ($col + 1, $row, new CFClient::UI::Image image => "ui/resist/resist_$_.png");
329 375
330 $row++; 376 $row++;
331 if ($row % 6 == 0) { 377 if ($row % 6 == 0) {
332 $col += 2; 378 $col += 2;
333 $row = 0; 379 $row = 0;
355 401
356 $GAUGES->{hp} ->set_value ($hp, $hp_m); 402 $GAUGES->{hp} ->set_value ($hp, $hp_m);
357 $GAUGES->{mana} ->set_value ($sp, $sp_m); 403 $GAUGES->{mana} ->set_value ($sp, $sp_m);
358 $GAUGES->{food} ->set_value ($fo, $fo_m); 404 $GAUGES->{food} ->set_value ($fo, $fo_m);
359 $GAUGES->{grace} ->set_value ($gr, $gr_m); 405 $GAUGES->{grace} ->set_value ($gr, $gr_m);
360 $GAUGES->{exp} ->set_text ("XP: " . ($stats->{11} || $stats->{28})); 406 $GAUGES->{exp} ->set_text ("XP: " . ($stats->{11} || $stats->{28}) * 1
407 ." LVL: " . $stats->{12} * 1);
408 my $rng = $stats->{20};
409 $rng =~ s/^Range: //; # thank you so much dear server
410 $GAUGES->{range} ->set_text ("Rng: " . $rng);
361 $GAUGES->{lvl} ->set_text ("LVL: " . $stats->{12}); 411# $GAUGES->{lvl} ->set_text ("LVL: " . $stats->{12});
362 $STATWIDS->{title} ->set_text ("Title: " . $stats->{21}); 412 $STATWIDS->{title} ->set_text ("Title: " . $stats->{21});
363 413
364 if (0) { # this code can vanish, just wanted to preserver it for a checkin 414 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}); 415 $STATWIDS->{st_str} ->set_text (sprintf "S%d", $stats->{5});
366 $STATWIDS->{st_dex} ->set_text (sprintf "D%d", $stats->{8}); 416 $STATWIDS->{st_dex} ->set_text (sprintf "D%d", $stats->{8});
1110 fow_smooth => 0, 1160 fow_smooth => 0,
1111 gui_fontsize => 1, 1161 gui_fontsize => 1,
1112 log_fontsize => 1, 1162 log_fontsize => 1,
1113 gauge_fontsize => 1, 1163 gauge_fontsize => 1,
1114 gauge_size => 0.35, 1164 gauge_size => 0.35,
1115 gauge_w_size => 0.14,
1116 stat_fontsize => 1, 1165 stat_fontsize => 1,
1117 mapsize => 100, 1166 mapsize => 100,
1118 host => "crossfire.schmorp.de", 1167 host => "crossfire.schmorp.de",
1119 say_command => 'say', 1168 say_command => 'say',
1120 audio_enable => 1, 1169 audio_enable => 1,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines