--- deliantra/Deliantra-Client/DC/UI.pm 2006/05/15 17:45:29 1.206 +++ deliantra/Deliantra-Client/DC/UI.pm 2006/05/15 18:23:33 1.207 @@ -2506,6 +2506,20 @@ ? $item->{name} : "$item->{nrof} $item->{name_pl}"; + $item->{flags} & Crossfire::Protocol::F_OPEN + and $desc .= " (open)"; + $item->{flags} & Crossfire::Protocol::F_APPLIED + and $desc .= " (applied)"; + $item->{flags} & Crossfire::Protocol::F_UNPAID + and $desc .= " (unpaid)"; + $item->{flags} & Crossfire::Protocol::F_MAGIC + and $desc .= " (magic)"; + $item->{flags} & Crossfire::Protocol::F_CURSED + and $desc .= " (cursed)"; + $item->{flags} & Crossfire::Protocol::F_DAMNED + and $desc .= " (damned)"; + $item->{flags} & Crossfire::Protocol::F_LOCKED + and $desc .= " *"; my $self = $class->SUPER::new ( can_hover => 1, @@ -2521,18 +2535,18 @@ } elsif ($ev->{button} == 2) { $::CONN->send ("apply $item->{tag}"); } elsif ($ev->{button} == 3) { - CFClient::UI::Menu->new ( - items => [ - ["examine", sub { $::CONN->send ("examine $item->{tag}") }], - [ - $item->{flags} & Crossfire::Protocol::F_LOCKED ? "lock" : "unlock", - sub { $::CONN->send ("lock $item->{tag}") }, - ], - ["mark", sub { $::CONN->send ("mark $item->{tag}") }], - ["apply", sub { $::CONN->send ("apply $item->{tag}") }], - ["drop", sub { $::CONN->send ("move 0 $item->{tag} 0") }], + my @menu_items = ( + ["examine", sub { $::CONN->send ("examine $item->{tag}") }], + ["mark", sub { $::CONN->send ("mark $item->{tag}") }], + ["apply", sub { $::CONN->send ("apply $item->{tag}") }], + ["drop", sub { $::CONN->send ("move $main::OPENCONT $item->{tag} 0") }], + [ + $item->{flags} & Crossfire::Protocol::F_LOCKED ? "lock" : "unlock", + sub { $::CONN->send ("lock ". () ."$item->{tag}") }, ], - )->popup ($ev); + ); + + CFClient::UI::Menu->new (items => \@menu_items)->popup ($ev); } 1