--- deliantra/Deliantra-Client/bin/cfplus 2006/07/22 13:20:33 1.98 +++ deliantra/Deliantra-Client/bin/cfplus 2006/07/23 08:58:44 1.99 @@ -1261,6 +1261,32 @@ $hb->add (my $vb1 = new CFClient::UI::VBox); $vb1->add (new CFClient::UI::Label align => 0, text => "Player"); + + $vb1->add (my $hb1 = new CFClient::UI::HBox); + + use sort 'stable'; + + $hb1->add (new CFClient::UI::Combobox + value => undef, + options => [ + [undef, "Type/Name"], + [ + sub { sort { + $a->{weight} * ($a->{nrof} || 1) <=> $b->{weight} * ($b->{nrof} || 1) + or $a->{type} <=> $b->{type} + } @_ }, + "Weight/Type", + ], + [sub { } => "#TODO#"], + ], + on_changed => sub { + $INV->set_sort_order ($_[1]); + }, + ); + $hb1->add (new CFClient::UI::Label text => "Weight: ", align => 1, expand => 1); + #TODO# update to weigh/maxweight + $hb1->add ($STATWIDS->{i_weight} = new CFClient::UI::Label align => -1); + $vb1->add (my $sw1 = new CFClient::UI::ScrolledWindow expand => 1, scroll_y => 1); $sw1->add ($INV = new CFClient::UI::Inventory);