From b73389de77ea2534fb7b848181b4f93a8c95ab70 Mon Sep 17 00:00:00 2001 From: skyjake Date: Thu, 20 Jun 2013 10:01:01 +0300 Subject: [PATCH] Client|UI: Added Direction to the ui namespace --- .../client/include/ui/widgets/alignment.h | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doomsday/client/include/ui/widgets/alignment.h b/doomsday/client/include/ui/widgets/alignment.h index 5af1515100..7f4be57bfa 100644 --- a/doomsday/client/include/ui/widgets/alignment.h +++ b/doomsday/client/include/ui/widgets/alignment.h @@ -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. */