summaryrefslogtreecommitdiff
path: root/SharedGraphics
diff options
context:
space:
mode:
Diffstat (limited to 'SharedGraphics')
-rw-r--r--SharedGraphics/TextAlignment.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/SharedGraphics/TextAlignment.h b/SharedGraphics/TextAlignment.h
index da7fa18021..9f77c67179 100644
--- a/SharedGraphics/TextAlignment.h
+++ b/SharedGraphics/TextAlignment.h
@@ -1,3 +1,13 @@
#pragma once
enum class TextAlignment { TopLeft, CenterLeft, Center, CenterRight };
+
+inline bool is_right_text_alignment(TextAlignment alignment)
+{
+ switch (alignment) {
+ case TextAlignment::CenterRight:
+ return true;
+ default:
+ return false;
+ }
+}