mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:57:47 +00:00
LibGUI: Add VerticalDirection::operator!
This allows to invert the direction of a VerticalDirection.
This commit is contained in:
parent
9c2211f246
commit
cb4844bf64
1 changed files with 7 additions and 0 deletions
|
@ -52,6 +52,13 @@ enum class VerticalDirection {
|
|||
Down
|
||||
};
|
||||
|
||||
constexpr VerticalDirection operator!(VerticalDirection const& other)
|
||||
{
|
||||
if (other == VerticalDirection::Up)
|
||||
return VerticalDirection::Down;
|
||||
return VerticalDirection::Up;
|
||||
}
|
||||
|
||||
constexpr VerticalDirection key_code_to_vertical_direction(KeyCode const& key)
|
||||
{
|
||||
if (key == Key_Up)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue