too much fixes
This commit is contained in:
@@ -109,8 +109,11 @@ public:
|
||||
|
||||
// Measure line height
|
||||
float lineHeight = 0.0f;
|
||||
for (auto& [key, ch] : font->Characters)
|
||||
float ascent = 0.0f; // glyphs are drawn up from the baseline, so lines start this far below the top
|
||||
for (auto& [key, ch] : font->Characters) {
|
||||
lineHeight = glm::max(lineHeight, (float)ch.Size.y * fontsize);
|
||||
ascent = glm::max(ascent, (float)ch.Bearing.y * fontsize);
|
||||
}
|
||||
const float lineSpacing = lineHeight * 1.2f;
|
||||
const float totalBlockH = lineSpacing * (float)lines.size();
|
||||
|
||||
@@ -145,7 +148,7 @@ public:
|
||||
|
||||
// Horizontal start: textCenter.x controls where the line sits inside the box
|
||||
float x = boxLeft + (t2d.pixelsize.x - lineWidth) * textCenter.x;
|
||||
float y = blockTop + lineSpacing * (float)i;
|
||||
float y = blockTop + ascent + lineSpacing * (float)i; // baseline
|
||||
|
||||
for (char c : lines[i]) {
|
||||
TextCharacter ch = font->Characters[(unsigned char)c];
|
||||
@@ -225,9 +228,9 @@ class Crosshair {
|
||||
public:
|
||||
glm::vec3 Color = { 0.0f, 1.0f, 0.0f };
|
||||
float Opacity = 1.0f;
|
||||
float Length = 11.2f; // arm length
|
||||
float Thickness = 2.8f; // arm width
|
||||
float Gap = 5.6f; // distance from center to the start of each arm
|
||||
float Length = 9.0f; // arm length
|
||||
float Thickness = 2.2f; // arm width
|
||||
float Gap = 4.5f; // distance from center to the start of each arm
|
||||
bool Dot = false; // center dot
|
||||
bool Visible = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user