Merge branch 'xvar/fixed-overitem-primcount' into 'master'

Fixed bug causing UI elements to move around when they shouldn't

See merge request veloren/veloren!2133
This commit is contained in:
Imbris 2021-04-15 21:38:57 +00:00
commit 4419c24eab

View File

@ -71,7 +71,11 @@ impl<'a> Ingameable for Overitem<'a> {
// TODO maybe this could be done automatically?
// - 2 Text for name
// - 0 or 2 Rectangle and Text for button
2 + match self.controls.get_binding(GameInput::Interact) {
2 + match self
.controls
.get_binding(GameInput::Interact)
.filter(|_| self.active)
{
Some(_) => 2,
None => 0,
}