Skip to content

Commit

Permalink
Update GraphicsExtension.hx
Browse files Browse the repository at this point in the history
  • Loading branch information
t3du authored Dec 21, 2022
1 parent 329d2ba commit ae12f3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/kha/graphics2/GraphicsExtension.hx
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,13 @@ class GraphicsExtension {
}
}
var yoffset = 0.0;
if (verAlign == TextMiddle || verAlign == TextBottom) {
if (verAlign == TextTop || verAlign == TextBottom) {
var height = g2.font.height(g2.fontSize);
if (verAlign == TextMiddle) {
if (verAlign == TextTop) {
yoffset = -height * 0.5;
}
else {
yoffset = -height;
yoffset = height * 0.5;
}
}
g2.drawCharacters(text, start, length, x + xoffset, y + yoffset);
Expand Down

0 comments on commit ae12f3d

Please sign in to comment.