--- deliantra/Deliantra-Client/DC/Protocol.pm 2006/06/23 22:35:16 1.41
+++ deliantra/Deliantra-Client/DC/Protocol.pm 2006/06/28 21:17:01 1.46
@@ -107,7 +107,7 @@
$self->logprint ("send: ", $command);
$self->send_command ($command);
- ::status $command;
+ ::status ($command);
}
sub start_record {
@@ -525,7 +525,7 @@
$::FLOORBOX->clear;
my $row;
- for (@{ $::CONN->{container}{0} }) {
+ for (sort { $a->{count} <=> $b->{count} } values %{ $::CONN->{container}{0} }) {
if ($row < 6) {
local $_->{face_widget}; # hack to force recreation of widget
local $_->{desc_widget}; # hack to force recreation of widget
@@ -587,6 +587,7 @@
update_floorbox;
update_container (0);
} elsif ($tag == $self->{player}{tag}) {
+ $::STATWIDS->{weight}->set_text (sprintf "Weight: %.1fkg", $self->{player}->{weight} / 1000);
$::INV->set_items ($self->{container}{$self->{player}{tag}})
} else {
update_container ($tag);
@@ -814,6 +815,8 @@
sub feed {
my ($self, $data) = @_;
+ Scalar::Util::weaken $self;
+
my ($type, $msg) = split / /, $data, 2;
if ($type eq "msg") {
@@ -826,15 +829,23 @@
$msg =~ s{
($match)
}{
+ my $kw = $1;
+
push @link, new CFClient::UI::Label
- markup => "$1",
+ markup => "$kw",
can_hover => 1,
- can_events => 1;
+ can_events => 1,
+ padding_x => 0,
+ padding_y => 0,
+ on_button_up => sub {
+ $self->send ($kw);
+ };
chr 0xfffc
}giex;
$self->{textview}->add_paragraph ([1, 1, 1, 1], [$msg, @link]);
+ $self->{textview}->scroll_to_bottom;
$self->update_options;
} else {
$self->destroy;
@@ -848,6 +859,7 @@
$self->{conn}->send ("ext npc_dialog_tell $self->{token} $msg");
$self->{textview}->add_paragraph ([1, 1, 0, 1], "\n" . CFClient::UI::Label::escape $msg);
+ $self->{textview}->scroll_to_bottom;
}
sub destroy {