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
da5dd54bbb
commit
0b64af6d88
@ -370,11 +370,12 @@ impl fmt::Display for KeyMouse {
|
|||||||
Key(Copy) => "Copy",
|
Key(Copy) => "Copy",
|
||||||
Key(Paste) => "Paste",
|
Key(Paste) => "Paste",
|
||||||
Key(Cut) => "Cut",
|
Key(Cut) => "Cut",
|
||||||
Mouse(MouseButton::Left) => "Mouse Left",
|
Mouse(MouseButton::Left) => "M1",
|
||||||
Mouse(MouseButton::Right) => "Mouse Right",
|
Mouse(MouseButton::Right) => "M2",
|
||||||
Mouse(MouseButton::Middle) => "Middle-Click",
|
Mouse(MouseButton::Middle) => "M3",
|
||||||
Mouse(MouseButton::Other(button)) =>
|
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…
x
Reference in New Issue
Block a user