mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed long mouse button names overflowing hotbar slots (#637)
This commit is contained in:
parent
8e67782a49
commit
8434957d01
@ -370,11 +370,12 @@ impl fmt::Display for KeyMouse {
|
||||
Key(Copy) => "Copy",
|
||||
Key(Paste) => "Paste",
|
||||
Key(Cut) => "Cut",
|
||||
Mouse(MouseButton::Left) => "Mouse Left",
|
||||
Mouse(MouseButton::Right) => "Mouse Right",
|
||||
Mouse(MouseButton::Middle) => "Middle-Click",
|
||||
Mouse(MouseButton::Left) => "M1",
|
||||
Mouse(MouseButton::Right) => "M2",
|
||||
Mouse(MouseButton::Middle) => "M3",
|
||||
Mouse(MouseButton::Other(button)) =>
|
||||
return write!(f, "Unknown Mouse Button: {:?}", button),
|
||||
// Additional mouse buttons after middle click start at 1
|
||||
return write!(f, "M{}", button + 3),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user