… | |
… | |
1749 | ["Magic Devices" => PICKUP_MAGIC_DEVICE], |
1749 | ["Magic Devices" => PICKUP_MAGIC_DEVICE], |
1750 | ["Ignore cursed" => PICKUP_NOT_CURSED], |
1750 | ["Ignore cursed" => PICKUP_NOT_CURSED], |
1751 | ["Jewelery" => PICKUP_JEWELS], |
1751 | ["Jewelery" => PICKUP_JEWELS], |
1752 | ["Flesh" => PICKUP_FLESH], |
1752 | ["Flesh" => PICKUP_FLESH], |
1753 | ], |
1753 | ], |
1754 | ["Weight/Value ratio", 2, 17] |
1754 | ["Value/Weight ratio", 2, 17] |
1755 | ) |
1755 | ) |
1756 | { |
1756 | { |
1757 | my ($title, $x, $y, @bits) = @$_; |
1757 | my ($title, $x, $y, @bits) = @$_; |
1758 | $table->add_at ($x, $y, new DC::UI::Label text => $title, align => 1, fg => [1, 1, 0]); |
1758 | $table->add_at ($x, $y, new DC::UI::Label text => $title, align => 1, fg => [1, 1, 0]); |
1759 | |
1759 | |
… | |
… | |
1784 | } |
1784 | } |
1785 | |
1785 | |
1786 | $table->add_at (2, 18, new DC::UI::ValSlider |
1786 | $table->add_at (2, 18, new DC::UI::ValSlider |
1787 | range => [$::CFG->{pickup} & 0xF, 0, 16, 1, 1], |
1787 | range => [$::CFG->{pickup} & 0xF, 0, 16, 1, 1], |
1788 | template => ">= 99", |
1788 | template => ">= 99", |
|
|
1789 | tooltip => "Pick up items whose value/weight (silver/kg) ratio is equal or higher than this setting (which is specified in gold coins).", |
1789 | to_value => sub { ">= " . 5 * $_[0] }, |
1790 | to_value => sub { ">= " . 5 * $_[0] }, |
1790 | on_changed => sub { |
1791 | on_changed => sub { |
1791 | my ($slider, $value) = @_; |
1792 | my ($slider, $value) = @_; |
1792 | |
1793 | |
1793 | $::CFG->{pickup} &= ~0xF; |
1794 | $::CFG->{pickup} &= ~0xF; |
… | |
… | |
1849 | $::CFG->{inv_sort} = $_[1]; |
1850 | $::CFG->{inv_sort} = $_[1]; |
1850 | $INV->set_sort_order ($SORT_ORDER{$_[1]}); |
1851 | $INV->set_sort_order ($SORT_ORDER{$_[1]}); |
1851 | }, |
1852 | }, |
1852 | ); |
1853 | ); |
1853 | $hb1->add (new DC::UI::Label text => "Weight: ", align => 1, expand => 1); |
1854 | $hb1->add (new DC::UI::Label text => "Weight: ", align => 1, expand => 1); |
1854 | #TODO# update to weigh/maxweight |
1855 | #TODO# update to weight/maxweight |
1855 | $hb1->add ($STATWIDS->{i_weight} = new DC::UI::Label align => 0); |
1856 | $hb1->add ($STATWIDS->{i_weight} = new DC::UI::Label align => 0); |
1856 | |
1857 | |
1857 | $vb1->add (my $sw1 = new DC::UI::ScrolledWindow expand => 1, scroll_y => 1); |
1858 | $vb1->add (my $sw1 = new DC::UI::ScrolledWindow expand => 1, scroll_y => 1); |
1858 | $sw1->add ($INV = new DC::UI::Inventory); |
1859 | $sw1->add ($INV = new DC::UI::Inventory); |
1859 | $INV->set_sort_order ($SORT_ORDER{$::CFG->{inv_sort}}); |
1860 | $INV->set_sort_order ($SORT_ORDER{$::CFG->{inv_sort}}); |