… | |
… | |
2266 | |
2266 | |
2267 | $MENUBAR->add ($PICKUP_ENABLE = new DC::UI::CheckBox # checkbox bad, button better? |
2267 | $MENUBAR->add ($PICKUP_ENABLE = new DC::UI::CheckBox # checkbox bad, button better? |
2268 | tooltip => "Automatic Pickup Enable - when this checkbox is enabled, then your character " |
2268 | tooltip => "Automatic Pickup Enable - when this checkbox is enabled, then your character " |
2269 | . "will automatically pick up items as defined by your item pickup settings " |
2269 | . "will automatically pick up items as defined by your item pickup settings " |
2270 | . "in the playerbook. Often (e.g. in apartments) you want to temporarily " |
2270 | . "in the playerbook. Often (e.g. in apartments) you want to temporarily " |
2271 | . "disable autopickup by disdabling this checkbox.", |
2271 | . "disable autopickup by disabling this checkbox.", |
2272 | state => $CFG->{pickup} & PICKUP_INHIBIT ? 0 : 1, |
2272 | state => $CFG->{pickup} & PICKUP_INHIBIT ? 0 : 1, |
2273 | on_changed => sub { |
2273 | on_changed => sub { |
2274 | my ($self, $value) = @_; |
2274 | my ($self, $value) = @_; |
2275 | $CFG->{pickup} &= ~PICKUP_INHIBIT; |
2275 | $CFG->{pickup} &= ~PICKUP_INHIBIT; |
2276 | $CFG->{pickup} |= PICKUP_INHIBIT unless $_[1]; |
2276 | $CFG->{pickup} |= PICKUP_INHIBIT unless $_[1]; |