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.160 by root, Sat Apr 22 23:11:34 2006 UTC vs.
Revision 1.161 by elmex, Sun Apr 23 00:08:31 2006 UTC

167 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{stat_fontsize}, 0.7, 1.7, 0.1], connect_changed => sub { 167 $table->add (1, $row++, new CFClient::UI::Slider range => [$CFG->{stat_fontsize}, 0.7, 1.7, 0.1], connect_changed => sub {
168 $CFG->{stat_fontsize} = 0.1 * int $_[1] * 10; 168 $CFG->{stat_fontsize} = 0.1 * int $_[1] * 10;
169 &set_stats_window_fontsize; 169 &set_stats_window_fontsize;
170 }); 170 });
171 171
172 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge width");
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"); 172 $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 { 173 $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]; 174 $CFG->{gauge_size} = $_[1];
186 my $h = int ($HEIGHT * $CFG->{gauge_size}); 175 my $h = int ($HEIGHT * $CFG->{gauge_size});
187 my $w = int ($WIDTH * $CFG->{gauge_w_size});
188 $GAUGES->{win}->set_size ($w, $h); 176 $GAUGES->{win}->set_size ($WIDTH, $h);
189 $GAUGES->{win}->{y} = $HEIGHT - $h; 177 $GAUGES->{win}->{y} = $HEIGHT - $h;
190 $GAUGES->{win}->{x} = $WIDTH - $w; 178 $GAUGES->{win}->{x} = 0;
191 $GAUGES->{win}->update; 179 $GAUGES->{win}->update;
192 }); 180 });
193 181
194 182
195 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge fontsize"); 183 $table->add (0, $row, new CFClient::UI::Label valign => 0, align => 1, text => "Gauge fontsize");
245 } 233 }
246} 234}
247 235
248sub make_gauge_window { 236sub make_gauge_window {
249 my $gh = int ($HEIGHT * $CFG->{gauge_size}); 237 my $gh = int ($HEIGHT * $CFG->{gauge_size});
250 my $gw = int ($WIDTH * $CFG->{gauge_w_size}); 238# my $gw = int ($WIDTH * $CFG->{gauge_w_size});
251 239
252 my $win = new CFClient::UI::Frame ( 240 my $win = new CFClient::UI::Frame (
253 y => $HEIGHT - $gh, x => $WIDTH - $gw, req_w => $gw, req_h => $gh 241 y => $HEIGHT - $gh, x => 0, req_w => $WIDTH, req_h => $gh
254 ); 242 );
255 $win->add (my $vb = new CFClient::UI::VBox); 243 $win->add (my $vb = new CFClient::UI::VBox);
256 244
257 $vb->add (my $hb = new CFClient::UI::HBox expand => 1); 245 $vb->add (my $hbg = new CFClient::UI::HBox expand => 1);
246
247
248 $hbg->add (new CFClient::UI::Empty expand => 1);
249 $hbg->add (my $hb = new CFClient::UI::HBox);
258 $hb->add (my $hg = new CFClient::UI::Gauge type => 'hp', expand => 1); 250 $hb->add (my $hg = new CFClient::UI::Gauge type => 'hp');
259 $hb->add (my $mg = new CFClient::UI::Gauge type => 'mana', expand => 1); 251 $hb->add (my $mg = new CFClient::UI::Gauge type => 'mana');
260 $hb->add (my $gg = new CFClient::UI::Gauge type => 'grace', expand => 1); 252 $hb->add (my $gg = new CFClient::UI::Gauge type => 'grace');
261 $hb->add (my $fg = new CFClient::UI::Gauge type => 'food', expand => 1); 253 $hb->add (my $fg = new CFClient::UI::Gauge type => 'food');
254
262 $vb->add (my $exp = new CFClient::UI::Label valign => 0, align => -1, text => "XP:"); 255 $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:"); 256# $vb->add (my $lvl = new CFClient::UI::Label valign => 0, align => 1, text => "Lvl:");
264 $vb->add (my $rng = new CFClient::UI::Label valign => 0, align => -1, text => "Rng:"); 257 $vb->add (my $rng = new CFClient::UI::Label valign => 0, align => 1, text => "Rng:");
265 258
266 259
267 $GAUGES = { 260 $GAUGES = {
268 exp => $exp, lvl => $lvl, win => $win, range => $rng, 261 exp => $exp,# lvl => $lvl,
262 win => $win, range => $rng,
269 food => $fg, mana => $mg, hp => $hg, grace => $gg 263 food => $fg, mana => $mg, hp => $hg, grace => $gg
270 }; 264 };
271 $win 265 $win
272} 266}
273 267
356 350
357 $GAUGES->{hp} ->set_value ($hp, $hp_m); 351 $GAUGES->{hp} ->set_value ($hp, $hp_m);
358 $GAUGES->{mana} ->set_value ($sp, $sp_m); 352 $GAUGES->{mana} ->set_value ($sp, $sp_m);
359 $GAUGES->{food} ->set_value ($fo, $fo_m); 353 $GAUGES->{food} ->set_value ($fo, $fo_m);
360 $GAUGES->{grace} ->set_value ($gr, $gr_m); 354 $GAUGES->{grace} ->set_value ($gr, $gr_m);
361 $GAUGES->{exp} ->set_text ("XP: " . ($stats->{11} || $stats->{28})); 355 $GAUGES->{exp} ->set_text ("XP: " . ($stats->{11} || $stats->{28}) * 1
356 ." LVL: " . $stats->{12} * 1);
362 my $rng = $stats->{20}; 357 my $rng = $stats->{20};
363 $rng =~ s/^Range: //; # thank you so much dear server 358 $rng =~ s/^Range: //; # thank you so much dear server
364 $GAUGES->{range} ->set_text ("Rng: " . $rng); 359 $GAUGES->{range} ->set_text ("Rng: " . $rng);
365 $GAUGES->{lvl} ->set_text ("LVL: " . $stats->{12}); 360# $GAUGES->{lvl} ->set_text ("LVL: " . $stats->{12});
366 $STATWIDS->{title} ->set_text ("Title: " . $stats->{21}); 361 $STATWIDS->{title} ->set_text ("Title: " . $stats->{21});
367 362
368 if (0) { # this code can vanish, just wanted to preserver it for a checkin 363 if (0) { # this code can vanish, just wanted to preserver it for a checkin
369 $STATWIDS->{st_str} ->set_text (sprintf "S%d", $stats->{5}); 364 $STATWIDS->{st_str} ->set_text (sprintf "S%d", $stats->{5});
370 $STATWIDS->{st_dex} ->set_text (sprintf "D%d", $stats->{8}); 365 $STATWIDS->{st_dex} ->set_text (sprintf "D%d", $stats->{8});
1114 fow_smooth => 0, 1109 fow_smooth => 0,
1115 gui_fontsize => 1, 1110 gui_fontsize => 1,
1116 log_fontsize => 1, 1111 log_fontsize => 1,
1117 gauge_fontsize => 1, 1112 gauge_fontsize => 1,
1118 gauge_size => 0.35, 1113 gauge_size => 0.35,
1119 gauge_w_size => 0.14,
1120 stat_fontsize => 1, 1114 stat_fontsize => 1,
1121 mapsize => 100, 1115 mapsize => 100,
1122 host => "crossfire.schmorp.de", 1116 host => "crossfire.schmorp.de",
1123 say_command => 'say', 1117 say_command => 'say',
1124 audio_enable => 1, 1118 audio_enable => 1,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines