git repos / blockattack-game

commit f9f05e62

sago007 · 2018-10-28 12:36
f9f05e62110e399e9c7ddceb910009d2ceabb978 patch · browse files
parent 3483e869bf6d15aa4de0e9c26354ab6c0ffa4a81

Fix right aligning text fields

Changed files

M source/code/sago/SagoTextField.cpp before
diff --git a/source/code/sago/SagoTextField.cpp b/source/code/sago/SagoTextField.cpp index 2bb40f9..666de12 100644 --- a/source/code/sago/SagoTextField.cpp +++ b/source/code/sago/SagoTextField.cpp
@@ -209,7 +209,7 @@ void SagoTextField::Draw(SDL_Renderer* target, int x, int y, Alignment alignment
x -= texW/2;
}
if (alignment == Alignment::right) {
- y -= texW;
+ x -= texW;
}
if (verticalAlignment == VerticalAlignment::center) {
y -= texH/2;