… | |
… | |
54 | sub stats_update { |
54 | sub stats_update { |
55 | my ($self, $stats) = @_; |
55 | my ($self, $stats) = @_; |
56 | |
56 | |
57 | if (my $exp = $stats->{+CS_STAT_EXP64}) { |
57 | if (my $exp = $stats->{+CS_STAT_EXP64}) { |
58 | my $diff = $exp - $self->{prev_exp}; |
58 | my $diff = $exp - $self->{prev_exp}; |
59 | $::STATUSBOX->add ("$diff experience gained", group => "experience $diff", fg => [0.5, 1, 0.5, 0.8], timeout => 5) |
59 | $self->{statusbox}->add ("$diff experience gained", group => "experience $diff", fg => [0.5, 1, 0.5, 0.8], timeout => 5) |
60 | if exists $self->{prev_exp} && $diff; |
60 | if exists $self->{prev_exp} && $diff; |
61 | $self->{prev_exp} = $exp; |
61 | $self->{prev_exp} = $exp; |
62 | } |
62 | } |
63 | |
63 | |
64 | ::update_stats_window ($stats); |
64 | ::update_stats_window ($stats); |
… | |
… | |
407 | $text =~ s/\[color=(.*?)\](.*?)\[\/color\]/<span foreground='\1'>\2<\/span>/g; |
407 | $text =~ s/\[color=(.*?)\](.*?)\[\/color\]/<span foreground='\1'>\2<\/span>/g; |
408 | |
408 | |
409 | $self->{logview}->add_paragraph ($color[$color], |
409 | $self->{logview}->add_paragraph ($color[$color], |
410 | join "\n", map "$time $_", split /\n/, $text); |
410 | join "\n", map "$time $_", split /\n/, $text); |
411 | |
411 | |
412 | $::STATUSBOX->add ($text, |
412 | $self->{statusbox}->add ($text, |
413 | group => $text, |
413 | group => $text, |
414 | fg => $color[$color], |
414 | fg => $color[$color], |
415 | timeout => 10, |
415 | timeout => 10, |
416 | tooltip_font => $::FONT_FIXED, |
416 | tooltip_font => $::FONT_FIXED, |
417 | ); |
417 | ); |
… | |
… | |
489 | |
489 | |
490 | my ($face) = splice @{ $self->{face_prefetch} }, + rand @{ $self->{face_prefetch} }, 1, (); |
490 | my ($face) = splice @{ $self->{face_prefetch} }, + rand @{ $self->{face_prefetch} }, 1, (); |
491 | |
491 | |
492 | $self->send ("requestinfo image_sums $face $face"); |
492 | $self->send ("requestinfo image_sums $face $face"); |
493 | |
493 | |
494 | $::STATUSBOX->add (CFClient::UI::Label::escape "prefetching $todo", |
494 | $self->{statusbox}->add (CFClient::UI::Label::escape "prefetching $todo", |
495 | group => "prefetch", timeout => 2, fg => [1, 1, 0, 0.5]); |
495 | group => "prefetch", timeout => 2, fg => [1, 1, 0, 0.5]); |
496 | } elsif (!exists $self->{num_faces}) { |
496 | } elsif (!exists $self->{num_faces}) { |
497 | $self->send ("requestinfo image_info"); |
497 | $self->send ("requestinfo image_info"); |
498 | |
498 | |
499 | $self->{num_faces} = 0; |
499 | $self->{num_faces} = 0; |
500 | |
500 | |
501 | $::STATUSBOX->add (CFClient::UI::Label::escape "starting to prefetch", |
501 | $self->{statusbox}->add (CFClient::UI::Label::escape "starting to prefetch", |
502 | group => "prefetch", timeout => 2, fg => [1, 1, 0, 0.5]); |
502 | group => "prefetch", timeout => 2, fg => [1, 1, 0, 0.5]); |
503 | } |
503 | } |
504 | } |
504 | } |
505 | |
505 | |
506 | sub update_floorbox { |
506 | sub update_floorbox { |