Skip to content

Commit

Permalink
Client|UI: Added Direction to the ui namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jun 20, 2013
1 parent bb90834 commit b73389d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions doomsday/client/include/ui/widgets/alignment.h
Expand Up @@ -23,6 +23,26 @@

namespace ui {

/**
* Basic directions.
*/
enum Direction
{
Left,
Up,
Right,
Down
};

inline Direction opposite(Direction dir) {
switch(dir) {
case Left: return Right;
case Right: return Left;
case Up: return Down;
case Down: return Up;
}
}

/**
* Flags for specifying alignment.
*/
Expand Down

0 comments on commit b73389d

Please sign in to comment.