diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common.hpp | 3 | ||||
-rw-r--r-- | src/render.cpp | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/common.hpp b/src/common.hpp index 7d3a1f9..e6879ca 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -434,7 +434,8 @@ namespace render { typedef enum { ALIGN_LEFT_TOP, - ALIGN_CENTER_BOTTOM + ALIGN_CENTER_BOTTOM, + ALIGN_RIGHT_BOTTOM } text_align_t; void register_tile(uint8_t type, const char *top, const char *side, float height, layer_t layer); diff --git a/src/render.cpp b/src/render.cpp index 1dc6581..98c12a2 100644 --- a/src/render.cpp +++ b/src/render.cpp @@ -385,6 +385,11 @@ void state_t::render_text(v2f_t x, float height, std::string str, offset[0] = -rect.width / 2; offset[1] = -rect.height; break; + + case ALIGN_RIGHT_BOTTOM: + offset[0] = -rect.width; + offset[1] = -rect.height; + break; } offset *= scale; |