… | |
… | |
429 | join "\n", map "$time $_", split /\n/, $text); |
429 | join "\n", map "$time $_", split /\n/, $text); |
430 | |
430 | |
431 | $self->{statusbox}->add ($text, |
431 | $self->{statusbox}->add ($text, |
432 | group => $text, |
432 | group => $text, |
433 | fg => $color[$color], |
433 | fg => $color[$color], |
434 | timeout => 10, |
434 | timeout => $color >= 2 ? 60 : 10, |
435 | tooltip_font => $::FONT_FIXED, |
435 | tooltip_font => $::FONT_FIXED, |
436 | ); |
436 | ); |
437 | } |
437 | } |
438 | |
438 | |
439 | sub drawextinfo { |
439 | sub drawextinfo { |
… | |
… | |
445 | sub spell_add { |
445 | sub spell_add { |
446 | my ($self, $spell) = @_; |
446 | my ($self, $spell) = @_; |
447 | |
447 | |
448 | # TODO |
448 | # TODO |
449 | # create a widget dynamically, using spell face (CF::Protocol downloads them) |
449 | # create a widget dynamically, using spell face (CF::Protocol downloads them) |
450 | $::SPELL_LIST->add_spell ($spell); |
450 | $::SETUP_SPELLS->add_spell ($spell); |
451 | |
451 | |
452 | $self->{map_widget}->add_command ("invoke $spell->{name}", CFClient::UI::Label::escape $spell->{message}); |
452 | $self->{map_widget}->add_command ("invoke $spell->{name}", CFClient::UI::Label::escape $spell->{message}); |
453 | $self->{map_widget}->add_command ("cast $spell->{name}", CFClient::UI::Label::escape $spell->{message}); |
453 | $self->{map_widget}->add_command ("cast $spell->{name}", CFClient::UI::Label::escape $spell->{message}); |
454 | } |
454 | } |
455 | |
455 | |
456 | sub spell_delete { |
456 | sub spell_delete { |
457 | my ($self, $spell) = @_; |
457 | my ($self, $spell) = @_; |
458 | $::SPELL_LIST->remove_spell ($spell); |
458 | $::SETUP_SPELLS->remove_spell ($spell); |
459 | } |
459 | } |
460 | |
460 | |
461 | sub addme_success { |
461 | sub addme_success { |
462 | my ($self) = @_; |
462 | my ($self) = @_; |
463 | |
463 | |